summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--builddmc.bat9
-rw-r--r--config.h7
-rw-r--r--create.c2
-rw-r--r--pthread_exit.c2
-rw-r--r--pthread_join.c2
-rw-r--r--ptw32_threadDestroy.c2
-rw-r--r--ptw32_threadStart.c6
-rw-r--r--ptw32_throw.c2
9 files changed, 35 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 61854fa..fbb0aee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-07-01 Anuj Goyal <anuj.goyal at gmail.com>
+
+ * builddmc.bat: New; Windows bat file to build the library.
+ * config.h (__DMC__): Support for Digital Mars compiler.
+ * create.c (__DMC__): Likewise.
+ * pthread_exit.c (__DMC__): Likewise.
+ * pthread_join.c (__DMC__): Likewise.
+ * ptw32_threadDestroy.c (__DMC__): Likewise.
+ * ptw32_threadStart.c (__DMC__): Likewise.
+ * ptw32_throw.c (__DMC__): Likewise.
+
2004-06-29 Anuj Goyal <anuj.goyal at gmail.com>
* pthread.h (__DMC__): Initial support for Digital Mars compiler.
diff --git a/builddmc.bat b/builddmc.bat
new file mode 100644
index 0000000..3edbaeb
--- /dev/null
+++ b/builddmc.bat
@@ -0,0 +1,9 @@
+; Build the pthreads library with the Digital Mars Compiler
+;
+set DMCDIR=c:\dm
+
+; RELEASE
+%DMCDIR%\bin\dmc -D_WIN32_WINNT -D_MT -DHAVE_CONFIG_H -I.;c:\dm\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/NODEBUG -L/SU:WINDOWS
+
+; DEBUG
+%DMCDIR%\bin\dmc -g -D_WIN32_WINNT -D_MT -DHAVE_CONFIG_H -I.;c:\dm\include -o+all -WD pthread.c user32.lib+kernel32.lib+wsock32.lib -L/impl -L/SU:WINDOWS
diff --git a/config.h b/config.h
index 4759662..508a613 100644
--- a/config.h
+++ b/config.h
@@ -80,4 +80,11 @@
#ifdef __WATCOMC__
#endif
+#ifdef __DMC__
+#define HAVE_SIGNAL_H
+#define HAVE_C_INLINE
+#endif
+
+
+
#endif
diff --git a/create.c b/create.c
index d6988b7..2ef4597 100644
--- a/create.c
+++ b/create.c
@@ -168,7 +168,7 @@ pthread_create (pthread_t * tid,
* finished with it here.
*/
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
thread->threadH = threadH = (HANDLE) _beginthreadex ((void *) NULL, /* No security info */
(unsigned) stackSize, /* default stack size */
diff --git a/pthread_exit.c b/pthread_exit.c
index 302135b..c8fb4fb 100644
--- a/pthread_exit.c
+++ b/pthread_exit.c
@@ -88,7 +88,7 @@ pthread_exit (void *value_ptr)
* Implicit POSIX handles are cleaned up in ptw32_throw() now.
*/
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
_endthreadex ((unsigned) value_ptr);
#else
_endthread ();
diff --git a/pthread_join.c b/pthread_join.c
index fa9c168..97cbd51 100644
--- a/pthread_join.c
+++ b/pthread_join.c
@@ -118,7 +118,7 @@ pthread_join (pthread_t thread, void **value_ptr)
if (result == 0)
{
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
if (value_ptr != NULL
&& !GetExitCodeThread (thread->threadH, (LPDWORD) value_ptr))
diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c
index 9432e2e..58b23ff 100644
--- a/ptw32_threadDestroy.c
+++ b/ptw32_threadDestroy.c
@@ -72,7 +72,7 @@ ptw32_threadDestroy (pthread_t thread)
(void) pthread_mutex_destroy(&threadCopy.cancelLock);
(void) pthread_mutex_destroy(&threadCopy.threadLock);
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
/*
* See documentation for endthread vs endthreadex.
* Don't close the Win32 handle of implicit POSIX threads
diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c
index 4bc0b19..8d48621 100644
--- a/ptw32_threadStart.c
+++ b/ptw32_threadStart.c
@@ -119,7 +119,7 @@ ptw32_terminate ()
#endif
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__))
unsigned
__stdcall
#else
@@ -355,7 +355,7 @@ ptw32_threadStart (void *vthreadParms)
ptw32_callUserDestroyRoutines (self);
}
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
_endthreadex ((unsigned) status);
#else
_endthread ();
@@ -365,7 +365,7 @@ ptw32_threadStart (void *vthreadParms)
* Never reached.
*/
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
return (unsigned) status;
#endif
diff --git a/ptw32_throw.c b/ptw32_throw.c
index 17d610d..8f67069 100644
--- a/ptw32_throw.c
+++ b/ptw32_throw.c
@@ -87,7 +87,7 @@ ptw32_throw (DWORD exception)
pthread_win32_thread_detach_np ();
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
+#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
_endthreadex (exitCode);
#else
_endthread ();