diff options
author | rpj <rpj> | 1999-01-13 20:53:49 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-01-13 20:53:49 +0000 |
commit | d0b36781d64a52a93ffec89d7b89a243793ea835 (patch) | |
tree | 39cbab962690a0561820b7574e044e8e983d0c30 | |
parent | bc374000d4dda28009ceb1f03a5514687be8904c (diff) |
Thu Jan 14 14:27:13 1999 Ross Johnson <rpj@swan.canberra.edu.au>
* cleanup.c: Correct _cplusplus to __cplusplus wherever used.
* Makefile.in: Add CC=g++ and add -fhandle-exceptions to CFLAGS.
The derived Makefile will compile all units of the package as C++
so that those which include try/catch exception handling should work
properly. The package should compile ok if CC=gcc, however, exception
handling will not be included and thus thread cancellation, for
example, will not work.
* cleanup.c (_pthread_pop_cleanup): Add #warning to compile this
file as C++ if using a cygwin32 environment. Perhaps the whole package
should be compiled using g++ under cygwin.
* private.c (_pthread_threadStart): Change #error directive
into #warning and bracket for __CYGWIN__ and derivative compilers.
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | Makefile.in | 3 | ||||
-rw-r--r-- | cleanup.c | 14 | ||||
-rw-r--r-- | private.c | 4 |
4 files changed, 32 insertions, 7 deletions
@@ -1,3 +1,21 @@ +Thu Jan 14 14:27:13 1999 Ross Johnson <rpj@swan.canberra.edu.au> + + * cleanup.c: Correct _cplusplus to __cplusplus wherever used. + + * Makefile.in: Add CC=g++ and add -fhandle-exceptions to CFLAGS. + The derived Makefile will compile all units of the package as C++ + so that those which include try/catch exception handling should work + properly. The package should compile ok if CC=gcc, however, exception + handling will not be included and thus thread cancellation, for + example, will not work. + + * cleanup.c (_pthread_pop_cleanup): Add #warning to compile this + file as C++ if using a cygwin32 environment. Perhaps the whole package + should be compiled using g++ under cygwin. + + * private.c (_pthread_threadStart): Change #error directive + into #warning and bracket for __CYGWIN__ and derivative compilers. + Wed Jan 13 09:34:52 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * build.bat: Delete old binaries before compiling/linking. diff --git a/Makefile.in b/Makefile.in index dd2e1cc..89c72fe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,6 @@ +CC = g++ -CFLAGS = -I. -DHAVE_CONFIG_H -Wall +CFLAGS = -fhandle-exceptions -I. -DHAVE_CONFIG_H -Wall OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o \ exit.o fork.o global.o misc.o mutex.o private.o sched.o \ @@ -71,7 +71,7 @@ _pthread_pop_cleanup (int execute) #else /* _WIN32 */ -#ifdef _cplusplus +#ifdef __cplusplus try { @@ -89,20 +89,24 @@ _pthread_pop_cleanup (int execute) */ } -#else /* _cplusplus */ +#else /* __cplusplus */ +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +#warning Compile __FILE__ as C++ or thread cancellation will not work properly. +#endif + /* * Run the caller's cleanup routine and FIXME: hope for the best. */ (*cleanup->routine) (cleanup->arg); -#endif /* _cplusplus */ +#endif /* __cplusplus */ #endif /* _WIN32 */ } -#if !defined(_WIN32) && !defined(_cplusplus) +#if !defined(_WIN32) && !defined(__cplusplus) pthread_setspecific (_pthread_cleanupKey, cleanup->prev); @@ -161,7 +165,7 @@ _pthread_push_cleanup (_pthread_cleanup_t * cleanup, cleanup->routine = routine; cleanup->arg = arg; -#if !defined(_WIN32) && !defined(_cplusplus) +#if !defined(_WIN32) && !defined(__cplusplus) cleanup->prev = pthread_getspecific (_pthread_cleanupKey); @@ -163,7 +163,9 @@ _pthread_threadStart (ThreadParms * threadParms) #else /* __cplusplus */ -#error Warning: Compile __FILE__ as C++ or thread cancellation will not work. +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +#warning Compile __FILE__ as C++ or thread cancellation will not work properly. +#endif /* * Run the caller's routine; |