--- cf/FreeBSD.cf.orig Fri Apr 2 13:47:10 2004 +++ cf/FreeBSD.cf Fri Jun 18 19:26:35 2004 @@ -109,32 +109,20 @@ # endif # define HasPosixThreads YES # define ThreadedX YES -# define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE -/* - * FreeBSD has tread-safe api but no getpwnam_r yet. - */ +# define SystemMTDefines %%PTHREAD_CFLAGS%% # define HasThreadSafeAPI YES # if OSRelVersion < 501000 # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI # else # define MTSafeAPIDefines -DXUSE_MTSAFE_API # endif -# if HasLibPthread -# define ThreadsLibraries -lpthread +# define ThreadsLibraries %%PTHREAD_LIBS%% +# if OSRelVersion >= 500043 +# define BuildThreadStubLibrary NO +# define NeedUIThrStubs NO # else -# if OSRelVersion >= 500043 -# define BuildThreadStubLibrary NO -# define NeedUIThrStubs NO -# else -# define BuildThreadStubLibrary YES -# define NeedUIThrStubs YES -# endif -# if (OSRelVersion >= 500016) -# define ThreadsLibraries -lc_r -# define SharedGLReqs $(LDPRELIBS) $(XLIB) -lc -# else -# define ThreadsLibraries -pthread -# endif +# define BuildThreadStubLibrary YES +# define NeedUIThrStubs YES # define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB) # define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB) # endif @@ -359,7 +347,7 @@ #ifndef LibraryRpathLoadFlags # if UseRpath # if UseElfFormat -# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH) +# define LibraryRpathLoadFlags -Wl,-rpath $(USRLIBDIRPATH) # else # define LibraryRpathLoadFlags -R $(USRLIBDIRPATH) # endif @@ -455,14 +443,14 @@ /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */ #ifndef DefaultGcc2i386Opt #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5) -#define DefaultGcc2i386Opt -O2 GccAliasingArgs +#define DefaultGcc2i386Opt #endif #endif #ifdef i386Architecture # define OptimizedCDebugFlags DefaultGcc2i386Opt #else -# define OptimizedCDebugFlags -O +# define OptimizedCDebugFlags #endif #ifndef PreIncDir