summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-28 21:38:00 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-03-28 21:38:00 +0000
commit2bbbf84ff8a0e0995e9dbabca0c2a2acc0642ac6 (patch)
treed83c35b8f632115856e31db4d4d39959c0c2b571 /gcc
parent0ecd6142651849a1fdea5ed347d3e06cc0c286f3 (diff)
downloadgcc-2bbbf84ff8a0e0995e9dbabca0c2a2acc0642ac6.tar.gz
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/fixinc.svr441
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4
index 8ba925dfdf7..b943302dd15 100755
--- a/gcc/fixinc.svr4
+++ b/gcc/fixinc.svr4
@@ -319,6 +319,47 @@ EOF
rm -f /tmp/$base
fi
+# Likewise fix the definition of NULL in <dbm.h> so that it is conditional
+# and so that it is correct for both C and C++.
+
+file=dbm.h
+base=`basename $file`
+if [ -r ${LIB}/$file ]; then
+ file_to_fix=${LIB}/$file
+else
+ if [ -r ${INPUT}/$file ]; then
+ file_to_fix=${INPUT}/$file
+ else
+ file_to_fix=""
+ fi
+fi
+if [ \! -z "$file_to_fix" ]; then
+ echo Checking $file_to_fix
+ cp $file_to_fix /tmp/$base
+ chmod +w /tmp/$base
+ ex /tmp/$base <<EOF
+ /^#define[ ]*NULL[ ]*((char \*) 0)$/c
+#ifndef NULL
+#ifdef __cplusplus
+#define __NULL_TYPE
+#else /* !defined(__cplusplus) */
+#define __NULL_TYPE (void *)
+#endif /* !defined(__cplusplus) */
+#define NULL (__NULL_TYPE 0)
+#endif /* !defined(NULL) */
+.
+ wq
+EOF
+ if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
+ echo No change needed in $file_to_fix
+ else
+ echo Fixed $file_to_fix
+ rm -f ${LIB}/$file
+ cp /tmp/$base ${LIB}/$file
+ fi
+ rm -f /tmp/$base
+fi
+
# Add some missing declarations to <sys/mman.h>.
file=sys/mman.h