Not tested the drtables.c change for dynamically loaded lookups, only
the readline loading for -be interactive mode.
Heavily based on revision 40f9a89a from Simon Arlott's tree.
Bugzilla 97.
+PP/04 Use .dylib instead of .so for dynamic library loading on MacOS.
+
Exim version 4.76
-----------------
#define BIND_8_COMPAT
+/* It's not .so for dynamic libraries on Darwin. */
+#define DYNLIB_FN_EXT "dylib"
+
/* End */
{
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;
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)
#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>