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

Commita2edb02

Browse files
committed
Replace obsolete autoconf macros with their modern replacements.
AC_TRY_COMPILE(...) -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM(...)])AC_TRY_LINK(...) -> AC_LINK_IFELSE([AC_LANG_PROGRAM(...)])AC_TRY_RUN(...) -> AC_RUN_IFELSE([AC_LANG_PROGRAM(...)])AC_LANG_SAVE/RESTORE -> AC_LANG_PUSH/POPAC_DECL_SYS_SIGLIST -> AC_CHECK_DECLS(...) (per snippet in autoconf manual)Also use AC_LANG_SOURCE instead of AC_LANG_PROGRAM, where the main()function is not needed.With these changes, autoconf -Wall doesn't complain anymore.Andreas Karlsson
1 parent7b156c1 commita2edb02

File tree

7 files changed

+107
-126
lines changed

7 files changed

+107
-126
lines changed

‎config/ac_func_accept_argtypes.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
5050
for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
5151
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
5252
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
53-
AC_TRY_COMPILE(
53+
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
5454
[#ifdef HAVE_SYS_TYPES_H
5555
#include <sys/types.h>
5656
#endif
5757
#ifdef HAVE_SYS_SOCKET_H
5858
#include <sys/socket.h>
5959
#endif
60-
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
61-
[],[ac_not_found=no; break 4],[ac_not_found=yes])
60+
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);])],
61+
[ac_not_found=no; break 4],[ac_not_found=yes])
6262
done
6363
done
6464
done

‎config/acx_pthread.m4

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ dnl upstream changes!
55
dnl
66
AC_DEFUN([ACX_PTHREAD],[
77
AC_REQUIRE([AC_CANONICAL_HOST])
8-
AC_LANG_SAVE
9-
AC_LANG_C
8+
AC_LANG_PUSH([C])
109
acx_pthread_ok=no
1110
1211
# We used to check for pthread.h first, but this fails if pthread.h
@@ -122,10 +121,10 @@ for flag in $acx_pthread_flags; do
122121
# pthread_cleanup_push because it is one of the few pthread
123122
# functions on Solaris that doesn't have a non-functional libc stub.
124123
# We try pthread_create on general principles.
125-
AC_TRY_LINK([#include <pthread.h>],
124+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
126125
[pthread_t th; pthread_join(th, 0);
127126
pthread_attr_init(0); pthread_cleanup_push(0, 0);
128-
pthread_create(0,0,0,0); pthread_cleanup_pop(0);],
127+
pthread_create(0,0,0,0); pthread_cleanup_pop(0);])],
129128
[acx_pthread_ok=yes],[acx_pthread_ok=no])
130129
131130
if test "x$acx_pthread_ok" = xyes; then
@@ -167,5 +166,5 @@ fi
167166
AC_SUBST(PTHREAD_LIBS)
168167
AC_SUBST(PTHREAD_CFLAGS)
169168
170-
AC_LANG_RESTORE
169+
AC_LANG_POP([C])
171170
])dnl ACX_PTHREAD

