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

Commitf1da075

Browse files
committed
Remove configure check for _configthreadlocale().
All modern Windows systems have _configthreadlocale(). It was firstintroduced in msvcr80.dll from Visual Studio 2005. Historically, MinGWwas stuck on even older msvcrt.dll, but added its own dummyimplementation of the function when using msvcrt.dll years ago anyway,effectively rendering the configure test useless. In practice we don'tencounter the dummy anymore because modern MinGW uses ucrt.Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/CWZBBRR6YA8D.8EHMDRGLCKCD%40neon.tech
1 parent63e1098 commitf1da075

File tree

7 files changed

+5
-21
lines changed

7 files changed

+5
-21
lines changed

‎configure

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15821,17 +15821,6 @@ fi
1582115821

1582215822
# Win32 (really MinGW) support
1582315823
if test "$PORTNAME" = "win32"; then
15824-
for ac_func in _configthreadlocale
15825-
do :
15826-
ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15827-
if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15828-
cat >>confdefs.h <<_ACEOF
15829-
#define HAVE__CONFIGTHREADLOCALE 1
15830-
_ACEOF
15831-
15832-
fi
15833-
done
15834-
1583515824
case " $LIBOBJS " in
1583615825
*" dirmod.$ac_objext "* ) ;;
1583715826
*) LIBOBJS="$LIBOBJS dirmod.$ac_objext"

‎configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,6 @@ fi
18201820

18211821
# Win32 (really MinGW) support
18221822
if test "$PORTNAME" = "win32"; then
1823-
AC_CHECK_FUNCS(_configthreadlocale)
18241823
AC_LIBOBJ(dirmod)
18251824
AC_LIBOBJ(kill)
18261825
AC_LIBOBJ(open)

‎meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2617,7 +2617,6 @@ endif
26172617
# XXX: Might be worth conditioning some checks on the OS, to avoid doing
26182618
# unnecessary checks over and over, particularly on windows.
26192619
func_checks= [
2620-
['_configthreadlocale', {'skip': host_system!='windows'}],
26212620
['backtrace_symbols', {'dependencies': [execinfo_dep]}],
26222621
['clock_gettime', {'dependencies': [rt_dep],'define':false}],
26232622
['copyfile'],

‎src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,6 @@
529529
/* Define to 1 if your compiler understands __builtin_unreachable. */
530530
#undef HAVE__BUILTIN_UNREACHABLE
531531

532-
/* Define to 1 if you have the `_configthreadlocale' function. */
533-
#undef HAVE__CONFIGTHREADLOCALE
534-
535532
/* Define to 1 if you have __cpuid. */
536533
#undef HAVE__CPUID
537534

‎src/interfaces/ecpg/ecpglib/descriptor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
490490
Assert(ecpg_clocale);
491491
stmt.oldlocale=uselocale(ecpg_clocale);
492492
#else
493-
#ifdefHAVE__CONFIGTHREADLOCALE
493+
#ifdefWIN32
494494
stmt.oldthreadlocale=_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
495495
#endif
496496
stmt.oldlocale=ecpg_strdup(setlocale(LC_NUMERIC,NULL),lineno);
@@ -510,7 +510,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
510510
setlocale(LC_NUMERIC,stmt.oldlocale);
511511
ecpg_free(stmt.oldlocale);
512512
}
513-
#ifdefHAVE__CONFIGTHREADLOCALE
513+
#ifdefWIN32
514514
if (stmt.oldthreadlocale!=-1)
515515
(void)_configthreadlocale(stmt.oldthreadlocale);
516516
#endif

‎src/interfaces/ecpg/ecpglib/ecpglib_extern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct statement
7777
locale_toldlocale;
7878
#else
7979
char*oldlocale;
80-
#ifdefHAVE__CONFIGTHREADLOCALE
80+
#ifdefWIN32
8181
intoldthreadlocale;
8282
#endif
8383
#endif

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
19951995
return false;
19961996
}
19971997
#else
1998-
#ifdefHAVE__CONFIGTHREADLOCALE
1998+
#ifdefWIN32
19991999
stmt->oldthreadlocale=_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
20002000
#endif
20012001
stmt->oldlocale=ecpg_strdup(setlocale(LC_NUMERIC,NULL),lineno);
@@ -2219,7 +2219,7 @@ ecpg_do_epilogue(struct statement *stmt)
22192219
#else
22202220
if (stmt->oldlocale)
22212221
setlocale(LC_NUMERIC,stmt->oldlocale);
2222-
#ifdefHAVE__CONFIGTHREADLOCALE
2222+
#ifdefWIN32
22232223

22242224
/*
22252225
* This is a bit trickier than it looks: if we failed partway through

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp