aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-04-13 17:09:45 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-04-13 17:09:45 +0000
commita69c5fc81a72bded28c717ef3e8dd17bb4953823 (patch)
treee8dd2388bc4362ec4e166191ee7a80b123b34a73 /src
parentf2b98c46241a817cec7303c31215dce747f7b70c (diff)
downloadpostgresql-a69c5fc81a72bded28c717ef3e8dd17bb4953823.tar.gz
postgresql-a69c5fc81a72bded28c717ef3e8dd17bb4953823.zip
Add ccsym to tools to determine OS/compiler specific symbols
Change BSD44_derived to __FreeBSD__ in numutils.c (need to know what NetBSD is referred to as...someone?)
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/numutils.c4
-rwxr-xr-xsrc/tools/ccsym12
2 files changed, 14 insertions, 2 deletions
diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c
index 0f17fa1d2f8..2704b39ee01 100644
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.8 1996/12/28 02:12:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.9 1997/04/13 17:09:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -137,7 +137,7 @@ ltoa(int32 l, char *a)
int
ftoa(double value, char *ascii, int width, int prec1, char format)
{
-#if defined(BSD44_derived) || \
+#if defined(__FreeBSD__) || \
defined(bsdi) || \
defined(bsdi_2_1)
char out[256];
diff --git a/src/tools/ccsym b/src/tools/ccsym
new file mode 100755
index 00000000000..d5294c99b92
--- /dev/null
+++ b/src/tools/ccsym
@@ -0,0 +1,12 @@
+#!/bin/sh
+/bin/cat >tmp.c <<EOF
+extern int foo;
+EOF
+for i in `cc -v -c tmp.c 2>&1`
+do
+ case "$i" in
+ -D*) echo "$i" | /usr/bin/sed 's/^-D//';;
+ -A*) /bin/test "2.7.2.1" && echo "$i" | /usr/bin/sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
+ esac
+done
+/bin/rm -f try.c