aboutsummaryrefslogtreecommitdiff
path: root/src/port/win32env.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2010-02-26 02:01:40 +0000
committerBruce Momjian <bruce@momjian.us>2010-02-26 02:01:40 +0000
commit65e806cba1f0f154d51caa7478e7192ce58d1056 (patch)
tree99a656d7b4ec6d038d4c24e07fadf75db4c37e79 /src/port/win32env.c
parent16040575a04486d8e0823b4e304f4933144baf90 (diff)
downloadpostgresql-65e806cba1f0f154d51caa7478e7192ce58d1056.tar.gz
postgresql-65e806cba1f0f154d51caa7478e7192ce58d1056.zip
pgindent run for 9.0
Diffstat (limited to 'src/port/win32env.c')
-rw-r--r--src/port/win32env.c56
1 files changed, 35 insertions, 21 deletions
diff --git a/src/port/win32env.c b/src/port/win32env.c
index 85a1247fba8..2ab5d79112e 100644
--- a/src/port/win32env.c
+++ b/src/port/win32env.c
@@ -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