[openssh-commits] [openssh] 01/01: Check for wchar.h and langinfo.h

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jul 11 17:27:12 AEST 2016


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit f3f2cc8386868f51440c45210098f65f9787449a
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Mon Jul 11 17:23:38 2016 +1000

    Check for wchar.h and langinfo.h
    
    Wrap includes in the appropriate #ifdefs.
---
 configure.ac | 2 ++
 utf8.c       | 8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9da2b03..2bb5a63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/utf8.c b/utf8.c
index 6445b37..f563d37 100644
--- a/utf8.c
+++ b/utf8.c
@@ -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"
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list