summaryrefslogtreecommitdiff
path: root/src/tools/ccsym
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2015-01-20 13:02:35 -0500
committerBruce Momjian <bruce@momjian.us>2015-01-20 13:02:58 -0500
commitf259e71dbe98f653182f0c710143487a0188fbc5 (patch)
treedd7fc7f9824622c73a5081213616d17f907ad245 /src/tools/ccsym
parentf32a1fa462c88676105445f26885d7a0656b6806 (diff)
downloadpostgresql-f259e71dbe98f653182f0c710143487a0188fbc5.tar.gz
tools/ccsym: update for modern versions of gcc
This dumps the predefined preprocessor macros
Diffstat (limited to 'src/tools/ccsym')
-rwxr-xr-xsrc/tools/ccsym16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/tools/ccsym b/src/tools/ccsym
index bf4a92fafb..972c8433b4 100755
--- a/src/tools/ccsym
+++ b/src/tools/ccsym
@@ -1,16 +1,4 @@
#!/bin/sh
-# src/tools/ccsym
-
-trap "rm -f /tmp/$$.*" 0 1 2 3 15
-cd /tmp
-cat >$$.c <<EOF
-extern int foo;
-EOF
-for i in `cc -v -c $$.c 2>&1`
-do
- case "$i" in
- -D*) echo "$i" | sed 's/^-D//';;
- -A*) echo "$i" | sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
- esac
-done
+# display gcc predefined preprocessor macros
+gcc -dM -E - < /dev/null