Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37fd198

Browse files
committed
Get rid of sunos4-only strerror() macro, and arrange to use the
implementation in backend/port/strerror.c if configure finds no strerrorin libc, same as we do for snprintf and inet_aton.
1 parent531cd44 commit37fd198

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

‎src/interfaces/libpq/Makefile

Lines changed: 11 additions & 5 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-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.47 2000/10/30 10:31:45 ishii Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.48 2001/01/20 23:07:27 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -20,7 +20,8 @@ SO_MINOR_VERSION= 1
2020
overrideCPPFLAGS += -DFRONTEND -I$(srcdir) -DSYSCONFDIR='"$(sysconfdir)"'
2121

2222
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o\
23-
pqexpbuffer.o dllist.o pqsignal.o$(SNPRINTF)$(INET_ATON)
23+
pqexpbuffer.o dllist.o pqsignal.o\
24+
$(INET_ATON)$(SNPRINTF)$(STRERROR)
2425

2526
ifdefMULTIBYTE
2627
OBJS+= common.o wchar.o
@@ -48,12 +49,16 @@ backend_src = $(top_srcdir)/src/backend
4849
dllist.c:$(backend_src)/lib/dllist.c
4950
rm -f$@&&$(LN_S)$<.
5051

52+
# this only gets done if configure finds system doesn't have inet_aton()
53+
inet_aton.c:$(backend_src)/port/inet_aton.c
54+
rm -f$@&&$(LN_S)$<.
55+
5156
# this only gets done if configure finds system doesn't have snprintf()
5257
snprintf.c:$(backend_src)/port/snprintf.c
5358
rm -f$@&&$(LN_S)$<.
5459

55-
# this only gets done if configure finds system doesn't haveinet_aton()
56-
inet_aton.c:$(backend_src)/port/inet_aton.c
60+
# this only gets done if configure finds system doesn't havestrerror()
61+
strerror.c:$(backend_src)/port/strerror.c
5762
rm -f$@&&$(LN_S)$<.
5863

5964
ifdefMULTIBYTE
@@ -77,7 +82,8 @@ uninstall: uninstall-lib
7782
rm -f$(addprefix$(DESTDIR)$(includedir)/, libpq-fe.h libpq-int.h pqexpbuffer.h)
7883

7984
cleandistcleanmaintainer-clean: clean-lib
80-
rm -f$(OBJS) dllist.c snprintf.c inet_aton.c common.c wchar.c conv.c big5.c
85+
rm -f$(OBJS) dllist.c common.c wchar.c conv.c big5.c
86+
rm -f$(OBJS) inet_aton.c snprintf.c strerror.c
8187

8288
dependdep:
8389
$(CC) -MM$(CFLAGS)*.c>depend

‎src/interfaces/libpq/libpq-int.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: libpq-int.h,v 1.29 2000/11/13 23:37:54 momjian Exp $
15+
* $Id: libpq-int.h,v 1.30 2001/01/20 23:07:27 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -334,19 +334,10 @@ extern intpqWriteReady(PGconn *conn);
334334
#defineDefaultAuthtype ""
335335
#defineDefaultPassword ""
336336

337-
/* supply an implementation of strerror() macro if system doesn't have it */
338-
#ifndefstrerror
339-
#if defined(sun)&& defined(__sparc__)&& !defined(__SVR4)
340-
externchar*sys_errlist[];
341-
342-
#definestrerror(A) (sys_errlist[(A)])
343-
#endif/* sunos4 */
344-
#endif/* !strerror */
345-
346337
/*
347338
* this is so that we can check is a connection is non-blocking internally
348339
* without the overhead of a function call
349340
*/
350-
#definepqIsnonblocking(conn)(conn->nonblocking)
341+
#definepqIsnonblocking(conn)((conn)->nonblocking)
351342

352343
#endif/* LIBPQ_INT_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp