Check for wchar.h and langinfo.h

Wrap includes in the appropriate #ifdefs.
This commit is contained in:
Darren Tucker 2016-07-11 17:23:38 +10:00
parent b9c50614eb
commit f3f2cc8386
2 changed files with 8 additions and 2 deletions

View File

@ -381,6 +381,7 @@ AC_CHECK_HEADERS([ \
ia.h \
iaf.h \
inttypes.h \
langinfo.h \
limits.h \
locale.h \
login.h \
@ -433,6 +434,7 @@ AC_CHECK_HEADERS([ \
utmp.h \
utmpx.h \
vis.h \
wchar.h \
])
# lastlog.h requires sys/time.h to be included first on Solaris

8
utf8.c
View File

@ -23,7 +23,9 @@
#include "includes.h"
#include <sys/types.h>
#include <langinfo.h>
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
@ -32,7 +34,9 @@
#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
# include <vis.h>
#endif
#include <wchar.h>
#ifdef HAVE_WCHAR_H
# include <wchar.h>
#endif
#include "utf8.h"