This is the mail archive of the pthreads-win32@sourceware.cygnus.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc mingw/msvcrt patch


The following patch fixes a few nits and now all tests pass when built
under Mingw/MSVCRT (it needs a thread-safe runtime, and I'll put that
up for ftp later).

The autoconfig stuff and Makefile.in need some polishing.

I'll send a patch for mingw/crtdll later.

Tue Aug 17 20:00:08 1999  Mumit Khan  <khan@xraylith.wisc.edu>

	* Makefile.in (LD): Delete entry point.
	* acconfig.h (STDCALL): Delete unused macro.
	* configure.in: Remove test for STDCALL.
	* config.h.in: Regenerate.
	* errno.c (_errno): Fix self type.
	* pthread.h (PT_STDCALL): Move from here to
	* implement.h (PT_STDCALL): here.
	(_pthread_threadStart): Fix prototype.
	* private.c (_pthread_threadStart): Likewise.

Index: Makefile.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 Makefile.in
--- Makefile.in	1999/08/17 00:50:05	1.1.1.1
+++ Makefile.in	1999/08/18 00:27:51
@@ -24,7 +24,7 @@ CC	= g++
 
 AR	= ar
 
-LD	= gcc -mdll -e _DllMain@12
+LD	= gcc -mdll
 
 OPT	= -g -O2
 
Index: acconfig.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/acconfig.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 acconfig.h
--- acconfig.h	1999/08/17 00:50:05	1.1.1.1
+++ acconfig.h	1999/08/18 00:36:26
@@ -1,5 +1,3 @@
 /* Do we know about the C type sigset_t? */
 #undef HAVE_SIGSET_T
 
-/* Do we have the `_stdcall' keyword? */
-#undef STDCALL
Index: config.h.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/config.h.in,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 config.h.in
--- config.h.in	1999/08/17 00:50:05	1.1.1.1
+++ config.h.in	1999/08/18 00:37:58
@@ -3,9 +3,6 @@
 /* Do we know about the C type sigset_t? */
 #undef HAVE_SIGSET_T
 
-/* Do we have the `_stdcall' keyword? */
-#undef STDCALL
-
 /* Define if you have the <signal.h> header file.  */
 #undef HAVE_SIGNAL_H
 
Index: configure.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/configure.in,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 configure.in
--- configure.in	1999/08/17 00:50:05	1.1.1.1
+++ configure.in	1999/08/18 00:37:52
@@ -15,15 +15,6 @@ then
     AC_DEFINE(HAVE_SIGSET_T)
   fi
 fi
-AC_CACHE_CHECK(for _stdcall keyword, p32_cv_stdcall,
-  AC_TRY_COMPILE( ,[int __stdcall foo();],
-    p32_cv_stdcall=yes, p32_cv_stdcall=no))
-
-if test x$p32_cv_stdcall = xyes ; then
-  AC_DEFINE(STDCALL, __stdcall)
-else
-  AC_DEFINE(STDCALL,)
-fi
 
 AC_CHECK_HEADERS(windows.h,,AC_MSG_WARN([Target system must be Win32]))
 AC_OUTPUT(Makefile)
Index: errno.c
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/errno.c,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 errno.c
--- errno.c	1999/08/17 00:50:05	1.1.1.1
+++ errno.c	1999/08/18 00:29:03
@@ -59,7 +59,7 @@ static int reallyBad    = ENOMEM;
 
 int * _errno( void )
 {
-  pthread_t       *self;
+  pthread_t       self;
   int             *result;
         
   if( ( self = pthread_self() ) == NULL )
Index: implement.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/implement.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 implement.h
--- implement.h	1999/08/17 00:50:05	1.1.1.1
+++ implement.h	1999/08/18 00:34:22
@@ -27,6 +27,8 @@
 #ifndef _IMPLEMENT_H
 #define _IMPLEMENT_H
 
+#define PT_STDCALL __stdcall
+
 #include <semaphore.h>
 
 typedef enum {
@@ -319,7 +321,7 @@ void _pthread_threadDestroy (pthread_t t
 
 void _pthread_cleanupStack (void);
 
-void *_pthread_threadStart (ThreadParms * threadParms);
+unsigned PT_STDCALL _pthread_threadStart (ThreadParms * threadParms);
 
 void _pthread_callUserDestroyRoutines (pthread_t thread);
 
Index: private.c
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/private.c,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 private.c
--- private.c	1999/08/17 00:50:05	1.1.1.1
+++ private.c	1999/08/18 00:33:19
@@ -159,7 +159,7 @@ ExceptionFilter (EXCEPTION_POINTERS * ep
 
 #endif /* _MSC_VER */
 
-void *
+unsigned PT_STDCALL
 _pthread_threadStart (ThreadParms * threadParms)
 {
   pthread_t self;
@@ -275,7 +275,7 @@ _pthread_threadStart (ThreadParms * thre
   /*
    * Never reached.
    */
-  return (status);
+  return (unsigned) status;
 
 }				/* _pthread_threadStart */
 
Index: pthread.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/pthreads/pthread.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 pthread.h
--- pthread.h	1999/08/17 00:50:05	1.1.1.1
+++ pthread.h	1999/08/18 00:34:27
@@ -253,12 +253,6 @@ struct timespec {
 #define FALSE	0
 #endif /* !TRUE */
 
-#ifdef __MINGW32__
-#define PT_STDCALL
-#else
-#define PT_STDCALL __stdcall
-#endif
-
 /* 
  * This should perhaps be in autoconf or 
  * possibly fixed in Mingw32 to

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]