Menu

#192 commoncpp2 1.1.0 doesn't compile on gcc3.4.0

open
nobody
None
5
2012-11-20
2004-07-19
No

This is how it breaks:

g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src
-DCCXX_EXPORT_LIBRARY -I/usr/include/libxml2 -I../include
-O2 -pipe -mtune=k8 -D_GNU_SOURCE -MT thread.lo -MD -MP
-MF .deps/thread.Tpo -c thread.cpp -fPIC -DPIC -o .libs/thread.o
In file included from thread.cpp:43:
../include/cc++/thread.h:917: error: using typedef-name
`ost::Thread::Cancel' after `enum'
../include/cc++/thread.h:917: error: ISO C++ forbids
declaration of `_cancel' with no type
../include/cc++/thread.h: In member function
`ost::Thread::Cancel ost::Thread::getCancel()':
../include/cc++/thread.h:1195: error: invalid conversion from
`int' to `ost::Thread::Cancel'

The fix is really trivial:

--- commoncpp2-1.1.0.orig/include/cc++/thread.h 2004-07-19
23:29:08.534855632 +0200
+++ commoncpp2-1.1.0/include/cc++/thread.h 2004-07-19
23:40:13.105825488 +0200
@@ -914,7 +914,7 @@
static Thread* _main;

Thread *_parent;
- enum Cancel _cancel;
+ Cancel _cancel;
Semaphore *_start;

// private data

Discussion


Log in to post a comment.