mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
This commit is contained in:
27
src/backend/port/dynloader/win32.c
Normal file
27
src/backend/port/dynloader/win32.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/win32.c,v 1.1 2003/05/15 16:35:29 momjian Exp $ */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
char *
|
||||
dlerror(void)
|
||||
{
|
||||
return "error";
|
||||
}
|
||||
|
||||
int
|
||||
dlclose(void *handle)
|
||||
{
|
||||
return FreeLibrary((HMODULE)handle) ? 0 : 1;
|
||||
}
|
||||
|
||||
void *
|
||||
dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return (void *)GetProcAddress((HMODULE)handle, symbol);
|
||||
}
|
||||
|
||||
void *
|
||||
dlopen(const char *path, int mode)
|
||||
{
|
||||
return (void *)LoadLibrary(path);
|
||||
}
|
Reference in New Issue
Block a user