~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/backend/port/dynloader/win32.c

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.5 2004-12-02 19:38:50 momjian Exp $ */
 
2
 
 
3
#include <windows.h>
 
4
 
 
5
char *dlerror(void);
 
6
int dlclose(void *handle);
 
7
void *dlsym(void *handle, const char *symbol);
 
8
void *dlopen(const char *path, int mode);
 
9
 
 
10
char *
 
11
dlerror(void)
 
12
{
 
13
        return "dynamic load error";
 
14
}
 
15
 
 
16
int
 
17
dlclose(void *handle)
 
18
{
 
19
        return FreeLibrary((HMODULE) handle) ? 0 : 1;
 
20
}
 
21
 
 
22
void *
 
23
dlsym(void *handle, const char *symbol)
 
24
{
 
25
        return (void *) GetProcAddress((HMODULE) handle, symbol);
 
26
}
 
27
 
 
28
void *
 
29
dlopen(const char *path, int mode)
 
30
{
 
31
        return (void *) LoadLibrary(path);
 
32
}