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.
This commit is contained in:
parent
6e2ff6e89a
commit
b9cb132648
@ -1,4 +1,4 @@
|
|||||||
/*-
|
/*
|
||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1990 The Regents of the University of California.
|
* Portions Copyright (c) 1990 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -37,12 +37,13 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
|
|||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
#include "dynloader.h"
|
|
||||||
|
|
||||||
#include <nlist.h>
|
#include <nlist.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
#include "dynloader.h"
|
||||||
|
|
||||||
static char error_message[BUFSIZ];
|
static char error_message[BUFSIZ];
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -67,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
|
|||||||
|
|
||||||
if ((vp = dlopen((char *) file, num)) == NULL)
|
if ((vp = dlopen((char *) file, num)) == NULL)
|
||||||
snprintf(error_message, sizeof(error_message),
|
snprintf(error_message, sizeof(error_message),
|
||||||
"dlopen '%s' failed. (%s)", file, dlerror());
|
"dlopen (%s) failed: %s", file, dlerror());
|
||||||
return vp;
|
return vp;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
|
|||||||
|
|
||||||
if ((vp = dlopen((char *) file, num)) == NULL)
|
if ((vp = dlopen((char *) file, num)) == NULL)
|
||||||
snprintf(error_message, sizeof(error_message),
|
snprintf(error_message, sizeof(error_message),
|
||||||
"dlopen (%s) failed", file);
|
"dlopen (%s) failed: %s", file, dlerror());
|
||||||
return vp;
|
return vp;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
|
|||||||
|
|
||||||
if ((vp = dlopen((char *) file, num)) == NULL)
|
if ((vp = dlopen((char *) file, num)) == NULL)
|
||||||
snprintf(error_message, sizeof(error_message),
|
snprintf(error_message, sizeof(error_message),
|
||||||
"dlopen (%s) failed", file);
|
"dlopen (%s) failed: %s", file, dlerror());
|
||||||
return vp;
|
return vp;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user