Skip to content

Commit 4f979e8

Browse files
committed
Restructure zic #define fprintf checks to use a NO_PGPORT macro instead.
1 parent 8a79451 commit 4f979e8

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

src/include/port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.76 2005/06/27 02:04:25 neilc Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.77 2005/07/04 19:54:51 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -108,7 +108,7 @@ extern int pg_strncasecmp(const char *s1, const char *s2, size_t n);
108108
extern unsigned char pg_toupper(unsigned char ch);
109109
extern unsigned char pg_tolower(unsigned char ch);
110110

111-
#ifdef USE_SNPRINTF
111+
#if defined(USE_SNPRINTF) && !defined(NO_PGPORT)
112112
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
113113
extern int pg_snprintf(char *str, size_t count, const char *fmt,...)
114114
/* This extension allows gcc to check the format string */

src/timezone/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
# Makefile for the timezone library
55

66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.19 2005/07/04 02:55:59 neilc Exp $
7+
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.20 2005/07/04 19:54:51 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/timezone
1212
top_builddir = ../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
override CPPFLAGS := $(CPPFLAGS) -I$(srcdir)
15+
override CPPFLAGS := $(CPPFLAGS) -I$(srcdir) -DNO_PGPORT
1616

1717
# files to build into backend
1818
OBJS= localtime.o strftime.o pgtz.o

src/timezone/pgtz.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.13 2005/07/04 18:21:40 momjian Exp $
12+
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.14 2005/07/04 19:54:51 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -18,16 +18,6 @@
1818

1919
#include "tzfile.h"
2020

21-
/*
22-
* Prevent the use of /port functions because
23-
* the are not included in this binary.
24-
*/
25-
#undef vsnprintf
26-
#undef snprintf
27-
#undef sprintf
28-
#undef fprintf
29-
#undef printf
30-
3121
extern char *pg_TZDIR(void);
3222

3323
#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy