Patch attached. I noticed that getcwd.c and regex.c also use MIN & MAX without depending on minmax. Is this because they are shared with glibc? Both use #ifdef _LIBC in places, though I noticed that getcwd.c isn't in config/srclist. Would it be appropriate to have getcwd &/or regex depend on minmax as well?
2005-05-15 Derek Price <[EMAIL PROTECTED]> * lib/same.c, lib/utimecmp.c: Remove MIN & MAX definitions in favor of #include "minmax.h". * modules/same, modules/utimecmp: Depend on minmax. Regards, Derek
Index: lib/same.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/same.c,v retrieving revision 1.16 diff -u -p -r1.16 same.c --- lib/same.c 14 May 2005 06:03:58 -0000 1.16 +++ lib/same.c 15 May 2005 18:42:26 -0000 @@ -44,12 +44,9 @@ #include "same.h" #include "dirname.h" #include "error.h" +#include "minmax.h" #include "xalloc.h" -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - #define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) Index: lib/utimecmp.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/utimecmp.c,v retrieving revision 1.3 diff -u -p -r1.3 utimecmp.c --- lib/utimecmp.c 14 May 2005 06:03:58 -0000 1.3 +++ lib/utimecmp.c 15 May 2005 18:42:26 -0000 @@ -36,6 +36,7 @@ #include <stdlib.h> #include "hash.h" #include "intprops.h" +#include "minmax.h" #include "timespec.h" #include "utimens.h" #include "xalloc.h" @@ -43,10 +44,6 @@ /* Verify a requirement at compile-time (unlike assert, which is runtime). */ #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif Index: modules/same =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/same,v retrieving revision 1.6 diff -u -p -r1.6 same --- modules/same 21 Mar 2005 22:07:25 -0000 1.6 +++ modules/same 15 May 2005 18:42:26 -0000 @@ -12,6 +12,7 @@ xalloc error dirname stdbool +minmax configure.ac: gl_SAME Index: modules/utimecmp =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/utimecmp,v retrieving revision 1.5 diff -u -p -r1.5 utimecmp --- modules/utimecmp 6 May 2005 17:22:45 -0000 1.5 +++ modules/utimecmp 15 May 2005 18:42:26 -0000 @@ -13,6 +13,7 @@ timespec utimens xalloc stdbool +minmax configure.ac: gl_UTIMECMP
_______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib