diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-02-25 21:35:57 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-02-25 16:35:57 -0500 |
commit | 001e880a269a8b586ee074918b6707edb190ea7c (patch) | |
tree | 58be9a3cd9cef0f5c823ad1215f0017ac36649c8 /gcc/fixinc.wrap | |
parent | 6646d96c23467215ae2284060dbf4719c7adac08 (diff) | |
download | gcc-001e880a269a8b586ee074918b6707edb190ea7c.zip gcc-001e880a269a8b586ee074918b6707edb190ea7c.tar.gz gcc-001e880a269a8b586ee074918b6707edb190ea7c.tar.bz2 |
fixinc.wrap: Also handle struct queue in sys/stream.h.
* fixinc.wrap: Also handle struct queue in sys/stream.h.
* fixinc.svr4: Likewise.
From-SVN: r25449
Diffstat (limited to 'gcc/fixinc.wrap')
-rwxr-xr-x | gcc/fixinc.wrap | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/fixinc.wrap b/gcc/fixinc.wrap index 406c87e..bb783f9 100755 --- a/gcc/fixinc.wrap +++ b/gcc/fixinc.wrap @@ -53,6 +53,35 @@ __EOF__ fi fi +# Similarly for struct queue in sys/stream.h. +file=sys/stream.h +if [ -r $INPUT/$file ]; then + echo Checking $INPUT/$file + if grep 'struct[ ]*queue' $INPUT/$file >/dev/null + then + echo Fixed $file + mkdir -p $LIB/`dirname $file` + rm -f $LIB/$file + cat <<'__EOF__' >$LIB/$file +#ifndef _SYS_STREAM_H_WRAPPER +#ifdef __cplusplus +# define queue __stream_queue +#endif +#include_next <sys/stream.h> +#ifdef __cplusplus +# undef queue +#endif +#define _SYS_STREAM_H_WRAPPER +#endif /* _SYS_STREAM_H_WRAPPER */ +__EOF__ + # Define _SYS_STREAM_H_WRAPPER at the end of the wrapper, not the start, + # so that if #include_next gets another instance of the wrapper, + # this will follow the #include_next chain until we arrive at + # the real <sys/stream.h>. + chmod a+r $LIB/$file + fi +fi + # Avoid the definition of the bool type in the Solaris 2.x curses.h when using # g++, since it's now an official type in the C++ language. file=curses.h |