Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* cxx -std strict_ansi and C header files
@ 2004-01-20  3:46 Bryan Walsh
  2004-01-20  7:40 ` David Donald Hooton
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan Walsh @ 2004-01-20  3:46 UTC (permalink / raw)


Hi All,

I've been playing around with the -std strict_ansi flag with cxx version 
6.5.  One thing that it does, besides changing the way the standard 
header files   (iostream,cmath,etc) work, is that it also affects a 
number of other header files in weird ways.  For example:

-including semaphore.h, yields undefined macro definitons
-including cstdlib, or stlib.h no longer prototypes the srandom and 
random functions.
-including setjmp.h, no longer prototypes the sigsetjmp and siglongjmp 
functions.

Has anybody else experienced these difficulties? Does anybody have any 
workarounds?

Any help would be appreciated!

Thank You,

Bryan Walsh



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cxx -std strict_ansi and C header files
  2004-01-20  3:46 cxx -std strict_ansi and C header files Bryan Walsh
@ 2004-01-20  7:40 ` David Donald Hooton
  0 siblings, 0 replies; 2+ messages in thread
From: David Donald Hooton @ 2004-01-20  7:40 UTC (permalink / raw)


Bryan Walsh <simguy@cox.net> wrote:
> I've been playing around with the -std strict_ansi flag with cxx version 
> 6.5.  One thing that it does, besides changing the way the standard 
> header files   (iostream,cmath,etc) work, is that it also affects a 
> number of other header files in weird ways...
> Has anybody else experienced these difficulties? Does anybody have any 
> workarounds?

I ran into these when I worked in the HP Tru64 group.  One thing to
remember is that certain system functions or header files are only
supported under certain standards.  A later-edition POSIX function may
simply not be available for strict_ansi, which implies an earlier
standard.  One work-around could be to hack up your own versions of
the headers, removing the the standards-related #ifdef statements from
around the definitions and adding a "-I dir" flag to your command
line, where "dir" is the directory containing the modified headers.
Several iterations may be required to catch all the dependencies.

							- DDH



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-20  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20  3:46 cxx -std strict_ansi and C header files Bryan Walsh
2004-01-20  7:40 ` David Donald Hooton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox