aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/dynloader/freebsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/dynloader/freebsd.c')
-rw-r--r--src/backend/port/dynloader/freebsd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/port/dynloader/freebsd.c b/src/backend/port/dynloader/freebsd.c
index 58cf979df57..373d6aaec84 100644
--- a/src/backend/port/dynloader/freebsd.c
+++ b/src/backend/port/dynloader/freebsd.c
@@ -1,10 +1,10 @@
-/* src/backend/port/dynloader/freebsd.c */
-
/*
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
* Portions Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
+ * src/backend/port/dynloader/freebsd.c
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -57,7 +57,7 @@ BSD44_derived_dlerror(void)
void *
BSD44_derived_dlopen(const char *file, int num)
{
-#if defined(__mips__)
+#if !defined(HAVE_DLOPEN)
snprintf(error_message, sizeof(error_message),
"dlopen (%s) not supported", file);
return NULL;
@@ -74,7 +74,7 @@ BSD44_derived_dlopen(const char *file, int num)
void *
BSD44_derived_dlsym(void *handle, const char *name)
{
-#if defined(__mips__)
+#if !defined(HAVE_DLOPEN)
snprintf(error_message, sizeof(error_message),
"dlsym (%s) failed", name);
return NULL;
@@ -89,7 +89,7 @@ BSD44_derived_dlsym(void *handle, const char *name)
snprintf(buf, sizeof(buf), "_%s", name);
name = buf;
}
-#endif
+#endif /* !__ELF__ */
if ((vp = dlsym(handle, (char *) name)) == NULL)
snprintf(error_message, sizeof(error_message),
"dlsym (%s) failed", name);
@@ -100,8 +100,7 @@ BSD44_derived_dlsym(void *handle, const char *name)
void
BSD44_derived_dlclose(void *handle)
{
-#if defined(__mips__)
-#else
+#if defined(HAVE_DLOPEN)
dlclose(handle);
#endif
}