summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-01-22 23:48:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:21 -0500
commit81a39f964e5efcbfb9242273e71703ca9151c679 (patch)
treede8eb2c04ead5e116690a4ee1f5478c04483ddda /source4/include
parent818db3efd674f66a04c8616d5b6de9c5b89ba71a (diff)
downloadsamba-81a39f964e5efcbfb9242273e71703ca9151c679.tar.gz
samba-81a39f964e5efcbfb9242273e71703ca9151c679.tar.bz2
samba-81a39f964e5efcbfb9242273e71703ca9151c679.zip
r13071: Work around a really annoying compiler warning where header file
ordering causes MIN and MAX to be redefined. (This used to be commit 0eda8a31975fa6cf4f7026bccc5468fba957860d)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/system/filesys.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h
index e81eec13e9..b79ec33c1a 100644
--- a/source4/include/system/filesys.h
+++ b/source4/include/system/filesys.h
@@ -24,6 +24,17 @@
#include <sys/stat.h>
#ifdef HAVE_SYS_PARAM_H
+/* On (at least) IRIX and Linux, sys/param.h unconditionally defines the MAX
+ * and MIN macros. Since smb_macros.h might have already defined this, we
+ * choose to use the system versions if they are present. This avoids a MIPSPro
+ * compiler warning whenever this file is included.
+ */
+#if defined(HAVE_SYS_PARAM_H_MIN) && defined(MIN)
+#undef MIN
+#endif
+#if defined(HAVE_SYS_PARAM_H_MAX) && defined(MAX)
+#undef MAX
+#endif
#include <sys/param.h>
#endif