summaryrefslogtreecommitdiff
path: root/make.h
diff options
context:
space:
mode:
Diffstat (limited to 'make.h')
-rw-r--r--make.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/make.h b/make.h
index b25318b..a50334f 100644
--- a/make.h
+++ b/make.h
@@ -299,6 +299,17 @@ extern char *alloca ();
# endif /* HAVE_ALLOCA_H. */
#endif /* GCC. */
+/* ISDIGIT offers the following features:
+ - Its arg may be any int or unsigned int; it need not be an unsigned char.
+ - It's guaranteed to evaluate its argument exactly once.
+ NOTE! Make relies on this behavior, don't change it!
+ - It's typically faster.
+ Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
+ only '0' through '9' are digits. Prefer ISDIGIT to isdigit() 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) (c) - '0' <= 9)
+
#ifndef iAPX286
# define streq(a, b) \
((a) == (b) || \