summaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixinc.wrap
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-10 07:49:54 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-10 07:49:54 +0000
commit9fb87eaca8cb7448fd9422c2559c1eb41033da93 (patch)
treeb9475e6582e92adf77a1ef81aba5a96b9a9f98d6 /gcc/fixinc/fixinc.wrap
parent92085b1be48523f12eb568d76b2f4033a38eefe6 (diff)
downloadgcc-9fb87eaca8cb7448fd9422c2559c1eb41033da93.tar.gz
Patches from superior directory
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc/fixinc.wrap')
-rwxr-xr-xgcc/fixinc/fixinc.wrap29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/fixinc/fixinc.wrap b/gcc/fixinc/fixinc.wrap
index 4be9f132a1a..ac9b5c92861 100755
--- a/gcc/fixinc/fixinc.wrap
+++ b/gcc/fixinc/fixinc.wrap
@@ -72,6 +72,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