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

Commit54aa6cc

Browse files
committed
Make pgwin32_putenv() probe every known CRT, regardless of compiler.
This extends to MinGW builds the provision for MSVC-built libraries tosee putenv() effects. Doing so repairs, for example, the handling ofthe krb_server_keyfile parameter when linked with MSVC-built MITKerberos. Like the previous commit, no back-patch.
1 parent202dbdb commit54aa6cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/port/win32env.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pgwin32_putenv(const char *envval)
2121
{
2222
char*envcpy;
2323
char*cp;
24-
#ifdef_MSC_VER
2524
typedefint (_cdecl*PUTENVPROC) (constchar*);
2625
staticconstchar*constmodulenames[]= {
2726
"msvcrt",/* Visual Studio 6.0 / MinGW */
@@ -45,7 +44,6 @@ pgwin32_putenv(const char *envval)
4544
NULL
4645
};
4746
inti;
48-
#endif/* _MSC_VER */
4947

5048
/*
5149
* Update process environment, making this change visible to child
@@ -88,7 +86,6 @@ pgwin32_putenv(const char *envval)
8886
* against. Addresses within these modules may become invalid the moment
8987
* we call FreeLibrary(), so don't cache them.
9088
*/
91-
#ifdef_MSC_VER
9289
for (i=0;modulenames[i];i++)
9390
{
9491
HMODULEhmodule=NULL;
@@ -104,9 +101,12 @@ pgwin32_putenv(const char *envval)
104101
FreeLibrary(hmodule);
105102
}
106103
}
107-
#endif/* _MSC_VER */
108104

109-
/* Finally, update our "own" cache */
105+
/*
106+
* Finally, update our "own" cache. This is redundant with the loop
107+
* above, except when PostgreSQL itself links to a CRT not listed above.
108+
* Ideally, the loop does visit all possible CRTs, making this redundant.
109+
*/
110110
return_putenv(envval);
111111
}
112112

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp