Skip to content

Commit 634a89c

Browse files
committed
Remove configure probe for wctype.h.
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 <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CA%2BhUKGKAmTgbg_hMiGG5T7pkpzOnY1cWFAHYtZXHCpqeC_hCkA%40mail.gmail.com
1 parent a3b8d2a commit 634a89c

File tree

7 files changed

+2
-31
lines changed

7 files changed

+2
-31
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13875,7 +13875,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1387513875
fi
1387613876

1387713877

13878-
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
13878+
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
1387913879
do :
1388013880
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1388113881
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,6 @@ AC_CHECK_HEADERS(m4_normalize([
14691469
sys/un.h
14701470
termios.h
14711471
ucred.h
1472-
wctype.h
14731472
]))
14741473

14751474
# On BSD, test for net/if.h will fail unless sys/socket.h

src/backend/utils/adt/formatting.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,7 @@
6969
#include <math.h>
7070
#include <float.h>
7171
#include <limits.h>
72-
73-
/*
74-
* towlower() and friends should be in <wctype.h>, but some pre-C99 systems
75-
* declare them in <wchar.h>, so include that too.
76-
*/
77-
#include <wchar.h>
78-
#ifdef HAVE_WCTYPE_H
7972
#include <wctype.h>
80-
#endif
8173

8274
#ifdef USE_ICU
8375
#include <unicode/ustring.h>

src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,9 +700,6 @@
700700
/* Define to 1 if you have the `wcstombs_l' function. */
701701
#undef HAVE_WCSTOMBS_L
702702

703-
/* Define to 1 if you have the <wctype.h> header file. */
704-
#undef HAVE_WCTYPE_H
705-
706703
/* Define to 1 if you have the <winldap.h> header file. */
707704
#undef HAVE_WINLDAP_H
708705

src/include/regex/regcustom.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,7 @@
4040

4141
#include <ctype.h>
4242
#include <limits.h>
43-
44-
/*
45-
* towlower() and friends should be in <wctype.h>, but some pre-C99 systems
46-
* declare them in <wchar.h>, so include that too.
47-
*/
48-
#include <wchar.h>
49-
#ifdef HAVE_WCTYPE_H
5043
#include <wctype.h>
51-
#endif
5244

5345
#include "mb/pg_wchar.h"
5446

src/include/tsearch/ts_locale.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,12 @@
1414

1515
#include <ctype.h>
1616
#include <limits.h>
17+
#include <wctype.h>
1718

1819
#include "lib/stringinfo.h"
1920
#include "mb/pg_wchar.h"
2021
#include "utils/pg_locale.h"
2122

22-
/*
23-
* towlower() and friends should be in <wctype.h>, but some pre-C99 systems
24-
* declare them in <wchar.h>, so include that too.
25-
*/
26-
#include <wchar.h>
27-
#ifdef HAVE_WCTYPE_H
28-
#include <wctype.h>
29-
#endif
30-
3123
/* working state for tsearch_readline (should be a local var in caller) */
3224
typedef struct
3325
{

src/tools/msvc/Solution.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ sub GenerateFiles
426426
HAVE_UUID_UUID_H => undef,
427427
HAVE_WINLDAP_H => undef,
428428
HAVE_WCSTOMBS_L => 1,
429-
HAVE_WCTYPE_H => 1,
430429
HAVE_VISIBILITY_ATTRIBUTE => undef,
431430
HAVE_WRITEV => undef,
432431
HAVE_X509_GET_SIGNATURE_NID => 1,

0 commit comments

Comments
 (0)