1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

pgindent run for 9.0

This commit is contained in:
Bruce Momjian
2010-02-26 02:01:40 +00:00
parent 16040575a0
commit 65e806cba1
403 changed files with 6786 additions and 6530 deletions

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/win32env.c,v 1.7 2010/01/02 16:58:13 momjian Exp $
* $PostgreSQL: pgsql/src/port/win32env.c,v 1.8 2010/02/26 02:01:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -27,30 +27,44 @@ pgwin32_putenv(const char *envval)
* Each version of MSVCRT has its own _putenv() call in the runtime
* library.
*
* mingw always uses MSVCRT.DLL, but if we are in a Visual C++ environment,
* attempt to update the environment in all MSVCRT modules that are
* currently loaded, to work properly with any third party libraries
* linked against a different MSVCRT but still relying on environment
* variables.
* mingw always uses MSVCRT.DLL, but if we are in a Visual C++
* environment, attempt to update the environment in all MSVCRT modules
* that are currently loaded, to work properly with any third party
* libraries linked against a different MSVCRT but still relying on
* environment variables.
*
* Also separately update the system environment that gets inherited by
* subprocesses.
*/
#ifdef _MSC_VER
typedef int (_cdecl * PUTENVPROC) (const char *);
static struct {
static struct
{
char *modulename;
HMODULE hmodule;
PUTENVPROC putenvFunc;
} rtmodules[] = {
{ "msvcrt", 0, NULL}, /* Visual Studio 6.0 / mingw */
{ "msvcr70", 0, NULL}, /* Visual Studio 2002 */
{ "msvcr71", 0, NULL}, /* Visual Studio 2003 */
{ "msvcr80", 0, NULL}, /* Visual Studio 2005 */
{ "msvcr90", 0, NULL}, /* Visual Studio 2008 */
{ NULL, 0, NULL}
PUTENVPROC putenvFunc;
} rtmodules[] =
{
{
"msvcrt", 0, NULL
}, /* Visual Studio 6.0 / mingw */
{
"msvcr70", 0, NULL
}, /* Visual Studio 2002 */
{
"msvcr71", 0, NULL
}, /* Visual Studio 2003 */
{
"msvcr80", 0, NULL
}, /* Visual Studio 2005 */
{
"msvcr90", 0, NULL
}, /* Visual Studio 2008 */
{
NULL, 0, NULL
}
};
int i;
int i;
for (i = 0; rtmodules[i].modulename; i++)
{
@ -63,8 +77,8 @@ pgwin32_putenv(const char *envval)
if (rtmodules[i].hmodule == NULL)
{
/*
* Set to INVALID_HANDLE_VALUE so we know we have tried this one
* before, and won't try again.
* Set to INVALID_HANDLE_VALUE so we know we have tried
* this one before, and won't try again.
*/
rtmodules[i].hmodule = INVALID_HANDLE_VALUE;
continue;
@ -83,8 +97,8 @@ pgwin32_putenv(const char *envval)
else
{
/*
* Module loaded, but we did not find the function last time. We're
* not going to find it this time either...
* Module loaded, but we did not find the function last time.
* We're not going to find it this time either...
*/
continue;
}
@ -92,7 +106,7 @@ pgwin32_putenv(const char *envval)
/* At this point, putenvFunc is set or we have exited the loop */
rtmodules[i].putenvFunc(envval);
}
#endif /* _MSC_VER */
#endif /* _MSC_VER */
/*
* Update the process environment - to make modifications visible to child