svn commit: samba r15200 - in branches/SAMBA_4_0/source: build/m4 lib/replace lib/util

jelmer at samba.org jelmer at samba.org
Mon Apr 24 14:09:07 GMT 2006


Author: jelmer
Date: 2006-04-24 14:09:07 +0000 (Mon, 24 Apr 2006)
New Revision: 15200

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15200

Log:
Move MIN/MAX macros to libreplace as some systems have them 
in sys/param.h

Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4
   branches/SAMBA_4_0/source/lib/replace/README
   branches/SAMBA_4_0/source/lib/replace/config.m4
   branches/SAMBA_4_0/source/lib/replace/replace.h
   branches/SAMBA_4_0/source/lib/util/util.h


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-24 13:55:21 UTC (rev 15199)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-24 14:09:07 UTC (rev 15200)
@@ -53,7 +53,7 @@
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
 AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h compat.h math.h)
-AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
+AC_CHECK_HEADERS(ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
 AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
 AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h)

Modified: branches/SAMBA_4_0/source/lib/replace/README
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/README	2006-04-24 13:55:21 UTC (rev 15199)
+++ branches/SAMBA_4_0/source/lib/replace/README	2006-04-24 14:09:07 UTC (rev 15200)
@@ -68,6 +68,8 @@
 Macros:
 va_copy
 __FUNCTION__
+MIN
+MAX
 
 Prerequisites:
 memset (for bzero)

Modified: branches/SAMBA_4_0/source/lib/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/config.m4	2006-04-24 13:55:21 UTC (rev 15199)
+++ branches/SAMBA_4_0/source/lib/replace/config.m4	2006-04-24 14:09:07 UTC (rev 15200)
@@ -159,3 +159,5 @@
 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
     AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro])
 fi
+
+AC_CHECK_HEADERS([sys/param.h])

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h	2006-04-24 13:55:21 UTC (rev 15199)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h	2006-04-24 14:09:07 UTC (rev 15200)
@@ -213,4 +213,18 @@
 #define __FUNCTION__ ("")
 #endif
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
+
+#ifndef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+
+
+#endif

Modified: branches/SAMBA_4_0/source/lib/util/util.h
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util.h	2006-04-24 13:55:21 UTC (rev 15199)
+++ branches/SAMBA_4_0/source/lib/util/util.h	2006-04-24 14:09:07 UTC (rev 15200)
@@ -77,20 +77,6 @@
 	smb_panic("assert failed"); abort(); }} while (0)
 
 /**
- * determine the lowest of two values
- */
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-
-/**
- * determine the highest of two values
- */
-#ifndef MAX
-#define MAX(a,b) ((a)>(b)?(a):(b))
-#endif
-
-/**
  * determine absolute value
  */
 #ifndef ABS



More information about the samba-cvs mailing list