mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Convert some extern variables to static, Windows code
Similar to 720b0eaae9b, discovered by MinGW.
This commit is contained in:
parent
6bbbd7f65f
commit
c27090bd60
@ -24,7 +24,7 @@ static int parallel_jobs;
|
|||||||
* it can be passed to WaitForMultipleObjects(). We use two arrays
|
* it can be passed to WaitForMultipleObjects(). We use two arrays
|
||||||
* so the thread_handles array can be passed to WaitForMultipleObjects().
|
* so the thread_handles array can be passed to WaitForMultipleObjects().
|
||||||
*/
|
*/
|
||||||
HANDLE *thread_handles;
|
static HANDLE *thread_handles;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -42,11 +42,11 @@ typedef struct
|
|||||||
char *old_tablespace;
|
char *old_tablespace;
|
||||||
} transfer_thread_arg;
|
} transfer_thread_arg;
|
||||||
|
|
||||||
exec_thread_arg **exec_thread_args;
|
static exec_thread_arg **exec_thread_args;
|
||||||
transfer_thread_arg **transfer_thread_args;
|
static transfer_thread_arg **transfer_thread_args;
|
||||||
|
|
||||||
/* track current thread_args struct so reap_child() can be used for all cases */
|
/* track current thread_args struct so reap_child() can be used for all cases */
|
||||||
void **cur_thread_args;
|
static void **cur_thread_args;
|
||||||
|
|
||||||
DWORD win32_exec_prog(exec_thread_arg *args);
|
DWORD win32_exec_prog(exec_thread_arg *args);
|
||||||
DWORD win32_transfer_all_new_dbs(transfer_thread_arg *args);
|
DWORD win32_transfer_all_new_dbs(transfer_thread_arg *args);
|
||||||
|
@ -15,14 +15,14 @@
|
|||||||
#include <olectl.h>
|
#include <olectl.h>
|
||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
HANDLE g_module = NULL; /* hModule of DLL */
|
static HANDLE g_module = NULL; /* hModule of DLL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The event source is stored as a registry key.
|
* The event source is stored as a registry key.
|
||||||
* The maximum length of a registry key is 255 characters.
|
* The maximum length of a registry key is 255 characters.
|
||||||
* http://msdn.microsoft.com/en-us/library/ms724872(v=vs.85).aspx
|
* http://msdn.microsoft.com/en-us/library/ms724872(v=vs.85).aspx
|
||||||
*/
|
*/
|
||||||
char event_source[256] = DEFAULT_EVENT_SOURCE;
|
static char event_source[256] = DEFAULT_EVENT_SOURCE;
|
||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
HRESULT DllInstall(BOOL bInstall, LPCWSTR pszCmdLine);
|
HRESULT DllInstall(BOOL bInstall, LPCWSTR pszCmdLine);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
/* internal vars */
|
/* internal vars */
|
||||||
char *restrict_env;
|
static char *restrict_env;
|
||||||
|
|
||||||
/* Windows API define missing from some versions of MingW headers */
|
/* Windows API define missing from some versions of MingW headers */
|
||||||
#ifndef DISABLE_MAX_PRIVILEGE
|
#ifndef DISABLE_MAX_PRIVILEGE
|
||||||
|
@ -231,7 +231,7 @@ LookupWSErrorMessage(DWORD err, char *dest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct MessageDLL
|
static struct MessageDLL
|
||||||
{
|
{
|
||||||
const char *dll_name;
|
const char *dll_name;
|
||||||
void *handle;
|
void *handle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user