[Spread-users] Darwin/MacOS X port.

Julien Dufour julien at posse42.net
Thu Mar 8 07:07:33 EST 2001


I've ported the spread package 3.15.1 on MacOS X. I'm currently using the build 2E14 of MacOS X beta (the one of the Tokyo MacWorld) that is based on Darwin 1.2. I will make an update when the final version is released if needed.

This port didn't require a lot of work as the spread code is very portable. I just wrote a makefile and updated some source file.

* "rand48.h", "lrand48.c" and "_rand48.c"
The "lrand48" function is missing from Darwin standard library, so I added the source. I think I got these 3 files "rand48.h", "lrand48.c" and "_rand48.c" from the source of FreeBSD, but I'm not sure. They have not been modified.

* "DARWIN_makefile"
The Makefile is based on the BSDI_makefile. "gcc" is not present and the rand48 files have to be compiled and included in the build.

bash$ diff Darwin_makefile BSDI_makefile 
< CC=cc
> CC=gcc
< COBJS = lex.yy.o y.tab.o configuration.o skiplist.o _rand48.o lrand48.o
> COBJS = lex.yy.o y.tab.o configuration.o skiplist.o

* "arch.h"
I only added a define set for the architecture.

bash$ diff arch.h arch.h.ori 
< #ifdef __ppc__
< #ifdef __APPLE__
< #ifdef __MACH__
< #endif
< #endif
< #endif
< #define         INTSIZE32
< #define         ARCH_SCATTER_CONTROL
< #define         ARCH_ENDIAN     0x00000000
< #define         LOC_INLINE      __inline__
< #include        <sys/types.h>
< #include        <sys/uio.h>
< #define         ARCH_SCATTER_SIZE       1024 /* Should be UIO_MAXIOV when defining KERNEL before including uio.h */
< typedef         int sockopt_len_t;
< typedef         int socklen_t;
< #define         ERR_TIMEDOUT    ETIMEDOUT
< #endif

* "skiplist.c"
I added the signature of "lrand48" to avoid warning.

bash$ diff skiplist.c skiplist.c.ori 
< extern long lrand48(void);
< #endif

The attachement only contains added and modfied files.


Julien Dufour

More information about the Spread-users mailing list