aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-07-04 19:54:51 +0000
committerBruce Momjian <bruce@momjian.us>2005-07-04 19:54:51 +0000
commit4f979e8bacbfd29db2a1ed8bd75f7527858e48c4 (patch)
tree2428067cd6e2ae8c0a8f965abaaef07bb6c34c84
parent8a794511520b55852ba4184449a0b67f8be6bcbd (diff)
downloadpostgresql-4f979e8bacbfd29db2a1ed8bd75f7527858e48c4.tar.gz
postgresql-4f979e8bacbfd29db2a1ed8bd75f7527858e48c4.zip
Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.
-rw-r--r--src/include/port.h4
-rw-r--r--src/timezone/Makefile4
-rw-r--r--src/timezone/pgtz.h12
3 files changed, 5 insertions, 15 deletions
diff --git a/src/include/port.h b/src/include/port.h
index 61b566d4021..e352ef2d0b1 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.76 2005/06/27 02:04:25 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.77 2005/07/04 19:54:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -108,7 +108,7 @@ extern int pg_strncasecmp(const char *s1, const char *s2, size_t n);
extern unsigned char pg_toupper(unsigned char ch);
extern unsigned char pg_tolower(unsigned char ch);
-#ifdef USE_SNPRINTF
+#if defined(USE_SNPRINTF) && !defined(NO_PGPORT)
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
extern int pg_snprintf(char *str, size_t count, const char *fmt,...)
/* This extension allows gcc to check the format string */
diff --git a/src/timezone/Makefile b/src/timezone/Makefile
index 5baa8b94d97..fa3b9dadff8 100644
--- a/src/timezone/Makefile
+++ b/src/timezone/Makefile
@@ -4,7 +4,7 @@
# Makefile for the timezone library
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.19 2005/07/04 02:55:59 neilc Exp $
+# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.20 2005/07/04 19:54:51 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -12,7 +12,7 @@ subdir = src/timezone
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := $(CPPFLAGS) -I$(srcdir)
+override CPPFLAGS := $(CPPFLAGS) -I$(srcdir) -DNO_PGPORT
# files to build into backend
OBJS= localtime.o strftime.o pgtz.o
diff --git a/src/timezone/pgtz.h b/src/timezone/pgtz.h
index 3354cfa8c83..986122efd35 100644
--- a/src/timezone/pgtz.h
+++ b/src/timezone/pgtz.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.13 2005/07/04 18:21:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.14 2005/07/04 19:54:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,16 +18,6 @@
#include "tzfile.h"
-/*
- * Prevent the use of /port functions because
- * the are not included in this binary.
- */
-#undef vsnprintf
-#undef snprintf
-#undef sprintf
-#undef fprintf
-#undef printf
-
extern char *pg_TZDIR(void);
#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))