Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b9cb132

Browse files
committed
Sync dlopen error handling for the *BSDs ... seems to me I've done this
before, but they were out of sync again. Per Kris Jurka.
1 parent 6e2ff6e commit b9cb132

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/backend/port/dynloader/freebsd.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*-
1+
/*
22
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
33
* Portions Copyright (c) 1990 The Regents of the University of California.
44
* All rights reserved.
@@ -37,12 +37,13 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
3737
#endif /* LIBC_SCCS and not lint */
3838

3939
#include "postgres.h"
40-
#include "dynloader.h"
4140

4241
#include <nlist.h>
4342
#include <link.h>
4443
#include <dlfcn.h>
4544

45+
#include "dynloader.h"
46+
4647
static char error_message[BUFSIZ];
4748

4849
char *
@@ -67,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
6768

6869
if ((vp = dlopen((char *) file, num)) == NULL)
6970
snprintf(error_message, sizeof(error_message),
70-
"dlopen '%s' failed. (%s)", file, dlerror());
71+
"dlopen (%s) failed: %s", file, dlerror());
7172
return vp;
7273
#endif
7374
}

src/backend/port/dynloader/netbsd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
6868

6969
if ((vp = dlopen((char *) file, num)) == NULL)
7070
snprintf(error_message, sizeof(error_message),
71-
"dlopen (%s) failed", file);
71+
"dlopen (%s) failed: %s", file, dlerror());
7272
return vp;
7373
#endif
7474
}

src/backend/port/dynloader/openbsd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
6868

6969
if ((vp = dlopen((char *) file, num)) == NULL)
7070
snprintf(error_message, sizeof(error_message),
71-
"dlopen (%s) failed", file);
71+
"dlopen (%s) failed: %s", file, dlerror());
7272
return vp;
7373
#endif
7474
}

0 commit comments

Comments
 (0)