From da9211b06d299b6a10d7e86e738edb273d1cf80b Mon Sep 17 00:00:00 2001 From: deuce <> Date: Mon, 12 Sep 2005 17:39:55 +0000 Subject: [PATCH] Use -D_POSIX_PTHREAD_SEMANTICS even if not threads are being used to force the correct implementation of ctime_r() to be used. --- src/build/Common.gmake | 2 ++ src/xpdev/genwrap.h | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/build/Common.gmake b/src/build/Common.gmake index ff7d190829..2c7d305619 100644 --- a/src/build/Common.gmake +++ b/src/build/Common.gmake @@ -269,6 +269,8 @@ else XP_SEM := 1 MT_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS MT_CFLAGS += -DUSE_XP_SEMAPHORES + # This makes ctime_r() be the correct one. + CFLAGS += -D_POSIX_PTHREAD_SEMANTICS else # Linux / Other UNIX XP_SEM := 1 MT_CFLAGS += -DUSE_XP_SEMAPHORES diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h index c81475b318..1a132c7b50 100644 --- a/src/xpdev/genwrap.h +++ b/src/xpdev/genwrap.h @@ -277,13 +277,7 @@ DLLEXPORT int DLLCALL get_errno(void); #endif #if defined(__solaris__) - /* - * Solaris actually does have TWO ctime_r() implementations. - * there is proboble a CORRECT way of selecting one, but I don't - * have time to look it up right now. - * This is therefore, a Kludge. ToDo - */ - #define CTIME_R(x,y) __posix_ctime_r(x,y) + #define CTIME_R(x,y) ctime_r(x,y) /* #define CTIME_R(x,y) ctime_r(x,y,sizeof y) */ #else #define CTIME_R(x,y) ctime_r(x,y) -- GitLab