summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-07-11 17:23:38 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-07-11 17:26:49 +1000
commitf3f2cc8386868f51440c45210098f65f9787449a (patch)
tree48958a7bae719e91fa1a0bafaaaf0475e9ed322f
parentb9c50614eba9d90939b2b119b6e1b7e03b462278 (diff)
Check for wchar.h and langinfo.h
Wrap includes in the appropriate #ifdefs.
-rw-r--r--configure.ac2
-rw-r--r--utf8.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9da2b0364..2bb5a63c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,6 +381,7 @@ AC_CHECK_HEADERS([ \
381 ia.h \ 381 ia.h \
382 iaf.h \ 382 iaf.h \
383 inttypes.h \ 383 inttypes.h \
384 langinfo.h \
384 limits.h \ 385 limits.h \
385 locale.h \ 386 locale.h \
386 login.h \ 387 login.h \
@@ -433,6 +434,7 @@ AC_CHECK_HEADERS([ \
433 utmp.h \ 434 utmp.h \
434 utmpx.h \ 435 utmpx.h \
435 vis.h \ 436 vis.h \
437 wchar.h \
436]) 438])
437 439
438# lastlog.h requires sys/time.h to be included first on Solaris 440# lastlog.h requires sys/time.h to be included first on Solaris
diff --git a/utf8.c b/utf8.c
index 6445b3766..f563d3738 100644
--- a/utf8.c
+++ b/utf8.c
@@ -23,7 +23,9 @@
23#include "includes.h" 23#include "includes.h"
24 24
25#include <sys/types.h> 25#include <sys/types.h>
26#include <langinfo.h> 26#ifdef HAVE_LANGINFO_H
27# include <langinfo.h>
28#endif
27#include <limits.h> 29#include <limits.h>
28#include <stdarg.h> 30#include <stdarg.h>
29#include <stdio.h> 31#include <stdio.h>
@@ -32,7 +34,9 @@
32#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS) 34#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
33# include <vis.h> 35# include <vis.h>
34#endif 36#endif
35#include <wchar.h> 37#ifdef HAVE_WCHAR_H
38# include <wchar.h>
39#endif
36 40
37#include "utf8.h" 41#include "utf8.h"
38 42