~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/tools/ccsym

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# src/tools/ccsym
 
4
 
 
5
trap "rm -f /tmp/$$.*" 0 1 2 3 15
 
6
cd /tmp
 
7
cat >$$.c <<EOF
 
8
extern int foo;
 
9
EOF
 
10
for i in `cc -v -c $$.c 2>&1`
 
11
do
 
12
        case "$i" in
 
13
        -D*) echo "$i" | sed 's/^-D//';;
 
14
        -A*) echo "$i" | sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
 
15
        esac
 
16
done