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

Commita970a8c

Browse files
committed
Back out incorrect commit.
1 parenteef7e30 commita970a8c

File tree

13 files changed

+68
-229
lines changed

13 files changed

+68
-229
lines changed

‎configure

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20908,8 +20908,6 @@ fi
2090820908

2090920909

2091020910

20911-
if test x"$template" != x"win32"
20912-
then
2091320911
echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
2091420912
echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
2091520913
if test "${pgac_cv_func_posix_signals+set}" = set; then
@@ -20988,7 +20986,6 @@ echo "$as_me: error:
2098820986
" >&2;}
2098920987
{ (exit 1); exit 1; }; }
2099020988
fi
20991-
fi
2099220989

2099320990
if test $ac_cv_func_fseeko = yes; then
2099420991
# Check whether --enable-largefile or --disable-largefile was given.
@@ -22435,8 +22432,6 @@ done
2243522432
# defined. Cross compiling throws a warning.
2243622433
#
2243722434
if test "$enable_thread_safety_force" = yes; then
22438-
if test x"$template" != x"win32"
22439-
then
2244022435
{ echo "$as_me:$LINENO: WARNING:
2244122436
*** Skipping thread test program. --enable-thread-safety-force was used.
2244222437
*** Run the program in src/tools/thread on the your machine and add
@@ -22449,13 +22444,7 @@ echo "$as_me: WARNING:
2244922444
proper locking function calls to your applications to guarantee thread
2245022445
safety.
2245122446
" >&2;}
22452-
else
22453-
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22454-
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22455-
fi
2245622447
elif test "$enable_thread_safety" = yes; then
22457-
if test x"$template" != x"win32"
22458-
then
2245922448
echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
2246022449
echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
2246122450

@@ -22528,10 +22517,6 @@ rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftes
2252822517
fi
2252922518
CFLAGS="$_CFLAGS"
2253022519
LIBS="$_LIBS"
22531-
else
22532-
{ echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22533-
echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22534-
fi
2253522520
fi
2253622521

2253722522
# prepare build tree if outside source tree

‎configure.in

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.421 2005/08/23 20:45:04 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.422 2005/08/23 20:48:44 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1172,16 +1172,13 @@ AC_CHECK_TYPES([int8, uint8, int64, uint64], [], [],
11721172
AC_CHECK_TYPES(sig_atomic_t, [], [], [#include <signal.h>])
11731173

11741174

1175-
if test x"$template" != x"win32"
1176-
then
11771175
PGAC_FUNC_POSIX_SIGNALS
11781176
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
11791177
AC_MSG_ERROR([
11801178
*** Thread-safety requires POSIX signals, which are not supported by your
11811179
*** operating system.
11821180
])
11831181
fi
1184-
fi
11851182

11861183
if test $ac_cv_func_fseeko = yes; then
11871184
AC_SYS_LARGEFILE
@@ -1244,20 +1241,13 @@ AC_CHECK_PROGS(SGMLSPL, sgmlspl)
12441241
# defined. Cross compiling throws a warning.
12451242
#
12461243
if test "$enable_thread_safety_force" = yes; then
1247-
if test x"$template" != x"win32"
1248-
then
12491244
AC_MSG_WARN([
12501245
*** Skipping thread test program. --enable-thread-safety-force was used.
12511246
*** Run the program in src/tools/thread on the your machine and add
12521247
proper locking function calls to your applications to guarantee thread
12531248
safety.
12541249
])
1255-
else
1256-
AC_MSG_WARN([*** Skipping thread test on Win32])
1257-
fi
12581250
elif test "$enable_thread_safety" = yes; then
1259-
if test x"$template" != x"win32"
1260-
then
12611251
AC_MSG_CHECKING([thread safety of required library functions])
12621252

12631253
_CFLAGS="$CFLAGS"
@@ -1283,9 +1273,6 @@ AC_TRY_RUN([#include "$srcdir/src/tools/thread/thread_test.c"],
12831273
])])
12841274
CFLAGS="$_CFLAGS"
12851275
LIBS="$_LIBS"
1286-
else
1287-
AC_MSG_WARN([*** Skipping thread test on Win32])
1288-
fi
12891276
fi
12901277

12911278
# prepare build tree if outside source tree

‎doc/src/sgml/release.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.347 2005/08/23 20:45:05 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.348 2005/08/23 20:48:45 momjian Exp $
33
-->
44

55
<appendix id="release">
@@ -1078,7 +1078,7 @@ $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.347 2005/08/23 20:45:05 momjian
10781078
</itemizedlist>
10791079
</para>
10801080
<para>
1081-
<function>pg_complete_relation_size()</> includes indexes and TOAST
1081+
<function>complete_relation_size()</> includes indexes and TOAST
10821082
tables.
10831083
</para>
10841084
</listitem>

‎src/interfaces/libpq/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.135 2005/08/23 20:45:06 momjian Exp $
8+
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.136 2005/08/23 20:48:46 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -43,7 +43,9 @@ libpqrc.o: libpq.rc
4343
windres -i libpq.rc -o libpqrc.o
4444

4545
ifeq ($(enable_thread_safety), yes)
46+
# This doesn't work yet because configure test fails. 2004-06-19
4647
OBJS += pthread-win32.o
48+
PTHREAD_H_WIN32 = pthread.h
4749
endif
4850
endif
4951

@@ -57,7 +59,7 @@ SHLIB_LINK += -lshfolder -lwsock32 -lws2_32 $(filter -leay32 -lssleay32 -lcomerr
5759
endif
5860

5961

60-
all: def-files$(srcdir)/libpq.rc all-lib
62+
all:$(PTHREAD_H_WIN32)def-files$(srcdir)/libpq.rc all-lib
6163

6264
# Shared library stuff
6365
include$(top_srcdir)/src/Makefile.shlib
@@ -120,6 +122,11 @@ $(srcdir)/blibpqdll.def: exports.txt
120122
$(srcdir)/libpq.rc: libpq.rc.in$(top_builddir)/src/Makefile.global
121123
sed -e's/\(VERSION.*\),0 *$$/\1,'`date'+%y%j'| sed's/^0*//'`'/'<$<>$@
122124

125+
ifneq ($(PTHREAD_H_WIN32), "")
126+
pthread.h:$(top_srcdir)/src/interfaces/libpq/pthread.h.win
127+
rm -f$@&&$(LN_S)$<.
128+
endif
129+
123130
fe-connect.o: fe-connect.c$(top_builddir)/src/port/pg_config_paths.h
124131

125132
$(top_builddir)/src/port/pg_config_paths.h:

‎src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.318 2005/08/23 20:45:06 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.319 2005/08/23 20:48:46 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -55,12 +55,8 @@
5555
#endif
5656

5757
#ifdefENABLE_THREAD_SAFETY
58-
#ifdefWIN32
59-
#include"pthread-win32.h"
60-
#else
6158
#include<pthread.h>
6259
#endif
63-
#endif
6460

6561
#include"libpq/ip.h"
6662
#include"mb/pg_wchar.h"

‎src/interfaces/libpq/fe-exec.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.172 2005/08/23 20:45:07 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.173 2005/08/23 20:48:47 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2156,16 +2156,25 @@ PQoidValue(const PGresult *res)
21562156
char*endptr=NULL;
21572157
unsigned longresult;
21582158

2159-
if (!res||
2160-
!res->cmdStatus||
2161-
strncmp(res->cmdStatus,"INSERT ",7)!=0||
2162-
res->cmdStatus[7]<'0'||
2163-
res->cmdStatus[7]>'9')
2159+
if (!res|| !res->cmdStatus||strncmp(res->cmdStatus,"INSERT ",7)!=0)
21642160
returnInvalidOid;
21652161

2162+
#ifdefWIN32
2163+
SetLastError(0);
2164+
#else
2165+
errno=0;
2166+
#endif
21662167
result=strtoul(res->cmdStatus+7,&endptr,10);
21672168

2168-
if (!endptr|| (*endptr!=' '&&*endptr!='\0'))
2169+
if (!endptr|| (*endptr!=' '&&*endptr!='\0')
2170+
#ifndefWIN32
2171+
/*
2172+
*On WIN32, errno is not thread-safe and GetLastError() isn't set by
2173+
*strtoul(), so we can't check on this platform.
2174+
*/
2175+
||errno==ERANGE
2176+
#endif
2177+
)
21692178
returnInvalidOid;
21702179
else
21712180
return (Oid)result;

‎src/interfaces/libpq/fe-misc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
2525
* IDENTIFICATION
26-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.117 2005/08/23 20:45:07 momjian Exp $
26+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.118 2005/08/23 20:48:47 momjian Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -1133,11 +1133,7 @@ libpq_gettext(const char *msgid)
11331133
if (!already_bound)
11341134
{
11351135
/* dgettext() preserves errno, but bindtextdomain() doesn't */
1136-
#ifdefWIN32
1137-
intsave_errno=GetLastError();
1138-
#else
1139-
intsave_errno=errno;
1140-
#endif
1136+
intsave_errno=errno;
11411137
constchar*ldir;
11421138

11431139
already_bound= true;

‎src/interfaces/libpq/fe-print.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* didn't really belong there.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.61 2005/08/23 20:45:07 momjian Exp $
13+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.62 2005/08/23 20:48:47 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -88,7 +88,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
8888
inttotal_line_length=0;
8989
intusePipe=0;
9090
char*pagerenv;
91-
#if defined(ENABLE_THREAD_SAFETY)&& !defined(WIN32)
91+
#ifdefENABLE_THREAD_SAFETY
9292
sigset_tosigset;
9393
boolsigpipe_masked= false;
9494
boolsigpipe_pending;
@@ -189,14 +189,14 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
189189
if (fout)
190190
{
191191
usePipe=1;
192-
#ifndefWIN32
193192
#ifdefENABLE_THREAD_SAFETY
194193
if (pq_block_sigpipe(&osigset,&sigpipe_pending)==0)
195194
sigpipe_masked= true;
196195
#else
196+
#ifndefWIN32
197197
oldsigpipehandler=pqsignal(SIGPIPE,SIG_IGN);
198-
#endif/* ENABLE_THREAD_SAFETY */
199-
#endif/* WIN32 */
198+
#endif
199+
#endif
200200
}
201201
else
202202
fout=stdout;
@@ -311,15 +311,16 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
311311
_pclose(fout);
312312
#else
313313
pclose(fout);
314-
314+
#endif
315315
#ifdefENABLE_THREAD_SAFETY
316316
/* we can't easily verify if EPIPE occurred, so say it did */
317317
if (sigpipe_masked)
318318
pq_reset_sigpipe(&osigset,sigpipe_pending, true);
319319
#else
320+
#ifndefWIN32
320321
pqsignal(SIGPIPE,oldsigpipehandler);
321-
#endif/* ENABLE_THREAD_SAFETY */
322-
#endif/* WIN32 */
322+
#endif
323+
#endif
323324
}
324325
if (po->html3&& !po->expanded)
325326
fputs("</table>\n",fout);

‎src/interfaces/libpq/fe-secure.c

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.68 2005/08/23 20:45:07 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.69 2005/08/23 20:48:47 momjian Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -103,12 +103,8 @@
103103
#include<sys/stat.h>
104104

105105
#ifdefENABLE_THREAD_SAFETY
106-
#ifdefWIN32
107-
#include"pthread-win32.h"
108-
#else
109106
#include<pthread.h>
110107
#endif
111-
#endif
112108

113109
#ifndefHAVE_STRDUP
114110
#include"strdup.h"
@@ -392,21 +388,20 @@ ssize_t
392388
pqsecure_write(PGconn*conn,constvoid*ptr,size_tlen)
393389
{
394390
ssize_tn;
395-
396-
#ifndefWIN32
391+
397392
#ifdefENABLE_THREAD_SAFETY
398393
sigset_tosigmask;
399394
boolsigpipe_pending;
400395
boolgot_epipe= false;
401396

402-
403397
if (pq_block_sigpipe(&osigmask,&sigpipe_pending)<0)
404398
return-1;
405399
#else
400+
#ifndefWIN32
406401
pqsigfuncoldsighandler=pqsignal(SIGPIPE,SIG_IGN);
407-
#endif/* ENABLE_THREAD_SAFETY */
408-
#endif/* WIN32 */
409-
402+
#endif
403+
#endif
404+
410405
#ifdefUSE_SSL
411406
if (conn->ssl)
412407
{
@@ -436,7 +431,7 @@ pqsecure_write(PGconn *conn, const void *ptr, size_t len)
436431

437432
if (n==-1)
438433
{
439-
#if defined(ENABLE_THREAD_SAFETY)&& !defined(WIN32)
434+
#ifdefENABLE_THREAD_SAFETY
440435
if (SOCK_ERRNO==EPIPE)
441436
got_epipe= true;
442437
#endif
@@ -478,19 +473,19 @@ pqsecure_write(PGconn *conn, const void *ptr, size_t len)
478473
#endif
479474
{
480475
n=send(conn->sock,ptr,len,0);
481-
#if defined(ENABLE_THREAD_SAFETY)&& !defined(WIN32)
476+
#ifdefENABLE_THREAD_SAFETY
482477
if (n<0&&SOCK_ERRNO==EPIPE)
483478
got_epipe= true;
484479
#endif
485480
}
486-
487-
#ifndefWIN32
481+
488482
#ifdefENABLE_THREAD_SAFETY
489483
pq_reset_sigpipe(&osigmask,sigpipe_pending,got_epipe);
490484
#else
485+
#ifndefWIN32
491486
pqsignal(SIGPIPE,oldsighandler);
492-
#endif/* ENABLE_THREAD_SAFETY */
493-
#endif/* WIN32 */
487+
#endif
488+
#endif
494489

495490
returnn;
496491
}
@@ -1237,7 +1232,7 @@ PQgetssl(PGconn *conn)
12371232

12381233
#endif/* USE_SSL */
12391234

1240-
#if defined(ENABLE_THREAD_SAFETY)&& !defined(WIN32)
1235+
#ifdefENABLE_THREAD_SAFETY
12411236

12421237
/*
12431238
*Block SIGPIPE for this thread. This prevents send()/write() from exiting

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp