summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/OS/os.h-Darwin3
-rw-r--r--src/src/drtables.c3
-rw-r--r--src/src/exim.c4
-rw-r--r--src/src/exim.h5
4 files changed, 12 insertions, 3 deletions
diff --git a/src/OS/os.h-Darwin b/src/OS/os.h-Darwin
index 95e088106..888b9c759 100644
--- a/src/OS/os.h-Darwin
+++ b/src/OS/os.h-Darwin
@@ -32,4 +32,7 @@ updating Exim to use the newer interface. */
#define BIND_8_COMPAT
+/* It's not .so for dynamic libraries on Darwin. */
+#define DYNLIB_FN_EXT "dylib"
+
/* End */
diff --git a/src/src/drtables.c b/src/src/drtables.c
index 018c496f8..37ecf4f4b 100644
--- a/src/src/drtables.c
+++ b/src/src/drtables.c
@@ -450,7 +450,8 @@ void init_lookup_list(void)
{
DIR *dd;
struct dirent *ent;
- const pcre *regex_islookupmod = regex_must_compile(US"\\.so$", FALSE, TRUE);
+ const pcre *regex_islookupmod = regex_must_compile(
+ US"\\." DYNLIB_FN_EXT "$", FALSE, TRUE);
int countmodules = 0;
int moduleerrors = 0;
struct lookupmodulestr *p;
diff --git a/src/src/exim.c b/src/src/exim.c
index a0b3e78b4..670319b98 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1078,9 +1078,9 @@ set_readline(char * (**fn_readline_ptr)(const char *),
void (**fn_addhist_ptr)(const char *))
{
void *dlhandle;
-void *dlhandle_curses = dlopen("libcurses.so", RTLD_GLOBAL|RTLD_LAZY);
+void *dlhandle_curses = dlopen("libcurses." DYNLIB_FN_EXT, RTLD_GLOBAL|RTLD_LAZY);
-dlhandle = dlopen("libreadline.so", RTLD_GLOBAL|RTLD_NOW);
+dlhandle = dlopen("libreadline." DYNLIB_FN_EXT, RTLD_GLOBAL|RTLD_NOW);
if (dlhandle_curses != NULL) dlclose(dlhandle_curses);
if (dlhandle != NULL)
diff --git a/src/src/exim.h b/src/src/exim.h
index e979175d1..a45ea0b30 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -48,6 +48,11 @@ making unique names. */
#define LOCALHOST_MAX 10
#endif
+/* If not overriden by os.h, dynamic libraries have filenames ending .so */
+#ifndef DYNLIB_FN_EXT
+# define DYNLIB_FN_EXT "so"
+#endif
+
/* ANSI C standard includes */
#include <ctype.h>