From 6eb5bba145940501ca972e4243d7417c8120d569 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 6 Aug 2000 12:15:47 +0000 Subject: 2000-08-06 Ross Johnson * pthread.h: Remove #warning - VC++ doesn't accept it. 2000-08-05 Ross Johnson * pthread.h (PtW32CatchAll): Add macro. When compiling applications using VC++ with C++ EH rather than SEH 'PtW32CatchAll' must be used in place of any 'catch( ... )' if the application wants pthread cancelation or pthread_exit() to work. 2000-08-03 Ross Johnson * pthread.h: Add a base class Pthread_exception for library internal exceptions and change the "catch" re-define macro to use it. 2000-08-02 Ross Johnson * GNUmakefile (CFLAGS): Add -mthreads. Add new targets to generate cpp and asm output. * sync.c (pthread_join): Remove dead code. tests: 2000-08-06 Ross Johnson * ccl.bat: Add /nologo to remove extraneous output. * exception1.c (exceptionedThread): Init 'dummy'; put expression into if condition to prevent optimising away; remove unused variable. * cancel4.c (mythread): Cast return value to avoid warnings. * cancel2.c (mythread): Missing #endif. * condvar9.c (mythread): Cast return value to avoid warnings. * condvar8.c (mythread): Cast return value to avoid warnings. * condvar7.c (mythread): Cast return value to avoid warnings. * cleanup3.c (mythread): Cast return value to avoid warnings. * cleanup2.c (mythread): Cast return value to avoid warnings. * cleanup1.c (mythread): Cast return value to avoid warnings. * condvar5.c (mythread): Cast return value to avoid warnings. * condvar3.c (mythread): Cast return value to avoid warnings. * condvar6.c (mythread): Cast return value to avoid warnings. * condvar4.c (mythread): Cast return value to avoid warnings. 2000-08-05 Ross Johnson * cancel2.c: Use PtW32CatchAll macro if defined. * exception1.c: Use PtW32CatchAll macro if defined. 2000-08-02 Ross Johnson * tsd1.c: Fix typecasts of &result [g++ is now very fussy]. * test.h (assert): Return 0's explicitly to allay g++ errors. * join2.c: Add explicit typecasts. * join1.c: Add explicit typecasts. * join0.c: Add explicit typecasts. * eyal1.c: Add explicit typecasts. * count1.c (main): Add type cast to remove g++ parse warning [gcc-2.95.2 seems to have tightened up on this]. * Makefile (GLANG): Use c++ explicitly. Remove MSVC sections (was commented out). Add target to generate cpp output. --- GNUmakefile | 148 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 77 insertions(+), 71 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 4c94cc7..1405942 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,71 +1,77 @@ -# -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright (C) 1998 -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 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 -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library 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 -# - -GLANG = c++ - -RM = erase - -CC = gcc - -AR = ar - -LD = gcc -mdll - -OPT = -g -O2 -x $(GLANG) - -## Mingw32 -CFLAGS = $(OPT) -I. -DHAVE_CONFIG_H -Wall - -## Cygwin G++ -#CFLAGS = $(OPT) -fhandle-exceptions -I. -DHAVE_CONFIG_H -Wall - -OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \ - exit.o fork.o global.o misc.o mutex.o private.o rwlock.o \ - sched.o semaphore.o signal.o sync.o tsd.o - -INCL = implement.h semaphore.h pthread.h windows.h - -DLL = pthread.dll - -LIB = libpthread32.a - - -all: $(LIB) - -$(LIB): $(DLL) - dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) - -.SUFFIXES: .dll - -$(DLL): $(OBJS) - $(LD) -o $@ $^ -Wl,--base-file,$*.base - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ - $(LD) -o $@ $^ -Wl,--base-file,$*.base,$*.exp - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ - $(LD) -o $@ $^ -Wl,$*.exp - -clean: - -$(RM) *~ - -$(RM) $(LIB) - -$(RM) *.o - -$(RM) *.exe - -$(RM) $(DLL) - -$(RM) $(DLL:.dll=.base) - -$(RM) $(DLL:.dll=.exp) +# +# Pthreads-win32 - POSIX Threads Library for Win32 +# Copyright (C) 1998 +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library 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 +# + +GLANG = c++ + +RM = erase + +CC = gcc + +AR = ar + +LD = gcc -mdll + +OPT = -g -O2 -x $(GLANG) + +## Mingw32 +CFLAGS = $(OPT) -I. -mthreads -DHAVE_CONFIG_H -Wall + +## Cygwin G++ +#CFLAGS = $(OPT) -fhandle-exceptions -I. -DHAVE_CONFIG_H -Wall + +OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \ + exit.o fork.o global.o misc.o mutex.o private.o rwlock.o \ + sched.o semaphore.o signal.o sync.o tsd.o + +INCL = implement.h semaphore.h pthread.h windows.h + +DLL = pthread.dll + +LIB = libpthread32.a + + +all: $(LIB) + +$(LIB): $(DLL) + dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) + +%.pre: %.c + $(CC) -E -o $@ $(CFLAGS) $^ + +%.s: %.c + $(CC) -c $(CFLAGS) -Wa,-ahl $^ > $@ + +.SUFFIXES: .dll + +$(DLL): $(OBJS) + $(LD) -o $@ $^ -Wl,--base-file,$*.base + dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + $(LD) -o $@ $^ -Wl,--base-file,$*.base,$*.exp + dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + $(LD) -o $@ $^ -Wl,$*.exp + +clean: + -$(RM) *~ + -$(RM) $(LIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) $(DLL) + -$(RM) $(DLL:.dll=.base) + -$(RM) $(DLL:.dll=.exp) -- cgit v1.2.3