PATCH: scheduler/pthread portability

Gerald Pfeifer pfeifer at dbai.tuwien.ac.at
Thu Mar 20 05:00:26 CST 2003


The patch below fixes the following problems as experienced on FreeBSD 4.8
which does not have struct _pthread_cleanup_buffer in any system header;
in fact, I'm relatively confident that using this is a Linuxism in Wine.

../../scheduler/pthread.c:436: warning: `struct _pthread_cleanup_buffer' declared inside parameter list
../../scheduler/pthread.c:436: warning: its scope is only this definition or declaration, which is probably not what you want.
../../scheduler/pthread.c:442: warning: `struct _pthread_cleanup_buffer' declared inside parameter list
../../scheduler/pthread.c:447: warning: `struct _pthread_cleanup_buffer' declared inside parameter list
../../scheduler/pthread.c:449: warning: passing arg 1 of `_pthread_cleanup_push' from incompatible pointer type
../../scheduler/pthread.c:452: warning: `struct _pthread_cleanup_buffer' declared inside parameter list
../../scheduler/pthread.c:454: warning: passing arg 1 of `_pthread_cleanup_pop' from incompatible pointer type

In any case, on Linux and other systems that might have this type, the
declaration is just a no-op.

Gerald

ChangeLog:
Forward-declare struct _pthread_cleanup_buffer, as it is Linux-specific
and not available in the headers of other systems.

Index: pthread.c
===================================================================
RCS file: /home/wine/wine/scheduler/pthread.c,v
retrieving revision 1.30
diff -u -3 -p -r1.30 pthread.c
--- pthread.c	30 Jan 2003 00:17:30 -0000	1.30
+++ pthread.c	20 Mar 2003 10:56:40 -0000
@@ -21,6 +21,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */

+struct _pthread_cleanup_buffer;
+
 #include "config.h"
 #include "wine/port.h"




More information about the wine-patches mailing list