Commit b9cb1326 authored by Tom Lane's avatar Tom Lane

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.
parent 6e2ff6e8
/*-
/*
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
......@@ -37,12 +37,13 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#endif /* LIBC_SCCS and not lint */
#include "postgres.h"
#include "dynloader.h"
#include <nlist.h>
#include <link.h>
#include <dlfcn.h>
#include "dynloader.h"
static char error_message[BUFSIZ];
char *
......@@ -67,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
if ((vp = dlopen((char *) file, num)) == NULL)
snprintf(error_message, sizeof(error_message),
"dlopen '%s' failed. (%s)", file, dlerror());
"dlopen (%s) failed: %s", file, dlerror());
return vp;
#endif
}
......
......@@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
if ((vp = dlopen((char *) file, num)) == NULL)
snprintf(error_message, sizeof(error_message),
"dlopen (%s) failed", file);
"dlopen (%s) failed: %s", file, dlerror());
return vp;
#endif
}
......
......@@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
if ((vp = dlopen((char *) file, num)) == NULL)
snprintf(error_message, sizeof(error_message),
"dlopen (%s) failed", file);
"dlopen (%s) failed: %s", file, dlerror());
return vp;
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment