summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-25 06:14:33 +0000
committerJim Meyering <jim@meyering.net>2005-09-25 06:14:33 +0000
commit23b92992478a9193ae293684d00df1dfe4850bc6 (patch)
treeac2c510646a8662d60b3ba4f69dff99d3f66eb19 /lib
parente3513e18955dd7b8d236695040186ec438e7f55a (diff)
downloadcoreutils-23b92992478a9193ae293684d00df1dfe4850bc6.tar.xz
Protect against multiple inclusion.
Diffstat (limited to 'lib')
-rw-r--r--lib/strnumcmp-in.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/strnumcmp-in.h b/lib/strnumcmp-in.h
index 195047313..b80623552 100644
--- a/lib/strnumcmp-in.h
+++ b/lib/strnumcmp-in.h
@@ -19,12 +19,15 @@
/* Written by Mike Haertel. */
-#include "strnumcmp.h"
+#ifndef STRNUMCMP_IN_H
+# define STRNUMCMP_IN_H 1
-#include <stddef.h>
+# include "strnumcmp.h"
-#define NEGATION_SIGN '-'
-#define NUMERIC_ZERO '0'
+# include <stddef.h>
+
+# define NEGATION_SIGN '-'
+# define NUMERIC_ZERO '0'
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
@@ -33,7 +36,7 @@
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
ISDIGIT_LOCALE unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
-#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+# define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
/* Compare strings A and B containing decimal fractions < 1.
@@ -239,3 +242,5 @@ numcompare (char const *a, char const *b,
return tmp;
}
}
+
+#endif