summaryrefslogtreecommitdiff
path: root/lib/xstrtol.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-07-22 16:57:15 +0000
committerJim Meyering <jim@meyering.net>1998-07-22 16:57:15 +0000
commit19c23eefb7ecef3e2245ab3d4c66101ad69bfb09 (patch)
tree7ab6890b98caf382371b33f65feb4891cf618cef /lib/xstrtol.c
parentef8d2acace8b060d0e1e966f433390e9e0c25b11 (diff)
downloadcoreutils-19c23eefb7ecef3e2245ab3d4c66101ad69bfb09.tar.xz
Include <stdio.h> if NDEBUG is not defined; needed on SunOS 4.
From Paul Eggert.
Diffstat (limited to 'lib/xstrtol.c')
-rw-r--r--lib/xstrtol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index 0dc871eac..cd85a3f93 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -36,6 +36,12 @@
# endif
#endif
+/* Some pre-ANSI implementations (e.g. SunOS 4)
+ need stderr defined if assertion checking is enabled. */
+#ifndef NDEBUG
+# include <stdio.h>
+#endif
+
#include <assert.h>
#include <errno.h>