Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14c648f

Browse files
committed
All POSIX systems have langinfo.h and CODESET.
We don't need configure probes for HAVE_LANGINFO_H (it is implied by!WIN32), and we don't need to consider systems that have it but don'tdefine CODESET (that was for OpenBSD in commit81cca21, but it has nowhad it for 19 years).Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Discussion:https://postgr.es/m/CA%2BhUKGJqVe0%2BPv9dvC9dSums_PXxGo9SWcxYAMBguWJUGbWz-A%40mail.gmail.com
1 parent93660d1 commit14c648f

File tree

6 files changed

+2
-29
lines changed

6 files changed

+2
-29
lines changed

‎configure

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

1330913309

13310-
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.hlanginfo.hmbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13310+
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
1331113311
do :
1331213312
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1331313313
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
@@ -1447,7 +1447,6 @@ AC_CHECK_HEADERS(m4_normalize([
14471447
execinfo.h
14481448
getopt.h
14491449
ifaddrs.h
1450-
langinfo.h
14511450
mbarrier.h
14521451
sys/epoll.h
14531452
sys/event.h

‎meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2394,7 +2394,6 @@ header_checks = [
23942394
'execinfo.h',
23952395
'getopt.h',
23962396
'ifaddrs.h',
2397-
'langinfo.h',
23982397
'mbarrier.h',
23992398
'stdbool.h',
24002399
'strings.h',

‎src/bin/pg_upgrade/pg_upgrade.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040

4141
#include<time.h>
4242

43-
#ifdefHAVE_LANGINFO_H
44-
#include<langinfo.h>
45-
#endif
46-
4743
#include"catalog/pg_class_d.h"
4844
#include"common/file_perm.h"
4945
#include"common/logging.h"

‎src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@
238238
/* Define to 1 if you have the `kqueue' function. */
239239
#undef HAVE_KQUEUE
240240

241-
/* Define to 1 if you have the <langinfo.h> header file. */
242-
#undef HAVE_LANGINFO_H
243-
244241
/* Define to 1 if you have the `ldap_initialize' function. */
245242
#undef HAVE_LDAP_INITIALIZE
246243

‎src/port/chklocale.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include"postgres_fe.h"
2020
#endif
2121

22-
#ifdefHAVE_LANGINFO_H
22+
#ifndefWIN32
2323
#include<langinfo.h>
2424
#endif
2525

@@ -287,8 +287,6 @@ pg_codepage_to_encoding(UINT cp)
287287
#endif
288288
#endif/* WIN32 */
289289

290-
#if (defined(HAVE_LANGINFO_H)&& defined(CODESET))|| defined(WIN32)
291-
292290
/*
293291
* Given a setting for LC_CTYPE, return the Postgres ID of the associated
294292
* encoding, if we can determine it. Return -1 if we can't determine it.
@@ -415,19 +413,3 @@ pg_get_encoding_from_locale(const char *ctype, bool write_message)
415413
free(sys);
416414
return-1;
417415
}
418-
#else/* (HAVE_LANGINFO_H && CODESET) || WIN32 */
419-
420-
/*
421-
* stub if no multi-language platform support
422-
*
423-
* Note: we could return -1 here, but that would have the effect of
424-
* forcing users to specify an encoding to initdb on such platforms.
425-
* It seems better to silently default to SQL_ASCII.
426-
*/
427-
int
428-
pg_get_encoding_from_locale(constchar*ctype,boolwrite_message)
429-
{
430-
returnPG_SQL_ASCII;
431-
}
432-
433-
#endif/* (HAVE_LANGINFO_H && CODESET) || WIN32 */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp