[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] sys/param.h change for GCC 4 compatibility
Here's a patch to MiNTlibs sys/param.h so that GCC 4 is happy too.
Alan.
Index: include/sys/param.h
===================================================================
RCS file: /mint/mintlib/include/sys/param.h,v
retrieving revision 1.6
diff -u -r1.6 param.h
--- include/sys/param.h 14 Mar 2002 20:48:59 -0000 1.6
+++ include/sys/param.h 13 Jan 2008 22:27:45 -0000
@@ -41,16 +41,8 @@
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */
-#ifndef MIN
-#define MIN(a,b) \
- ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); \
- _a < _b ? _a : _b; })
-#endif
-#ifndef MAX
-#define MAX(a,b) \
- ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b); \
- _a > _b ? _a : _b; })
-#endif
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
/* Unit of `st_blocks'. */
#define DEV_BSIZE 512