summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-06-24 21:10:12 +0000
committerJim Meyering <jim@meyering.net>1995-06-24 21:10:12 +0000
commit86671a4ed09283236daad34900e55a9c7de1d57d (patch)
treeefcfd25e0d69bfd3f72b46057ae13ece7e9a5a38 /src
parent5cd7a18539b3cab460ea39f85a928ae843703feb (diff)
downloadcoreutils-86671a4ed09283236daad34900e55a9c7de1d57d.tar.xz
Undefine min and/or max before defining to avoid redefinition warning
on systems.
Diffstat (limited to 'src')
-rw-r--r--src/cat.c2
-rw-r--r--src/comm.c2
-rw-r--r--src/join.c3
-rw-r--r--src/sort.c3
-rw-r--r--src/uniq.c2
5 files changed, 12 insertions, 0 deletions
diff --git a/src/cat.c b/src/cat.c
index de99b0dfd..ca9d87ac8 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -34,6 +34,8 @@
#include "version.h"
#include "error.h"
+/* Undefine, to avoid warning about redefinition on some systems. */
+#undef max
#define max(h,i) ((h) > (i) ? (h) : (i))
char *stpcpy ();
diff --git a/src/comm.c b/src/comm.c
index 1d27f75c5..e7d241d15 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -27,6 +27,8 @@
#include "version.h"
#include "error.h"
+/* Undefine, to avoid warning about redefinition on some systems. */
+#undef min
#define min(x, y) ((x) < (y) ? (x) : (y))
/* The name this program was run with. */
diff --git a/src/join.c b/src/join.c
index b17a2a75c..c0d098b5f 100644
--- a/src/join.c
+++ b/src/join.c
@@ -36,6 +36,9 @@ char *xmalloc ();
char *xrealloc ();
static void usage ();
+/* Undefine, to avoid warning about redefinition on some systems. */
+#undef min
+#undef max
#define min(A, B) ((A) < (B) ? (A) : (B))
#define max(A, B) ((A) > (B) ? (A) : (B))
diff --git a/src/sort.c b/src/sort.c
index 0d03ec832..83f345ef8 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -47,7 +47,10 @@ void free ();
static void usage ();
+/* Undefine, to avoid warning about redefinition on some systems. */
+#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
+
#define UCHAR_LIM (UCHAR_MAX + 1)
#define UCHAR(c) ((unsigned char) (c))
diff --git a/src/uniq.c b/src/uniq.c
index 5897c7166..8f86e978f 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -30,6 +30,8 @@
#include "version.h"
#include "error.h"
+/* Undefine, to avoid warning about redefinition on some systems. */
+#undef min
#define min(x, y) ((x) < (y) ? (x) : (y))
static char *find_field ();