delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/07/09:44:09

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B4713A7.55AE01CB@acris.co.uk>
Date: Sat, 07 Jul 2001 14:50:31 +0100
From: Julian Hall <jules AT acris DOT co DOT uk>
X-Mailer: Mozilla 4.7 [en-gb] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: error in pthreads implementation?

--------------01CEA00FECB1F4D6DF155DD9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm currently working on getting gcj to work properly with cygwin, and
am working on threading code; I seem to have found a bug in the
implementation of pthreads.h.  This is quite possibly gcc 3.0 specific,
but when the macro pthread_cleanup_push(...) is used, I get the
following error from the compiler:

../../gcc-20010702/boehm-gc/cygwin_threads.c:455: function
`__cleanup_routine' is initialized like a variable

The attached diff seems to solve the problem, although it hasn't been
thoroughly tested.

Jules


--------------01CEA00FECB1F4D6DF155DD9
Content-Type: text/plain; charset=us-ascii;
 name="pthread.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pthread.diff"

--- pthread.h.orig	Sat Jul  7 12:47:48 2001
+++ pthread.h	Sat Jul  7 12:48:04 2001
@@ -99,11 +99,11 @@
 /* Macros for cleanup_push and pop; 
  * The function definitions are
 void pthread_cleanup_push (void (*routine)(void*), void *arg);
 void pthread_cleanup_pop (int execute);
 */
-typedef void __cleanup_routine_type (void *);
+typedef void (*__cleanup_routine_type) (void *);
 
 #define pthread_cleanup_push(fn, arg) { __cleanup_routine_type __cleanup_routine=fn; \
 void *__cleanup_param=arg;
 #define pthread_cleanup_pop(execute) if (execute) __cleanup_routine(__cleanup_param); }
 


--------------01CEA00FECB1F4D6DF155DD9
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------01CEA00FECB1F4D6DF155DD9--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019