‎config/c-compiler.m4

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# Check if the C compiler understands signed types.
88
AC_DEFUN([PGAC_C_SIGNED],
99
[AC_CACHE_CHECK(forsignedtypes,pgac_cv_c_signed,
10-
[AC_TRY_COMPILE([],
11-
[signed char c; signed short s; signed int i;],
10+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
11+
[signed char c; signed short s; signed int i;])],
1212
[pgac_cv_c_signed=yes],
1313
[pgac_cv_c_signed=no])])
1414
if test x"$pgac_cv_c_signed" = xno ; then
@@ -81,7 +81,7 @@ AC_DEFUN([PGAC_TYPE_64BIT_INT],
8181
[define([Ac_define],[translit([have_$1_64],[a-z *],[A-Z_P])])dnl
8282
define([Ac_cachevar],[translit([pgac_cv_type_$1_64],[ *],[_p])])dnl
8383
AC_CACHE_CHECK([whether$1 is 64 bits],[Ac_cachevar],
84-
[AC_TRY_RUN(
84+
[AC_RUN_IFELSE([AC_LANG_SOURCE(
8585
[typedef$1 ac_int64;
8686
8787
/*
@@ -107,7 +107,7 @@ int does_int64_work()
107107
}
108108
main() {
109109
exit(! does_int64_work());
110-
}],
110+
}])],
111111
[Ac_cachevar=yes],
112112
[Ac_cachevar=no],
113113
[# If cross-compiling, check the size reported by the compiler and
@@ -169,17 +169,17 @@ fi])# PGAC_TYPE_128BIT_INT
169169
# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
170170
AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
171171
[AC_CACHE_CHECK(for__func__,pgac_cv_funcname_func_support,
172-
[AC_TRY_COMPILE([#include <stdio.h>],
173-
[printf("%s\n", __func__);],
172+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
173+
[printf("%s\n", __func__);])],
174174
[pgac_cv_funcname_func_support=yes],
175175
[pgac_cv_funcname_func_support=no])])
176176
if test x"$pgac_cv_funcname_func_support" = xyes ; then
177177
AC_DEFINE(HAVE_FUNCNAME__FUNC,1,
178178
[Define to 1 if your compiler understands __func__.])
179179
else
180180
AC_CACHE_CHECK(for__FUNCTION__,pgac_cv_funcname_function_support,
181-
[AC_TRY_COMPILE([#include <stdio.h>],
182-
[printf("%s\n", __FUNCTION__);],
181+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
182+
[printf("%s\n", __FUNCTION__);])],
183183
[pgac_cv_funcname_function_support=yes],
184184
[pgac_cv_funcname_function_support=no])])
185185
if test x"$pgac_cv_funcname_function_support" = xyes ; then
@@ -199,8 +199,8 @@ fi])# PGAC_C_FUNCNAME_SUPPORT
199199
# gcc-style compound expressions to be able to wrap the thing into macros.
200200
AC_DEFUN([PGAC_C_STATIC_ASSERT],
201201
[AC_CACHE_CHECK(for_Static_assert,pgac_cv__static_assert,
202-
[AC_TRY_LINK([],
203-
[({ _Static_assert(1, "foo"); })],
202+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
203+
[({ _Static_assert(1, "foo"); })])],
204204
[pgac_cv__static_assert=yes],
205205
[pgac_cv__static_assert=no])])
206206
if test x"$pgac_cv__static_assert" = xyes ; then
@@ -219,8 +219,8 @@ fi])# PGAC_C_STATIC_ASSERT
219219
# have the former and not the latter.
220220
AC_DEFUN([PGAC_C_TYPES_COMPATIBLE],
221221
[AC_CACHE_CHECK(for__builtin_types_compatible_p,pgac_cv__types_compatible,
222-
[AC_TRY_COMPILE([],
223-
[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];],
222+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
223+
[[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];]])],
224224
[pgac_cv__types_compatible=yes],
225225
[pgac_cv__types_compatible=no])])
226226
if test x"$pgac_cv__types_compatible" = xyes ; then
@@ -236,8 +236,9 @@ fi])# PGAC_C_TYPES_COMPATIBLE
236236
# and define HAVE__BUILTIN_BSWAP32 if so.
237237
AC_DEFUN([PGAC_C_BUILTIN_BSWAP32],
238238
[AC_CACHE_CHECK(for__builtin_bswap32,pgac_cv__builtin_bswap32,
239-
[AC_TRY_COMPILE([static unsigned long int x = __builtin_bswap32(0xaabbccdd);],
240-
[],
239+
[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
240+
[static unsigned long int x = __builtin_bswap32(0xaabbccdd);]
241+
)],
241242
[pgac_cv__builtin_bswap32=yes],
242243
[pgac_cv__builtin_bswap32=no])])
243244
if test x"$pgac_cv__builtin_bswap32" = xyes ; then
@@ -253,8 +254,9 @@ fi])# PGAC_C_BUILTIN_BSWAP32
253254
# and define HAVE__BUILTIN_CONSTANT_P if so.
254255
AC_DEFUN([PGAC_C_BUILTIN_CONSTANT_P],
255256
[AC_CACHE_CHECK(for__builtin_constant_p,pgac_cv__builtin_constant_p,
256-
[AC_TRY_COMPILE([static int x; static int y[__builtin_constant_p(x) ? x : 1];],
257-
[],
257+
[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
258+
[[static int x; static int y[__builtin_constant_p(x) ? x : 1];]]
259+
)],
258260
[pgac_cv__builtin_constant_p=yes],
259261
[pgac_cv__builtin_constant_p=no])])
260262
if test x"$pgac_cv__builtin_constant_p" = xyes ; then
@@ -274,8 +276,8 @@ fi])# PGAC_C_BUILTIN_CONSTANT_P
274276
# and only a warning instead of an error would be produced.
275277
AC_DEFUN([PGAC_C_BUILTIN_UNREACHABLE],
276278
[AC_CACHE_CHECK(for__builtin_unreachable,pgac_cv__builtin_unreachable,
277-
[AC_TRY_LINK([],
278-
[__builtin_unreachable();],
279+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
280+
[__builtin_unreachable();])],
279281
[pgac_cv__builtin_unreachable=yes],
280282
[pgac_cv__builtin_unreachable=no])])
281283
if test x"$pgac_cv__builtin_unreachable" = xyes ; then
@@ -291,10 +293,10 @@ fi])# PGAC_C_BUILTIN_UNREACHABLE
291293
# and define HAVE__VA_ARGS if so.
292294
AC_DEFUN([PGAC_C_VA_ARGS],
293295
[AC_CACHE_CHECK(for__VA_ARGS__,pgac_cv__va_args,
294-
[AC_TRY_COMPILE([#include <stdio.h>],
296+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
295297
[#define debug(...) fprintf(stderr, __VA_ARGS__)
296298
debug("%s", "blarg");
297-
],
299+
])],
298300
[pgac_cv__va_args=yes],
299301
[pgac_cv__va_args=no])])
300302
if test x"$pgac_cv__va_args" = xyes ; then
@@ -386,10 +388,10 @@ undefine([Ac_cachevar])dnl
386388
# NB: Some platforms only do 32bit tas, others only do 8bit tas. Test both.
387389
AC_DEFUN([PGAC_HAVE_GCC__SYNC_CHAR_TAS],
388390
[AC_CACHE_CHECK(forbuiltin__synccharlockingfunctions,pgac_cv_gcc_sync_char_tas,
389-
[AC_TRY_LINK([],
391+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
390392
[char lock = 0;
391393
__sync_lock_test_and_set(&lock, 1);
392-
__sync_lock_release(&lock);],
394+
__sync_lock_release(&lock);])],
393395
[pgac_cv_gcc_sync_char_tas="yes"],
394396
[pgac_cv_gcc_sync_char_tas="no"])])
395397
if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
@@ -402,10 +404,10 @@ fi])# PGAC_HAVE_GCC__SYNC_CHAR_TAS
402404
# and define HAVE_GCC__SYNC_INT32_TAS
403405
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_TAS],
404406
[AC_CACHE_CHECK(forbuiltin__syncint32lockingfunctions,pgac_cv_gcc_sync_int32_tas,
405-
[AC_TRY_LINK([],
407+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
406408
[int lock = 0;
407409
__sync_lock_test_and_set(&lock, 1);
408-
__sync_lock_release(&lock);],
410+
__sync_lock_release(&lock);])],
409411
[pgac_cv_gcc_sync_int32_tas="yes"],
410412
[pgac_cv_gcc_sync_int32_tas="no"])])
411413
if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
@@ -418,9 +420,9 @@ fi])# PGAC_HAVE_GCC__SYNC_INT32_TAS
418420
# types, and define HAVE_GCC__SYNC_INT32_CAS if so.
419421
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_CAS],
420422
[AC_CACHE_CHECK(forbuiltin__syncint32atomicoperations,pgac_cv_gcc_sync_int32_cas,
421-
[AC_TRY_LINK([],
423+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
422424
[int val = 0;
423-
__sync_val_compare_and_swap(&val, 0, 37);],
425+
__sync_val_compare_and_swap(&val, 0, 37);])],
424426
[pgac_cv_gcc_sync_int32_cas="yes"],
425427
[pgac_cv_gcc_sync_int32_cas="no"])])
426428
if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
@@ -433,9 +435,9 @@ fi])# PGAC_HAVE_GCC__SYNC_INT32_CAS
433435
# types, and define HAVE_GCC__SYNC_INT64_CAS if so.
434436
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT64_CAS],
435437
[AC_CACHE_CHECK(forbuiltin__syncint64atomicoperations,pgac_cv_gcc_sync_int64_cas,
436-
[AC_TRY_LINK([],
438+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
437439
[PG_INT64_TYPE lock = 0;
438-
__sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);],
440+
__sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);])],
439441
[pgac_cv_gcc_sync_int64_cas="yes"],
440442
[pgac_cv_gcc_sync_int64_cas="no"])])
441443
if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
@@ -448,10 +450,10 @@ fi])# PGAC_HAVE_GCC__SYNC_INT64_CAS
448450
# types, and define HAVE_GCC__ATOMIC_INT32_CAS if so.
449451
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT32_CAS],
450452
[AC_CACHE_CHECK(forbuiltin__atomicint32atomicoperations,pgac_cv_gcc_atomic_int32_cas,
451-
[AC_TRY_LINK([],
453+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
452454
[int val = 0;
453455
int expect = 0;
454-
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);],
456+
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);])],
455457
[pgac_cv_gcc_atomic_int32_cas="yes"],
456458
[pgac_cv_gcc_atomic_int32_cas="no"])])
457459
if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
@@ -464,10 +466,10 @@ fi])# PGAC_HAVE_GCC__ATOMIC_INT32_CAS
464466
# types, and define HAVE_GCC__ATOMIC_INT64_CAS if so.
465467
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT64_CAS],
466468
[AC_CACHE_CHECK(forbuiltin__atomicint64atomicoperations,pgac_cv_gcc_atomic_int64_cas,
467-
[AC_TRY_LINK([],
469+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
468470
[PG_INT64_TYPE val = 0;
469471
PG_INT64_TYPE expect = 0;
470-
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);],
472+
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);])],
471473
[pgac_cv_gcc_atomic_int64_cas="yes"],
472474
[pgac_cv_gcc_atomic_int64_cas="no"])])
473475
if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
@@ -490,10 +492,10 @@ AC_CACHE_CHECK([for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=$1], [Ac_cachevar
490492
CFLAGS="$pgac_save_CFLAGS$1"
491493
ac_save_c_werror_flag=$ac_c_werror_flag
492494
ac_c_werror_flag=yes
493-
AC_TRY_LINK([#include <nmmintrin.h>],
495+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <nmmintrin.h>],
494496
[unsigned int crc = 0;
495497
crc = _mm_crc32_u8(crc, 0);
496-
crc = _mm_crc32_u32(crc, 0);],
498+
crc = _mm_crc32_u32(crc, 0);])],
497499
[Ac_cachevar=yes],
498500
[Ac_cachevar=no])
499501
ac_c_werror_flag=$ac_save_c_werror_flag

‎config/c-library.m4

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
# HAVE_INT_TIMEZONE.
99
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
1010
[AC_CACHE_CHECK(forinttimezone,pgac_cv_var_int_timezone,
11-
[AC_TRY_LINK([#include <time.h>
11+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>
1212
int res;],
1313
[#ifndef __CYGWIN__
1414
res = timezone / 60;
1515
#else
1616
res = _timezone / 60;
17-
#endif],
17+
#endif])],
1818
[pgac_cv_var_int_timezone=yes],
1919
[pgac_cv_var_int_timezone=no])])
2020
if test x"$pgac_cv_var_int_timezone" = xyes ; then
@@ -41,13 +41,13 @@ if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
4141
`HAVE_STRUCT_TM_TM_ZONE' instead.])
4242
fi
4343
AC_CACHE_CHECK(fortzname,ac_cv_var_tzname,
44-
[AC_TRY_LINK(
45-
[#include <time.h>
44+
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
45+
[[#include <time.h>
4646
#ifndef tzname /* For SGI. */
4747
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4848
#endif
49-
],
50-
[atoi(*tzname);],ac_cv_var_tzname=yes,ac_cv_var_tzname=no)])
49+
]],
50+
[atoi(*tzname);])],ac_cv_var_tzname=yes,ac_cv_var_tzname=no)])
5151
if test $ac_cv_var_tzname = yes; then
5252
AC_DEFINE(HAVE_TZNAME,1,
5353
[Define to 1 if you have the external array `tzname'.])
@@ -62,10 +62,10 @@ fi
6262
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
6363
[AC_CACHE_CHECK(whethergettimeofdaytakesonlyoneargument,
6464
pgac_cv_func_gettimeofday_1arg,
65-
[AC_TRY_COMPILE([#include <sys/time.h>],
65+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/time.h>],
6666
[struct timeval *tp;
6767
struct timezone *tzp;
68-
gettimeofday(tp,tzp);],
68+
gettimeofday(tp,tzp);])],
6969
[pgac_cv_func_gettimeofday_1arg=no],
7070
[pgac_cv_func_gettimeofday_1arg=yes])])
7171
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
@@ -86,13 +86,13 @@ AH_VERBATIM(GETTIMEOFDAY_1ARG_,
8686
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
8787
[AC_CACHE_CHECK(whetherstrerror_rreturnsint,
8888
pgac_cv_func_strerror_r_int,
89-
[AC_TRY_COMPILE([#include <string.h>],
89+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <string.h>],
9090
[#ifndef _AIX
9191
int strerror_r(int, char *, size_t);
9292
#else
9393
/* Older AIX has 'int' for the third argument so we don't test the args. */
9494
int strerror_r();
95-
#endif],
95+
#endif])],
9696
[pgac_cv_func_strerror_r_int=yes],
9797
[pgac_cv_func_strerror_r_int=no])])
9898
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
@@ -181,12 +181,12 @@ AC_DEFUN([PGAC_STRUCT_ADDRINFO],
181181
# a fancier check.
182182
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
183183
[AC_CACHE_CHECK(forPOSIXsignalinterface,pgac_cv_func_posix_signals,
184-
[AC_TRY_LINK([#include <signal.h>
184+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <signal.h>
185185
],
186186
[struct sigaction act, oact;
187187
sigemptyset(&act.sa_mask);
188188
act.sa_flags = SA_RESTART;
189-
sigaction(0, &act, &oact);],
189+
sigaction(0, &act, &oact);])],
190190
[pgac_cv_func_posix_signals=yes],
191191
[pgac_cv_func_posix_signals=no])])
192192
if test x"$pgac_cv_func_posix_signals" = xyes ; then
@@ -210,7 +210,7 @@ AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER],
210210
[AC_MSG_CHECKING([snprintf length modifier for long long int])
211211
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_modifier,
212212
[for pgac_modifier in 'll' 'q' 'I64'; do
213-
AC_TRY_RUN([#include <stdio.h>
213+
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
214214
typedef long long int ac_int64;
215215
#define INT64_FORMAT "%${pgac_modifier}d"
216216
@@ -233,7 +233,7 @@ int does_int64_snprintf_work()
233233
}
234234
main() {
235235
exit(! does_int64_snprintf_work());
236-
}],
236+
}]])],
237237
[pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break],
238238
[],
239239
[pgac_cv_snprintf_long_long_int_modifier=cross; break])
@@ -259,7 +259,7 @@ esac])# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER
259259
AC_DEFUN([PGAC_FUNC_SNPRINTF_ARG_CONTROL],
260260
[AC_MSG_CHECKING([whether snprintf supports argument control])
261261
AC_CACHE_VAL(pgac_cv_snprintf_arg_control,
262-
[AC_TRY_RUN([#include <stdio.h>
262+
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
263263
#include <string.h>
264264
265265
int main()
@@ -271,7 +271,7 @@ int main()
271271
if (strcmp(buf, "4 3") != 0)
272272
return 1;
273273
return 0;
274-
}],
274+
}]])],
275275
[pgac_cv_snprintf_arg_control=yes],
276276
[pgac_cv_snprintf_arg_control=no],
277277
[pgac_cv_snprintf_arg_control=cross])
@@ -288,7 +288,7 @@ AC_MSG_RESULT([$pgac_cv_snprintf_arg_control])
288288
AC_DEFUN([PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT],
289289
[AC_MSG_CHECKING([whether snprintf supports the %z modifier])
290290
AC_CACHE_VAL(pgac_cv_snprintf_size_t_support,
291-
[AC_TRY_RUN([#include <stdio.h>
291+
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
292292
#include <string.h>
293293
294294
int main()
@@ -308,7 +308,7 @@ int main()
308308
if (strcmp(bufz, buf64) != 0)
309309
return 1;
310310
return 0;
311-
}],
311+
}]])],
312312
[pgac_cv_snprintf_size_t_support=yes],
313313
[pgac_cv_snprintf_size_t_support=no],
314314
[pgac_cv_snprintf_size_t_support=cross])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp