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

Commit1f2a378

Browse files
committed
Revert "Detect setlocale(LC_CTYPE, NULL) clobbering previous return values."
This reverts commitb76e76b. Thebuildfarm yielded no related failures.
1 parent1443a16 commit1f2a378

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
#include"catalog/pg_collation.h"
5959
#include"catalog/pg_control.h"
6060
#include"mb/pg_wchar.h"
61-
#include"utils/builtins.h"
6261
#include"utils/hsearch.h"
6362
#include"utils/memutils.h"
6463
#include"utils/pg_locale.h"
@@ -149,7 +148,6 @@ pg_perm_setlocale(int category, const char *locale)
149148
char*result;
150149
constchar*envvar;
151150
char*envbuf;
152-
charorig_result[LC_ENV_BUFSIZE];
153151

154152
#ifndefWIN32
155153
result=setlocale(category,locale);
@@ -175,7 +173,6 @@ pg_perm_setlocale(int category, const char *locale)
175173

176174
if (result==NULL)
177175
returnresult;/* fall out immediately on failure */
178-
strlcpy(orig_result,result,sizeof(orig_result));
179176

180177
/*
181178
* Use the right encoding in translated messages. Under ENABLE_NLS, let
@@ -234,17 +231,6 @@ pg_perm_setlocale(int category, const char *locale)
234231
}
235232

236233
snprintf(envbuf,LC_ENV_BUFSIZE-1,"%s=%s",envvar,result);
237-
if (strcmp(orig_result,result)!=0)
238-
{
239-
charhex[2*LC_ENV_BUFSIZE+1];
240-
unsignedhexlen;
241-
242-
hexlen=
243-
hex_encode(result,Min(1+strlen(result),LC_ENV_BUFSIZE),hex);
244-
hex[hexlen]='\0';
245-
elog(FATAL,"setlocale() result %s clobbered to 0x%s",
246-
orig_result,hex);
247-
}
248234

249235
if (putenv(envbuf))
250236
returnNULL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp