]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include "system.h" after wctype.h (not before) to avoid
authorJim Meyering <jim@meyering.net>
Mon, 30 Oct 2000 15:58:59 +0000 (15:58 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 30 Oct 2000 15:58:59 +0000 (15:58 +0000)
a compilation error on Solaris 5.5.1 systems.

src/wc.c

index ac9ecf5773f011c5a33537d4ab2136ab684c11f1..5520610d0d4fc07fcef066608db2bbeaabffe3a4 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
-#include "system.h"
-#include "closeout.h"
-#include "error.h"
-#include "human.h"
-#include "safe-read.h"
 
 /* Get mbstate_t, mbrtowc(), wcwidth().  */
 #if HAVE_WCHAR_H
 # define iswprint(wc) 1
 #endif
 
+/* Include this after wctype.h so that we `#undef' ISPRINT
+   (from Solaris's euc.h, from widec.h, from wctype.h) before
+   redefining and using it. */
+#include "system.h"
+
+#include "closeout.h"
+#include "error.h"
+#include "human.h"
+#include "safe-read.h"
+
 /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */
 #if HAVE_MBRTOWC && defined mbstate_t
 # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)