Skip to content

Commit 974c5a8

Browse files
committed
ecpg/pgtypeslib seems to need snprintf.c pulled in, too.
1 parent 0d2aad8 commit 974c5a8

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.26 2005/03/14 17:27:50 momjian Exp $
7+
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.27 2005/12/06 05:26:21 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -17,28 +17,30 @@ SO_MAJOR_VERSION= 2
1717
SO_MINOR_VERSION= 1
1818
DLTYPE= library
1919

20-
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include \
21-
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) \
22-
$(PTHREAD_CFLAGS) -DFRONTEND
20+
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \
21+
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
22+
override CFLAGS += $(PTHREAD_CFLAGS)
2323

24-
# Need to recomple any libpgport object files
25-
LIBS := $(patsubst -lpgport,, $(LIBS))
24+
# Need to recompile any libpgport object files
25+
LIBS := $(filter-out -lpgport, $(LIBS))
2626

2727
SHLIB_LINK += -lm
2828

2929
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
3030
pgstrcasecmp.o \
31-
$(filter rint.o, $(LIBOBJS))
31+
$(filter rint.o snprintf.o, $(LIBOBJS))
3232

3333
all: all-lib
3434

3535
# Shared library stuff
3636
include $(top_srcdir)/src/Makefile.shlib
3737

38-
rint.c: %.c : $(top_srcdir)/src/port/%.c
39-
rm -f $@ && $(LN_S) $< .
38+
# We use some port modules verbatim, but since we need to
39+
# compile with appropriate options to build a shared lib, we can't
40+
# necessarily use the same object files as the backend uses. Instead,
41+
# symlink the source files in here and build our own object file.
4042

41-
pgstrcasecmp.c: %.c : $(top_srcdir)/src/port/%.c
43+
pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
4244
rm -f $@ && $(LN_S) $< .
4345

4446
install: all installdirs install-lib
@@ -49,7 +51,7 @@ installdirs:
4951
uninstall: uninstall-lib
5052

5153
clean distclean maintainer-clean: clean-lib
52-
rm -f $(OBJS) rint.c pgstrcasecmp.c
54+
rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c
5355

5456
depend dep:
5557
$(CC) -MM $(CFLAGS) *.c >depend

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