Pullup ticket #3111.
[pkgsrc.git] / databases / postgresql84 / patches / patch-ae
1 $NetBSD: patch-ae,v 1.1.1.1 2008/03/04 12:41:37 adam Exp $
2
3 --- src/backend/port/dynloader/netbsd.h.orig    2005-01-01 07:00:32.000000000 +0900
4 +++ src/backend/port/dynloader/netbsd.h
5 @@ -21,19 +21,7 @@
6  
7  #include "utils/dynamic_loader.h"
8  
9 -/*
10 - * Dynamic Loader on NetBSD 1.0.
11 - *
12 - * this dynamic loader uses the system dynamic loading interface for shared
13 - * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
14 - * library as the file to be dynamically loaded.
15 - *
16 - * agc - I know this is all a bit crufty, but it does work, is fairly
17 - * portable, and works (the stipulation that the d.l. function must
18 - * begin with an underscore is fairly tricky, and some versions of
19 - * NetBSD (like 1.0, and 1.0A pre June 1995) have no dlerror.)
20 - */
21 -
22 +#ifdef HAVE_DLOPEN
23  /*
24   * In some older systems, the RTLD_NOW flag isn't defined and the mode
25   * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
26 @@ -47,14 +35,11 @@
27  #define RTLD_GLOBAL 0
28  #endif
29  
30 -#define                   pg_dlopen(f)    BSD44_derived_dlopen((f), RTLD_NOW | RTLD_GLOBAL)
31 -#define                   pg_dlsym                BSD44_derived_dlsym
32 -#define                   pg_dlclose      BSD44_derived_dlclose
33 -#define                   pg_dlerror      BSD44_derived_dlerror
34 +#define           pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
35 +#define           pg_dlsym                dlsym
36 +#define           pg_dlclose      dlclose
37 +#define           pg_dlerror      dlerror
38  
39 -char      *BSD44_derived_dlerror(void);
40 -void      *BSD44_derived_dlopen(const char *filename, int num);
41 -void      *BSD44_derived_dlsym(void *handle, const char *name);
42 -void           BSD44_derived_dlclose(void *handle);
43 +#endif /* HAVE_DLOPEN */
44  
45  #endif   /* PORT_PROTOS_H */