Subject: [clisp-list] dynamic loading of shared libraries/objects

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Wed Apr 10 04:34:05 2002

Hi,

Peter Wood wrote:

> I needed to add -DHAVE_DLOPEN to the CFLAGS for compiling sysdll.c,
> (otherwise, although  it compiled fine,  #'foreign-library would not
> work.).
Blame sysdll.c for providing empty stubs when no good -D is provided.

The need for the right #define for every UNIX platform should be ripped off from XEmacs autoconf and ac.local.macros (or whatever) and be put into the config.h generator (is that ./configure?) to complete the support for UNIX.
Could somebody on UNIX please do this?

BTW, XEmacs has a newer sysdll.[ch] than on Reini's site:
I then need fewer -Dxyz (but others), witness my makefile.msvc now reads:

# http://cvs.xemacs.org/viewcvs.cgi/XEmacs/xemacs/src/sysdll.c
# don't -DUNICODE sysdll.c via CFLAGS or you'll get LoadLibraryW(), not -A
sysdll.obj : sysdll.c sysdll.h
	$(CC) -DHAVE_SHLIB -DWIN32_NATIVE $(CFLAGS) -UUNICODE -c sysdll.c

I now use sysdll-1.7.c and sysdll-1.3.h from XEmacs CVS

Regards,
	Jorg Hohle.

---

From: Reini Urban <[email-masked]>
Date: Wed Apr 10 07:05:00 2002

> # don't -DUNICODE sysdll.c via CFLAGS or you'll get LoadLibraryW(), not -A

but then you cannot load foreign libraries on win32 (namely japanese, chinese,
... filenames),
which you should be able to do on the new mule xemacs, ben wing is currently
preparing.

I wouldn't seperately mess with -D or -U UNICODE. the clisp config.h version
should be used instead.
otherwise filenames and strings cannot be copied from/to sysdll.

> I now use sysdll-1.7.c and sysdll-1.3.h from XEmacs CVS

The current version is quite unstable IMHO, considering the unicode and mule
changes.
I believe this will be settled after this summer.
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/