bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with sigsuspend in src/thread.cpp/src/thread.h


From: Mark Veltzer
Subject: Problem with sigsuspend in src/thread.cpp/src/thread.h
Date: Tue, 18 Dec 2001 18:27:00 +0200

A few technical details:
My version of Common C++ is 1.9.1 (latest I believe).
The platform is Linux, RH 7.2 almost a clean platform (no major modifications 
made).
Compiler: gcc 2.96 stock RH 7.2

The problem:

In the source src/thread.cpp the sigsuspend static function is only compiled 
after the following conditions:
#ifndef _SIG_THREAD_STOPCONT
#ifndef _THR_SUNOS5
Since I'm on a linux platform SIG_THREAD_STOPCONT is defined and therefore 
the function is not compiled (I believe this is the right thing to do).
On the other hand the brother source of this source "src/thread.h" declares 
this function with complete disregard to platform, SIG_THREAD_STOPCONT or any 
other variable. This creates a situation where a static function is declared 
and not defined which is a warning on the 2.96 compiler (when compiling with 
-Wall) and since the project I'm working on uses -Wall -Werror to compile 
this means that this prevents us from using Common C++.

The corrent thing to do (and the obvious one) would be to surround the 
declaration with the same #ifdefs as the definition.

A modified version of src/thread.h is attached. Please check my fix.

Thank you.

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]