Index: wine/Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.133
diff -u -u -r1.133 Make.rules.in
--- wine/Make.rules.in	11 Nov 2002 20:25:54 -0000	1.133
+++ wine/Make.rules.in	24 Nov 2002 18:15:08 -0000
@@ -72,6 +72,7 @@
 LDPATH    = @LDPATH@
 DLLDIR    = $(TOPOBJDIR)/dlls
 LIBWINE   = -L$(TOPOBJDIR)/library -lwine
+LIBPTHREAD= -L$(TOPOBJDIR)/pthread -lwine_pthread
 LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode
 LIBUUID   = -L$(TOPOBJDIR)/ole -lwine_uuid
 
Index: wine/Makefile.in
===================================================================
RCS file: /home/wine/wine/Makefile.in,v
retrieving revision 1.135
diff -u -u -r1.135 Makefile.in
--- wine/Makefile.in	11 Nov 2002 21:14:28 -0000	1.135
+++ wine/Makefile.in	24 Nov 2002 18:15:08 -0000
@@ -34,6 +34,7 @@
 	miscemu \
 	ole \
 	programs \
+	pthread \
 	server \
 	tools \
 	unicode
@@ -44,6 +45,7 @@
 	documentation \
 	library \
 	miscemu \
+	pthread \
 	programs \
 	server \
 	unicode
@@ -108,16 +110,17 @@
 # Dependencies between directories
 
 all: $(SUBDIRS)
-dlls: library ole tools unicode
+dlls: library ole pthread tools unicode
 server: library tools unicode
 miscemu programs: dlls library ole tools unicode
 tools: library unicode
 
-dlls/__install__: library ole tools unicode
+dlls/__install__: library ole pthread tools unicode
 server/__install__: library tools unicode
 miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install__
 library/__install__: library
 ole/__install__: ole
+pthread/__install__: pthread
 tools/__install__: tools
 unicode/__install__: unicode
 
Index: wine/configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.100
diff -u -u -r1.100 configure.ac
--- wine/configure.ac	23 Nov 2002 01:20:02 -0000	1.100
+++ wine/configure.ac	24 Nov 2002 18:15:13 -0000
@@ -836,9 +836,9 @@
 
 case $build_os in
   cygwin*|mingw32*)
-    AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"") ;;
+    AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/pthread:\$(TOOLSDIR)/unicode:\$\$PATH\"") ;;
   *)
-    AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"") ;;
+    AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/pthread:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"") ;;
 esac
 
 dnl Mingw needs explicit msvcrt for linking libwine
@@ -1535,6 +1535,7 @@
 programs/winepath/Makefile
 programs/winhelp/Makefile
 programs/winver/Makefile
+pthread/Makefile
 server/Makefile
 tools/Makefile
 tools/widl/Makefile
Index: wine/dlls/Makedll.rules.in
===================================================================
RCS file: /home/wine/wine/dlls/Makedll.rules.in,v
retrieving revision 1.39
diff -u -u -r1.39 Makedll.rules.in
--- wine/dlls/Makedll.rules.in	21 Nov 2002 03:47:45 -0000	1.39
+++ wine/dlls/Makedll.rules.in	24 Nov 2002 18:15:13 -0000
@@ -16,7 +16,7 @@
 SPEC_DEF    = $(MAINSPEC).def
 WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16)
 ALL_OBJS    = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o
-ALL_LIBS    = $(LIBWINE) $(EXTRALIBS) $(LIBS)
+ALL_LIBS    = $(LIBWINE) $(LIBPTHREAD) $(EXTRALIBS) $(LIBS)
 
 all: $(MODULE)$(DLLEXT)
 
--- /dev/null	Sun Nov 24 19:35:59 2002
+++ wine/pthread/Makefile.in	Sun Nov 24 15:14:03 2002
@@ -0,0 +1,56 @@
+DEFS      = @DLLFLAGS@ -D__WINE__
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+LIBEXT    = @LIBEXT@
+MODULE    = none
+SOVERSION = 1.0
+SONAME    = libwine_pthread.so
+
+C_SRCS = \
+	main.c
+
+all: libwine_pthread.$(LIBEXT)
+
+@MAKE_RULES@
+
+libwine_pthread.so.$(SOVERSION): $(OBJS)
+	$(LDSHARED) $(OBJS) -o $@
+
+libwine_pthread.so: libwine_pthread.so.$(SOVERSION)
+	$(RM) $@ && $(LN_S) libwine_pthread.so.$(SOVERSION) $@
+
+libwine_pthread.a: $(OBJS)
+	$(RM) $@
+	$(AR) $@ $(OBJS)
+	$(RANLIB) $@
+
+# --export-all doesn't work correctly because of dllwrap's bug
+libwine_pthread.dll: $(OBJS) wine_pthread.def
+	$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SRCDIR)/wine_pthread.def --implib libwine_pthread.a -o libwine_pthread.dll $(OBJS)
+
+.PHONY: install_so install_a install_dll
+
+install_so: libwine_pthread.so.$(SOVERSION) dummy
+	$(MKINSTALLDIRS) $(libdir)
+	$(INSTALL_PROGRAM) libwine_pthread.so.$(SOVERSION) $(libdir)/libwine_pthread.so.$(SOVERSION)
+	cd $(libdir) && $(RM) libwine_pthread.so && $(LN_S) libwine_pthread.so.$(SOVERSION) libwine_pthread.so
+
+install_a: libwine_pthread.a dummy
+	$(MKINSTALLDIRS) $(libdir)
+	$(INSTALL_DATA) libwine_pthread.a $(libdir)/libwine_pthread.a
+
+install_dll: libwine_pthread.dll dummy
+	$(MKINSTALLDIRS) $(libdir)
+	$(INSTALL_DATA) libwine_pthread.dll $(libdir)/libwine_pthread.dll
+
+install:: $(LIBEXT:%=install_%)
+
+uninstall::
+	$(RM) $(libdir)/libwine_pthread.a $(libdir)/libwine_pthread.dll $(libdir)/libwine_pthread.so $(libdir)/libwine_pthread.so.$(SOVERSION)
+
+clean::
+	$(RM) libwine_pthread.so.$(SOVERSION)
+
+### Dependencies:
--- /dev/null	Sun Nov 24 19:35:59 2002
+++ wine/pthread/main.c	Sun Nov 24 15:38:23 2002
@@ -0,0 +1,49 @@
+/*
+ * pthread emulation
+ *
+ * Copyright 2002 Patrik Stridall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <pthread.h>
+
+int pthread_key_create(pthread_key_t *key, void (*destr_function)(void *))
+{
+    return 0;
+}
+
+void *pthread_getspecific(pthread_key_t key)
+{
+    return NULL;
+}
+
+int pthread_mutex_lock(pthread_mutex_t *mutex)
+{
+    return 0;
+}
+
+int pthread_mutex_unlock(pthread_mutex_t *mutex)
+{
+    return 0;
+}
+
+int pthread_setspecific(pthread_key_t key, const void *pointer)
+{
+    return 0;
+}
