From 634a89c7082538e9521a97e5e92126090b68645c Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sat, 23 Jul 2022 16:54:00 +1200 Subject: [PATCH] Remove configure probe for wctype.h. This header is present in SUSv2 and Windows. Also remove the inclusion of , following clues that it was only included for the benefit of historical systems that didn't have . Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CA%2BhUKGKAmTgbg_hMiGG5T7pkpzOnY1cWFAHYtZXHCpqeC_hCkA%40mail.gmail.com --- configure | 2 +- configure.ac | 1 - src/backend/utils/adt/formatting.c | 8 -------- src/include/pg_config.h.in | 3 --- src/include/regex/regcustom.h | 8 -------- src/include/tsearch/ts_locale.h | 10 +--------- src/tools/msvc/Solution.pm | 1 - 7 files changed, 2 insertions(+), 31 deletions(-) diff --git a/configure b/configure index e80d371da71..66513212086 100755 --- 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" diff --git a/configure.ac b/configure.ac index 6d3d2f3ffaa..1e92fd6abd6 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index e909c1a200c..6f8734a947d 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -69,15 +69,7 @@ #include #include #include - -/* - * towlower() and friends should be in , but some pre-C99 systems - * declare them in , so include that too. - */ -#include -#ifdef HAVE_WCTYPE_H #include -#endif #ifdef USE_ICU #include diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 21e9283731b..000ed9bde27 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -700,9 +700,6 @@ /* Define to 1 if you have the `wcstombs_l' function. */ #undef HAVE_WCSTOMBS_L -/* Define to 1 if you have the header file. */ -#undef HAVE_WCTYPE_H - /* Define to 1 if you have the header file. */ #undef HAVE_WINLDAP_H diff --git a/src/include/regex/regcustom.h b/src/include/regex/regcustom.h index 100c52d640f..fc158e1bb7b 100644 --- a/src/include/regex/regcustom.h +++ b/src/include/regex/regcustom.h @@ -40,15 +40,7 @@ #include #include - -/* - * towlower() and friends should be in , but some pre-C99 systems - * declare them in , so include that too. - */ -#include -#ifdef HAVE_WCTYPE_H #include -#endif #include "mb/pg_wchar.h" diff --git a/src/include/tsearch/ts_locale.h b/src/include/tsearch/ts_locale.h index 7d7c4e16c62..d14cb4ed26d 100644 --- a/src/include/tsearch/ts_locale.h +++ b/src/include/tsearch/ts_locale.h @@ -14,20 +14,12 @@ #include #include +#include #include "lib/stringinfo.h" #include "mb/pg_wchar.h" #include "utils/pg_locale.h" -/* - * towlower() and friends should be in , but some pre-C99 systems - * declare them in , so include that too. - */ -#include -#ifdef HAVE_WCTYPE_H -#include -#endif - /* working state for tsearch_readline (should be a local var in caller) */ typedef struct { diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 2f364ab1123..f8df6acabe5 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -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, -- 2.30.2