Assume that we have <wchar.h>.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Feb 2020 19:11:39 +0000 (14:11 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Feb 2020 19:30:47 +0000 (14:30 -0500)
Windows has this, and so do all other live platforms according to the
buildfarm; it's been required by POSIX since SUSv2.  So remove the
configure probe and tests of HAVE_WCHAR_H.

This is part of a series of commits to get rid of no-longer-relevant
configure checks and dead src/port/ code.  I'm committing them separately
to make it easier to back out individual changes if they prove less
portable than I expect.

Discussion: https://postgr.es/m/15379.1582221614@sss.pgh.pa.us

configure
configure.in
src/backend/utils/adt/formatting.c
src/include/pg_config.h.in
src/include/regex/regcustom.h
src/include/tsearch/ts_locale.h
src/tools/msvc/Solution.pm

index e6e8275e807e0b58d6b458aa234f120a0da59e4c..610812d103939d24a0cc3bc6d369f1ed2c1b651f 100755 (executable)
--- a/configure
+++ b/configure
@@ -12762,7 +12762,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 fi
 
 
-for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h wchar.h wctype.h
+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h wctype.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index e8e972231c2f16a6a02cf94be070d0c07a20c1e7..8d7871a59a5f00179847ad01e30e57fbcc56c78d 100644 (file)
@@ -1300,7 +1300,6 @@ AC_CHECK_HEADERS(m4_normalize([
        sys/un.h
        termios.h
        ucred.h
-       wchar.h
        wctype.h
 ]))
 
index f58331de75b07e17d22984a4b8ef4b4bbbd7e90d..d0294684e2564ed5e42f5416a636c7e8f7a86d28 100644 (file)
 
 /*
  * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>.
+ * declare them in <wchar.h>, so include that too.
  */
-#ifdef HAVE_WCHAR_H
 #include <wchar.h>
-#endif
 #ifdef HAVE_WCTYPE_H
 #include <wctype.h>
 #endif
index 20700cb85a97dccce0767eca8db955f8d4d6b008..ddc4a3f816a285a8d6aa9daef833ef6b8391463b 100644 (file)
 /* Define to 1 if you have the <uuid/uuid.h> header file. */
 #undef HAVE_UUID_UUID_H
 
-/* Define to 1 if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
-
 /* Define to 1 if you have the `wcstombs_l' function. */
 #undef HAVE_WCSTOMBS_L
 
index 82c9e2fad81502ca006c6ebb6f14d5e3e23f0ef7..100c52d640fdfc27d6e4eb21ad6b0932c15411dc 100644 (file)
 
 /*
  * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>.
+ * declare them in <wchar.h>, so include that too.
  */
-#ifdef HAVE_WCHAR_H
 #include <wchar.h>
-#endif
 #ifdef HAVE_WCTYPE_H
 #include <wctype.h>
 #endif
index 17536babfe0de91046e715fde9dcb2563c7532fa..cc4bd9ab20d49873cc1e35ada22a5319e998f409 100644 (file)
 
 /*
  * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>.
+ * declare them in <wchar.h>, so include that too.
  */
-#ifdef HAVE_WCHAR_H
 #include <wchar.h>
-#endif
 #ifdef HAVE_WCTYPE_H
 #include <wctype.h>
 #endif
index 151a41ad5b62a4595799323872d5d4b50955da89..b15dae16a9e65c3bd85abf2ec80f8dd1c43afde8 100644 (file)
@@ -396,7 +396,6 @@ sub GenerateFiles
                HAVE_UUID_H                              => undef,
                HAVE_UUID_UUID_H                         => undef,
                HAVE_WINLDAP_H                           => undef,
-               HAVE_WCHAR_H                             => 1,
                HAVE_WCSTOMBS_L                          => 1,
                HAVE_WCTYPE_H                            => 1,
                HAVE_X509_GET_SIGNATURE_NID              => 1,