aboutsummaryrefslogtreecommitdiff
path: root/src/bin/initdb/initdb.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-14 02:09:52 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-14 02:09:52 +0000
commit81e11f2d056c7966ce6ae54f41026434e2eb3b28 (patch)
tree423b95f916062d6c75aef060cbcb47698c752e7f /src/bin/initdb/initdb.c
parent03e5248d0f09f46b2fcaff266e7b2f0f997d6cfd (diff)
downloadpostgresql-81e11f2d056c7966ce6ae54f41026434e2eb3b28.tar.gz
postgresql-81e11f2d056c7966ce6ae54f41026434e2eb3b28.zip
Actually, instead of whining about how type internal might not safely store
a pointer, why don't we just fix that. Every known use of "internal" really means a pointer anyway.
Diffstat (limited to 'src/bin/initdb/initdb.c')
-rw-r--r--src/bin/initdb/initdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 0bf3a443686..04c29bec59e 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.163 2008/10/31 07:15:11 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.164 2008/11/14 02:09:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1331,6 +1331,12 @@ bootstrap_template1(char *short_version)
sprintf(buf, "%d", NAMEDATALEN);
bki_lines = replace_token(bki_lines, "NAMEDATALEN", buf);
+ sprintf(buf, "%d", (int) sizeof(Pointer));
+ bki_lines = replace_token(bki_lines, "SIZEOF_POINTER", buf);
+
+ bki_lines = replace_token(bki_lines, "ALIGNOF_POINTER",
+ (sizeof(Pointer) == 4) ? "i" : "d");
+
bki_lines = replace_token(bki_lines, "FLOAT4PASSBYVAL",
FLOAT4PASSBYVAL ? "true" : "false");