* Compaq C++ signals with -std strict_ansi
@ 2004-05-11 4:29 Tim Mooney
2004-05-12 18:13 ` Tom Woodburn
0 siblings, 1 reply; 2+ messages in thread
From: Tim Mooney @ 2004-05-11 4:29 UTC (permalink / raw)
Consider the trivial C++ program cxx_sig.cpp:
#include <iostream>
#include <sys/types.h>
#include <signal.h>
int main(int argc, char * argv[]) {
kill(0, SIGPIPE);
}
The program makes no sense, but it illustrates the problem I'm seeing: when
compiling using the Compaq C++ compiler and `-std strict_ansi', the
signal.h in /usr/lib/cmplrs/cxx/V6.5-041/include is eventually including
signal_cname_impl, and only the stripped-down set of signals from that
header file are visible (SIGPIPE and SIGCHLD, among many others, are not
defined).
In addition, certain functions that would be declared in the C signal.h
aren't present, specifically kill().
Can anyone explain why `-std strict_ansi' has such a stripped down set of
defines and declarations when signal.h is included?
Thanks,
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Compaq C++ signals with -std strict_ansi
2004-05-11 4:29 Compaq C++ signals with -std strict_ansi Tim Mooney
@ 2004-05-12 18:13 ` Tom Woodburn
0 siblings, 0 replies; 2+ messages in thread
From: Tom Woodburn @ 2004-05-12 18:13 UTC (permalink / raw)
Tim,
> Can anyone explain why `-std strict_ansi' has such a stripped
> down set of defines and declarations when signal.h is included?
That stripped down set is all that the C standard library allows
in <signal.h>. When you use the '-std strict_ansi' option, you're
telling the compiler to follow the C++ standard strictly and that
includes using a pure C name space (which is what the
__PURE_CNAME symbol in the header refers to).
For details, see the -pure_cname option in the cxx(1) man page.
Tom Woodburn
HP
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-12 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-11 4:29 Compaq C++ signals with -std strict_ansi Tim Mooney
2004-05-12 18:13 ` Tom Woodburn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox