summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pthread.h40
-rw-r--r--tests/test.h6
2 files changed, 6 insertions, 40 deletions
diff --git a/pthread.h b/pthread.h
index a5fe78c..f29f372 100644
--- a/pthread.h
+++ b/pthread.h
@@ -1228,46 +1228,6 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (HANDLE waitHandle,
#endif
/*
- * WIN32 C runtime library had been made thread-safe
- * without affecting the user interface. Provide
- * mappings from the UNIX thread-safe versions to
- * the standard C runtime library calls.
- * Only provide function mappings for functions that
- * actually exist on WIN32.
- */
-
-#if !defined(__MINGW32__)
-#define strtok_r( _s, _sep, _lasts ) \
- ( *(_lasts) = strtok( (_s), (_sep) ) )
-#endif /* !__MINGW32__ */
-
-#define asctime_r( _tm, _buf ) \
- ( strcpy( (_buf), asctime( (_tm) ) ), \
- (_buf) )
-
-#define ctime_r( _clock, _buf ) \
- ( strcpy( (_buf), ctime( (_clock) ) ), \
- (_buf) )
-
-/*
- * gmtime(tm) and localtime(tm) return 0 if tm represents
- * a time prior to 1/1/1970.
- */
-#define gmtime_r( _clock, _result ) \
- ( gmtime( (_clock) ) \
- ? (*(_result) = *gmtime( (_clock) ), (_result) ) \
- : (0) )
-
-#define localtime_r( _clock, _result ) \
- ( localtime( (_clock) ) \
- ? (*(_result) = *localtime( (_clock) ), (_result) ) \
- : (0) )
-
-#define rand_r( _seed ) \
- ( _seed == _seed? rand() : rand() )
-
-
-/*
* Some compiler environments don't define some things.
*/
#if defined(__BORLANDC__)
diff --git a/tests/test.h b/tests/test.h
index 56fa335..dc63eb4 100644
--- a/tests/test.h
+++ b/tests/test.h
@@ -47,6 +47,12 @@
#define PTW32_THREAD_NULL_ID {NULL,0}
+/*
+ * Some non-thread POSIX API substitutes
+ */
+#define rand_r( _seed ) \
+ ( _seed == _seed? rand() : rand() )
+
#if defined(__MINGW32__)
#include <stdint.h>
#elif defined(__BORLANDC__)