--- otp_src_R8B-0/erts/emulator/sys/unix/sys.c.ORIG Mon Oct 8 10:25:08 2001 +++ otp_src_R8B-0/erts/emulator/sys/unix/sys.c Sun Dec 2 22:07:36 2001 @@ -1707,9 +1707,10 @@ #else /* Interface function available to driver writers */ -int driver_select(this_port, fd, mode, on) -int this_port, fd, mode, on; -{ +int driver_select(ErlDrvPort ix, ErlDrvEvent e, int mode, int on) + { + int this_port = (int)ix; + int fd = (int)e; #if defined(FD_SETSIZE) if (fd >= FD_SETSIZE) { erl_exit(1,"driver_select called with too large file descriptor %d" --- otp_src_R8B-0/erts/configure.in.ORIG Mon Oct 8 10:36:08 2001 +++ otp_src_R8B-0/erts/configure.in Mon Dec 3 23:24:18 2001 @@ -785,7 +773,7 @@ darwin*) # Mach-O linker, a shared lib and a loadable # object file is not the same thing. - DED_LDFLAGS="-bundle -undefined suppress" + DED_LDFLAGS="-bundle -flat_namespace -undefined suppress" DED_CFLAGS="$DED_CFLAGS -fno-common" ;; *) --- otp_src_R8B-0/README.ORIG Sun Oct 14 18:50:50 2001 +++ otp_src_R8B-0/README Mon Dec 3 00:53:18 2001 @@ -218,10 +218,12 @@ Use the "gnutar" command to unpack the sources. -The 'mnesia_session' application currenctly does not build on Darwin. -After "configure" but before "make" do +Some applications don't build on Darwin. After "configure" but before +"make" do touch lib/mnesia_session/SKIP + touch lib/megaco/SKIP + touch lib/gs/SKIP The 'orber' Erlang/OTP application will not be build because of a bug in the configure script. @@ -237,6 +239,10 @@ Make sure that the command "hostname" return a valid fully qualified host name (this is configured in "/etc/hostconfig"). + +To create a shared library you link using "cc" and the flags +"-bundle -undefined suppress". You also include "-fno-common" +in CFLAGS when compiling. Use ".so" as the library suffix. Caveats --- otp_src_R8B-0/lib/erl_interface/src/portability.h.ORIG Mon Oct 8 10:52:15 2001 +++ otp_src_R8B-0/lib/erl_interface/src/portability.h Mon Dec 3 23:12:30 2001 @@ -63,9 +63,9 @@ /* * Magic for link-time warnings and suchlike. */ -#if defined(__GNUC__) /* GNU assembler syntax */ +#if defined(__GNUC__) && !defined(__APPLE__) /* GNU assembler syntax */ -#if defined(__ELF__) || defined(__APPLE__) +#if defined(__ELF__) /* Named sections (COFF should be O.K.) */ /*