Force a checkpoint in CREATE DATABASE before starting to copy the files,
[PostgreSQL.git] / src / backend / port / dynloader / ultrix4.c
blobab9894108564174e585d23a84a345480c0735855
1 /*-------------------------------------------------------------------------
3 * ultrix4.c
4 * This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
6 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
10 * IDENTIFICATION
11 * $PostgreSQL$
13 *-------------------------------------------------------------------------
15 #include "postgres.h"
17 #include "dl.h"
18 #include "utils/dynamic_loader.h"
20 extern char my_exec_path[];
22 void *
23 pg_dlopen(char *filename)
25 static int dl_initialized = 0;
26 void *handle;
29 * initializes the dynamic loader with the executable's pathname. (only
30 * needs to do this the first time pg_dlopen is called.)
32 if (!dl_initialized)
34 if (!dl_init(my_exec_path))
35 return NULL;
38 * if there are undefined symbols, we want dl to search from the
39 * following libraries also.
41 dl_setLibraries("/usr/lib/libm_G0.a:/usr/lib/libc_G0.a");
42 dl_initialized = 1;
46 * open the file. We do the symbol resolution right away so that we will
47 * know if there are undefined symbols. (This is in fact the same
48 * semantics as "ld -A". ie. you cannot have undefined symbols.
50 if ((handle = dl_open(filename, DL_NOW)) == NULL)
52 int count;
53 char **list = dl_undefinedSymbols(&count);
55 /* list the undefined symbols, if any */
56 if (count)
58 while (*list)
60 elog(WARNING, "\"%s\" is undefined", *list);
61 list++;
66 return (void *) handle;