Remove configure probe for wctype.h.
authorThomas Munro <[email protected]>
Sat, 23 Jul 2022 04:54:00 +0000 (16:54 +1200)
committerThomas Munro <[email protected]>
Sat, 23 Jul 2022 04:54:00 +0000 (16:54 +1200)
This header is present in SUSv2 and Windows.

Also remove the inclusion of <wchar.h>, following clues that it was only
included for the benefit of historical systems that didn't have
<wctype.h>.

Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/CA%2BhUKGKAmTgbg_hMiGG5T7pkpzOnY1cWFAHYtZXHCpqeC_hCkA%40mail.gmail.com

configure
configure.ac
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 e80d371da713b5b7264410a3a0e7b43729f59d82..66513212086197464a06829a4a1c84eb100c1d82 100755 (executable)
--- a/configure
+++ b/configure
@@ -13875,7 +13875,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/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/uio.h sys/un.h termios.h ucred.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/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/uio.h sys/un.h termios.h ucred.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 6d3d2f3ffaa33fc3bc4c65189baefd1bd15fe814..1e92fd6abd66c605c249e871b7efd42cf16a7b28 100644 (file)
@@ -1469,7 +1469,6 @@ AC_CHECK_HEADERS(m4_normalize([
    sys/un.h
    termios.h
    ucred.h
-   wctype.h
 ]))
 
 # On BSD, test for net/if.h will fail unless sys/socket.h
index e909c1a200cba783310636dda6a02b303cdfeaf7..6f8734a947dd336ab253d69219823358c5d2ea90 100644 (file)
 #include <math.h>
 #include <float.h>
 #include <limits.h>
-
-/*
- * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>, so include that too.
- */
-#include <wchar.h>
-#ifdef HAVE_WCTYPE_H
 #include <wctype.h>
-#endif
 
 #ifdef USE_ICU
 #include <unicode/ustring.h>
index 21e9283731bd2a92743b1994a4a3a2ca52e2600d..000ed9bde27ecdd4200e6e05a6d357ab1efe532c 100644 (file)
 /* Define to 1 if you have the `wcstombs_l' function. */
 #undef HAVE_WCSTOMBS_L
 
-/* Define to 1 if you have the <wctype.h> header file. */
-#undef HAVE_WCTYPE_H
-
 /* Define to 1 if you have the <winldap.h> header file. */
 #undef HAVE_WINLDAP_H
 
index 100c52d640fdfc27d6e4eb21ad6b0932c15411dc..fc158e1bb7b162a6806ff4ff3ca8923c8c8669e2 100644 (file)
 
 #include <ctype.h>
 #include <limits.h>
-
-/*
- * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>, so include that too.
- */
-#include <wchar.h>
-#ifdef HAVE_WCTYPE_H
 #include <wctype.h>
-#endif
 
 #include "mb/pg_wchar.h"
 
index 7d7c4e16c621c4921a936c5a206a14a9e9f3e9db..d14cb4ed26db3c50d0907696db29c80c4992832f 100644 (file)
 
 #include <ctype.h>
 #include <limits.h>
+#include <wctype.h>
 
 #include "lib/stringinfo.h"
 #include "mb/pg_wchar.h"
 #include "utils/pg_locale.h"
 
-/*
- * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
- * declare them in <wchar.h>, so include that too.
- */
-#include <wchar.h>
-#ifdef HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
-
 /* working state for tsearch_readline (should be a local var in caller) */
 typedef struct
 {
index 2f364ab11236a757eb8852480e7a9e86b13b7ed6..f8df6acabe5e86c9a564f870cc6e16453fad2067 100644 (file)
@@ -426,7 +426,6 @@ sub GenerateFiles
        HAVE_UUID_UUID_H                         => undef,
        HAVE_WINLDAP_H                           => undef,
        HAVE_WCSTOMBS_L                          => 1,
-       HAVE_WCTYPE_H                            => 1,
        HAVE_VISIBILITY_ATTRIBUTE                => undef,
        HAVE_WRITEV                              => undef,
        HAVE_X509_GET_SIGNATURE_NID              => 1,