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

Commitb549816

Browse files
committed
Allow AIX to use --enable-thread-safety by passing PTHREAD_LIBS to
binary compiles, and adjust configure tests for AIX.
1 parentcd380b9 commitb549816

File tree

5 files changed

+49
-35
lines changed

5 files changed

+49
-35
lines changed

‎config/c-compiler.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros to detect C compiler features
2-
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.13 2004/10/20 02:12:07 neilc Exp $
2+
# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.14 2004/12/16 17:48:25 momjian Exp $
33

44

55
# PGAC_C_SIGNED
@@ -26,20 +26,20 @@ AC_DEFUN([PGAC_TYPE_64BIT_INT],
2626
define([Ac_cachevar],[translit([pgac_cv_type_$1_64],[ *],[_p])])dnl
2727
AC_CACHE_CHECK([whether$1 is 64 bits],[Ac_cachevar],
2828
[AC_TRY_RUN(
29-
[typedef$1int64;
29+
[typedef$1ac_int64;
3030
3131
/*
3232
* These are globals to discourage the compiler from folding all the
3333
* arithmetic tests down to compile-time constants.
3434
*/
35-
int64 a = 20000001;
36-
int64 b = 40000005;
35+
ac_int64 a = 20000001;
36+
ac_int64 b = 40000005;
3737
3838
int does_int64_work()
3939
{
40-
int64 c,d;
40+
ac_int64 c,d;
4141
42-
if (sizeof(int64) != 8)
42+
if (sizeof(ac_int64) != 8)
4343
return 0;/* definitely not the right size */
4444
4545
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */

‎config/c-library.m4

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros that test various C library quirks
2-
# $PostgreSQL: pgsql/config/c-library.m4,v 1.28 2004/10/04 18:14:18 momjian Exp $
2+
# $PostgreSQL: pgsql/config/c-library.m4,v 1.29 2004/12/16 17:48:26 momjian Exp $
33

44

55
# PGAC_VAR_INT_TIMEZONE
@@ -108,7 +108,12 @@ AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
108108
[AC_CACHE_CHECK(whetherstrerror_rreturnsint,
109109
pgac_func_strerror_r_int,
110110
[AC_TRY_COMPILE([#include <string.h>],
111-
[int strerror_r(int, char *, size_t);],
111+
[#ifndef _AIX
112+
int strerror_r(int, char *, size_t);
113+
#else
114+
/* Older AIX has 'int' for the third argument so we don't test the args. */
115+
int strerror_r();
116+
#endif],
112117
[pgac_func_strerror_r_int=yes],
113118
[pgac_func_strerror_r_int=no])])
114119
if test x"$pgac_func_strerror_r_int" = xyes ; then
@@ -225,18 +230,18 @@ AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT],
225230
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_format,
226231
[for pgac_format in '%lld' '%qd' '%I64d'; do
227232
AC_TRY_RUN([#include <stdio.h>
228-
typedef long long intint64;
233+
typedef long long intac_int64;
229234
#define INT64_FORMAT "$pgac_format"
230235
231-
int64 a = 20000001;
232-
int64 b = 40000005;
236+
ac_int64 a = 20000001;
237+
ac_int64 b = 40000005;
233238
234239
int does_int64_snprintf_work()
235240
{
236-
int64 c;
241+
ac_int64 c;
237242
char buf[100];
238243
239-
if (sizeof(int64) != 8)
244+
if (sizeof(ac_int64) != 8)
240245
return 0;/* doesn't look like the right size */
241246
242247
c = a * b;

‎configure

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14611,7 +14611,12 @@ else
1461114611
int
1461214612
main ()
1461314613
{
14614+
#ifndef _AIX
1461414615
int strerror_r(int, char *, size_t);
14616+
#else
14617+
/* Older AIX has 'int' for the third argument so we don't test the args. */
14618+
int strerror_r();
14619+
#endif
1461514620
;
1461614621
return 0;
1461714622
}
@@ -14761,20 +14766,20 @@ else
1476114766
cat >conftest.$ac_ext <<_ACEOF
1476214767
#line $LINENO "configure"
1476314768
#include "confdefs.h"
14764-
typedef long intint64;
14769+
typedef long intac_int64;
1476514770

1476614771
/*
1476714772
* These are globals to discourage the compiler from folding all the
1476814773
* arithmetic tests down to compile-time constants.
1476914774
*/
14770-
int64 a = 20000001;
14771-
int64 b = 40000005;
14775+
ac_int64 a = 20000001;
14776+
ac_int64 b = 40000005;
1477214777

1477314778
int does_int64_work()
1477414779
{
14775-
int64 c,d;
14780+
ac_int64 c,d;
1477614781

14777-
if (sizeof(int64) != 8)
14782+
if (sizeof(ac_int64) != 8)
1477814783
return 0;/* definitely not the right size */
1477914784

1478014785
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
@@ -14875,20 +14880,20 @@ else
1487514880
cat >conftest.$ac_ext <<_ACEOF
1487614881
#line $LINENO "configure"
1487714882
#include "confdefs.h"
14878-
typedef long long intint64;
14883+
typedef long long intac_int64;
1487914884

1488014885
/*
1488114886
* These are globals to discourage the compiler from folding all the
1488214887
* arithmetic tests down to compile-time constants.
1488314888
*/
14884-
int64 a = 20000001;
14885-
int64 b = 40000005;
14889+
ac_int64 a = 20000001;
14890+
ac_int64 b = 40000005;
1488614891

1488714892
int does_int64_work()
1488814893
{
14889-
int64 c,d;
14894+
ac_int64 c,d;
1489014895

14891-
if (sizeof(int64) != 8)
14896+
if (sizeof(ac_int64) != 8)
1489214897
return 0;/* definitely not the right size */
1489314898

1489414899
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
@@ -15007,18 +15012,18 @@ else
1500715012
#line $LINENO "configure"
1500815013
#include "confdefs.h"
1500915014
#include <stdio.h>
15010-
typedef long long intint64;
15015+
typedef long long intac_int64;
1501115016
#define INT64_FORMAT "$pgac_format"
1501215017

15013-
int64 a = 20000001;
15014-
int64 b = 40000005;
15018+
ac_int64 a = 20000001;
15019+
ac_int64 b = 40000005;
1501515020

1501615021
int does_int64_snprintf_work()
1501715022
{
15018-
int64 c;
15023+
ac_int64 c;
1501915024
char buf[100];
1502015025

15021-
if (sizeof(int64) != 8)
15026+
if (sizeof(ac_int64) != 8)
1502215027
return 0;/* doesn't look like the right size */
1502315028

1502415029
c = a * b;

‎src/Makefile.global.in

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.205 2004/11/19 00:41:38 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.206 2004/12/16 17:48:29 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -308,6 +308,12 @@ endif
308308

309309
libpq = -L$(libpq_builddir) -lpq
310310

311+
# AIX libraries do not remember their required libs so we have to force
312+
# thread dependent libraires in the link
313+
ifeq ($(PORTNAME), aix)
314+
libpq +=$(PTHREAD_LIBS)
315+
endif
316+
311317
submake-libpq:
312318
$(MAKE) -C$(libpq_builddir) all
313319

@@ -346,13 +352,13 @@ ifneq ($(CUSTOM_COPT),)
346352
endif
347353

348354
ifdefCOPT
349-
CFLAGS+=$(COPT)
350-
LDFLAGS+=$(COPT)
355+
CFLAGS+=$(COPT)
356+
LDFLAGS+=$(COPT)
351357
endif
352358

353359
ifdefPROFILE
354-
CFLAGS+=$(PROFILE)
355-
LDFLAGS+=$(PROFILE)
360+
CFLAGS+=$(PROFILE)
361+
LDFLAGS+=$(PROFILE)
356362
endif
357363

358364

‎src/makefiles/Makefile.unixware

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ sqlmansect = 5sql
3333

3434
# Unixware needs threads for everything that uses libpq
3535
CFLAGS += $(PTHREAD_CFLAGS)
36-
37-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp