add MIN/MAX macros to sys/param.h
authorRich Felker <dalias@aerifal.cx>
Wed, 25 Jan 2012 03:51:27 +0000 (22:51 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 25 Jan 2012 03:51:27 +0000 (22:51 -0500)
this is a nonstandard junk header anyway, so just do what apps expect..

include/sys/param.h

index 1ed5337..30499cc 100644 (file)
 #undef MAXPATHLEN
 #define MAXPATHLEN 4096
 
+#undef MIN
+#undef MAX
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
 #include <sys/resource.h>
 #include <endian.h>
 #include <limits.h>