mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Get rid of sunos4-only strerror() macro, and arrange to use the
implementation in backend/port/strerror.c if configure finds no strerror in libc, same as we do for snprintf and inet_aton.
This commit is contained in:
parent
531cd44fd1
commit
37fd198456
src/interfaces/libpq
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.47 2000/10/30 10:31:45 ishii Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.48 2001/01/20 23:07:27 tgl Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -20,7 +20,8 @@ SO_MINOR_VERSION= 1
|
||||
override CPPFLAGS += -DFRONTEND -I$(srcdir) -DSYSCONFDIR='"$(sysconfdir)"'
|
||||
|
||||
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
|
||||
pqexpbuffer.o dllist.o pqsignal.o $(SNPRINTF) $(INET_ATON)
|
||||
pqexpbuffer.o dllist.o pqsignal.o \
|
||||
$(INET_ATON) $(SNPRINTF) $(STRERROR)
|
||||
|
||||
ifdef MULTIBYTE
|
||||
OBJS+= common.o wchar.o
|
||||
@ -48,12 +49,16 @@ backend_src = $(top_srcdir)/src/backend
|
||||
dllist.c: $(backend_src)/lib/dllist.c
|
||||
rm -f $@ && $(LN_S) $< .
|
||||
|
||||
# this only gets done if configure finds system doesn't have inet_aton()
|
||||
inet_aton.c: $(backend_src)/port/inet_aton.c
|
||||
rm -f $@ && $(LN_S) $< .
|
||||
|
||||
# this only gets done if configure finds system doesn't have snprintf()
|
||||
snprintf.c: $(backend_src)/port/snprintf.c
|
||||
rm -f $@ && $(LN_S) $< .
|
||||
|
||||
# this only gets done if configure finds system doesn't have inet_aton()
|
||||
inet_aton.c: $(backend_src)/port/inet_aton.c
|
||||
# this only gets done if configure finds system doesn't have strerror()
|
||||
strerror.c: $(backend_src)/port/strerror.c
|
||||
rm -f $@ && $(LN_S) $< .
|
||||
|
||||
ifdef MULTIBYTE
|
||||
@ -77,7 +82,8 @@ uninstall: uninstall-lib
|
||||
rm -f $(addprefix $(DESTDIR)$(includedir)/, libpq-fe.h libpq-int.h pqexpbuffer.h)
|
||||
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS) dllist.c snprintf.c inet_aton.c common.c wchar.c conv.c big5.c
|
||||
rm -f $(OBJS) dllist.c common.c wchar.c conv.c big5.c
|
||||
rm -f $(OBJS) inet_aton.c snprintf.c strerror.c
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: libpq-int.h,v 1.29 2000/11/13 23:37:54 momjian Exp $
|
||||
* $Id: libpq-int.h,v 1.30 2001/01/20 23:07:27 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -334,19 +334,10 @@ extern int pqWriteReady(PGconn *conn);
|
||||
#define DefaultAuthtype ""
|
||||
#define DefaultPassword ""
|
||||
|
||||
/* supply an implementation of strerror() macro if system doesn't have it */
|
||||
#ifndef strerror
|
||||
#if defined(sun) && defined(__sparc__) && !defined(__SVR4)
|
||||
extern char *sys_errlist[];
|
||||
|
||||
#define strerror(A) (sys_errlist[(A)])
|
||||
#endif /* sunos4 */
|
||||
#endif /* !strerror */
|
||||
|
||||
/*
|
||||
* this is so that we can check is a connection is non-blocking internally
|
||||
* without the overhead of a function call
|
||||
*/
|
||||
#define pqIsnonblocking(conn) (conn->nonblocking)
|
||||
#define pqIsnonblocking(conn) ((conn)->nonblocking)
|
||||
|
||||
#endif /* LIBPQ_INT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user