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

Commit34fa72e

Browse files
committed
Remove use of obsolescent Autoconf macros
Remove the use of the following macros, which are obsolescent accordingto the Autoconf documentation:- AC_C_CONST- AC_C_STRINGIZE- AC_C_VOLATILE- AC_FUNC_MEMCMP
1 parent1eafea5 commit34fa72e

File tree

6 files changed

+3
-412
lines changed

6 files changed

+3
-412
lines changed

‎configure

Lines changed: 0 additions & 297 deletions
Original file line numberDiff line numberDiff line change
@@ -15326,113 +15326,6 @@ $as_echo "$as_me: error: unknown endianness
1532615326
{ (exit 1); exit 1; }; } ;;
1532715327
esac
1532815328

15329-
{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15330-
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
15331-
if test "${ac_cv_c_const+set}" = set; then
15332-
$as_echo_n "(cached) " >&6
15333-
else
15334-
cat >conftest.$ac_ext <<_ACEOF
15335-
/* confdefs.h. */
15336-
_ACEOF
15337-
cat confdefs.h >>conftest.$ac_ext
15338-
cat >>conftest.$ac_ext <<_ACEOF
15339-
/* end confdefs.h. */
15340-
15341-
int
15342-
main ()
15343-
{
15344-
/* FIXME: Include the comments suggested by Paul. */
15345-
#ifndef __cplusplus
15346-
/* Ultrix mips cc rejects this. */
15347-
typedef int charset[2];
15348-
const charset cs;
15349-
/* SunOS 4.1.1 cc rejects this. */
15350-
char const *const *pcpcc;
15351-
char **ppc;
15352-
/* NEC SVR4.0.2 mips cc rejects this. */
15353-
struct point {int x, y;};
15354-
static struct point const zero = {0,0};
15355-
/* AIX XL C 1.02.0.0 rejects this.
15356-
It does not let you subtract one const X* pointer from another in
15357-
an arm of an if-expression whose if-part is not a constant
15358-
expression */
15359-
const char *g = "string";
15360-
pcpcc = &g + (g ? g-g : 0);
15361-
/* HPUX 7.0 cc rejects these. */
15362-
++pcpcc;
15363-
ppc = (char**) pcpcc;
15364-
pcpcc = (char const *const *) ppc;
15365-
{ /* SCO 3.2v4 cc rejects this. */
15366-
char *t;
15367-
char const *s = 0 ? (char *) 0 : (char const *) 0;
15368-
15369-
*t++ = 0;
15370-
if (s) return 0;
15371-
}
15372-
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15373-
int x[] = {25, 17};
15374-
const int *foo = &x[0];
15375-
++foo;
15376-
}
15377-
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15378-
typedef const int *iptr;
15379-
iptr p = 0;
15380-
++p;
15381-
}
15382-
{ /* AIX XL C 1.02.0.0 rejects this saying
15383-
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15384-
struct s { int j; const int *ap[3]; };
15385-
struct s *b; b->j = 5;
15386-
}
15387-
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15388-
const int foo = 10;
15389-
if (!foo) return 0;
15390-
}
15391-
return !cs[0] && !zero.x;
15392-
#endif
15393-
15394-
;
15395-
return 0;
15396-
}
15397-
_ACEOF
15398-
rm -f conftest.$ac_objext
15399-
if { (ac_try="$ac_compile"
15400-
case "(($ac_try" in
15401-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15402-
*) ac_try_echo=$ac_try;;
15403-
esac
15404-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15405-
$as_echo "$ac_try_echo") >&5
15406-
(eval "$ac_compile") 2>conftest.er1
15407-
ac_status=$?
15408-
grep -v '^ *+' conftest.er1 >conftest.err
15409-
rm -f conftest.er1
15410-
cat conftest.err >&5
15411-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412-
(exit $ac_status); } && {
15413-
test -z "$ac_c_werror_flag" ||
15414-
test ! -s conftest.err
15415-
} && test -s conftest.$ac_objext; then
15416-
ac_cv_c_const=yes
15417-
else
15418-
$as_echo "$as_me: failed program was:" >&5
15419-
sed 's/^/| /' conftest.$ac_ext >&5
15420-
15421-
ac_cv_c_const=no
15422-
fi
15423-
15424-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15425-
fi
15426-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15427-
$as_echo "$ac_cv_c_const" >&6; }
15428-
if test $ac_cv_c_const = no; then
15429-
15430-
cat >>confdefs.h <<\_ACEOF
15431-
#define const /**/
15432-
_ACEOF
15433-
15434-
fi
15435-
1543615329
{ $as_echo "$as_me:$LINENO: checking for inline" >&5
1543715330
$as_echo_n "checking for inline... " >&6; }
1543815331
if test "${ac_cv_c_inline+set}" = set; then
@@ -15570,40 +15463,6 @@ cat >>confdefs.h <<_ACEOF
1557015463
#define PG_USE_INLINE 1
1557115464
_ACEOF
1557215465

15573-
fi
15574-
15575-
{ $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
15576-
$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
15577-
if test "${ac_cv_c_stringize+set}" = set; then
15578-
$as_echo_n "(cached) " >&6
15579-
else
15580-
cat >conftest.$ac_ext <<_ACEOF
15581-
/* confdefs.h. */
15582-
_ACEOF
15583-
cat confdefs.h >>conftest.$ac_ext
15584-
cat >>conftest.$ac_ext <<_ACEOF
15585-
/* end confdefs.h. */
15586-
#define x(y) #y
15587-
15588-
char *s = x(teststring);
15589-
_ACEOF
15590-
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15591-
$EGREP "#teststring" >/dev/null 2>&1; then
15592-
ac_cv_c_stringize=no
15593-
else
15594-
ac_cv_c_stringize=yes
15595-
fi
15596-
rm -f conftest*
15597-
15598-
fi
15599-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
15600-
$as_echo "$ac_cv_c_stringize" >&6; }
15601-
if test $ac_cv_c_stringize = yes; then
15602-
15603-
cat >>confdefs.h <<\_ACEOF
15604-
#define HAVE_STRINGIZE 1
15605-
_ACEOF
15606-
1560715466
fi
1560815467

1560915468

@@ -15734,67 +15593,6 @@ cat >>confdefs.h <<\_ACEOF
1573415593
_ACEOF
1573515594

1573615595
fi
15737-
{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
15738-
$as_echo_n "checking for working volatile... " >&6; }
15739-
if test "${ac_cv_c_volatile+set}" = set; then
15740-
$as_echo_n "(cached) " >&6
15741-
else
15742-
cat >conftest.$ac_ext <<_ACEOF
15743-
/* confdefs.h. */
15744-
_ACEOF
15745-
cat confdefs.h >>conftest.$ac_ext
15746-
cat >>conftest.$ac_ext <<_ACEOF
15747-
/* end confdefs.h. */
15748-
15749-
int
15750-
main ()
15751-
{
15752-
15753-
volatile int x;
15754-
int * volatile y = (int *) 0;
15755-
return !x && !y;
15756-
;
15757-
return 0;
15758-
}
15759-
_ACEOF
15760-
rm -f conftest.$ac_objext
15761-
if { (ac_try="$ac_compile"
15762-
case "(($ac_try" in
15763-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15764-
*) ac_try_echo=$ac_try;;
15765-
esac
15766-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15767-
$as_echo "$ac_try_echo") >&5
15768-
(eval "$ac_compile") 2>conftest.er1
15769-
ac_status=$?
15770-
grep -v '^ *+' conftest.er1 >conftest.err
15771-
rm -f conftest.er1
15772-
cat conftest.err >&5
15773-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774-
(exit $ac_status); } && {
15775-
test -z "$ac_c_werror_flag" ||
15776-
test ! -s conftest.err
15777-
} && test -s conftest.$ac_objext; then
15778-
ac_cv_c_volatile=yes
15779-
else
15780-
$as_echo "$as_me: failed program was:" >&5
15781-
sed 's/^/| /' conftest.$ac_ext >&5
15782-
15783-
ac_cv_c_volatile=no
15784-
fi
15785-
15786-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15787-
fi
15788-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
15789-
$as_echo "$ac_cv_c_volatile" >&6; }
15790-
if test $ac_cv_c_volatile = no; then
15791-
15792-
cat >>confdefs.h <<\_ACEOF
15793-
#define volatile /**/
15794-
_ACEOF
15795-
15796-
fi
15797-
1579815596
{ $as_echo "$as_me:$LINENO: checking for __func__" >&5
1579915597
$as_echo_n "checking for __func__... " >&6; }
1580015598
if test "${pgac_cv_funcname_func_support+set}" = set; then
@@ -28897,101 +28695,6 @@ operating system; use --disable-thread-safety to disable thread safety." >&2;}
2889728695
fi
2889828696
fi
2889928697

28900-
# SunOS doesn't handle negative byte comparisons properly with +/- return
28901-
{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
28902-
$as_echo_n "checking for working memcmp... " >&6; }
28903-
if test "${ac_cv_func_memcmp_working+set}" = set; then
28904-
$as_echo_n "(cached) " >&6
28905-
else
28906-
if test "$cross_compiling" = yes; then
28907-
ac_cv_func_memcmp_working=no
28908-
else
28909-
cat >conftest.$ac_ext <<_ACEOF
28910-
/* confdefs.h. */
28911-
_ACEOF
28912-
cat confdefs.h >>conftest.$ac_ext
28913-
cat >>conftest.$ac_ext <<_ACEOF
28914-
/* end confdefs.h. */
28915-
$ac_includes_default
28916-
int
28917-
main ()
28918-
{
28919-
28920-
/* Some versions of memcmp are not 8-bit clean. */
28921-
char c0 = '\100', c1 = '\200', c2 = '\201';
28922-
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
28923-
return 1;
28924-
28925-
/* The Next x86 OpenStep bug shows up only when comparing 16 bytes
28926-
or more and with at least one buffer not starting on a 4-byte boundary.
28927-
William Lewis provided this test program. */
28928-
{
28929-
char foo[21];
28930-
char bar[21];
28931-
int i;
28932-
for (i = 0; i < 4; i++)
28933-
{
28934-
char *a = foo + i;
28935-
char *b = bar + i;
28936-
strcpy (a, "--------01111111");
28937-
strcpy (b, "--------10000000");
28938-
if (memcmp (a, b, 16) >= 0)
28939-
return 1;
28940-
}
28941-
return 0;
28942-
}
28943-
28944-
;
28945-
return 0;
28946-
}
28947-
_ACEOF
28948-
rm -f conftest$ac_exeext
28949-
if { (ac_try="$ac_link"
28950-
case "(($ac_try" in
28951-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28952-
*) ac_try_echo=$ac_try;;
28953-
esac
28954-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28955-
$as_echo "$ac_try_echo") >&5
28956-
(eval "$ac_link") 2>&5
28957-
ac_status=$?
28958-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28959-
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28960-
{ (case "(($ac_try" in
28961-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28962-
*) ac_try_echo=$ac_try;;
28963-
esac
28964-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28965-
$as_echo "$ac_try_echo") >&5
28966-
(eval "$ac_try") 2>&5
28967-
ac_status=$?
28968-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28969-
(exit $ac_status); }; }; then
28970-
ac_cv_func_memcmp_working=yes
28971-
else
28972-
$as_echo "$as_me: program exited with status $ac_status" >&5
28973-
$as_echo "$as_me: failed program was:" >&5
28974-
sed 's/^/| /' conftest.$ac_ext >&5
28975-
28976-
( exit $ac_status )
28977-
ac_cv_func_memcmp_working=no
28978-
fi
28979-
rm -rf conftest.dSYM
28980-
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28981-
fi
28982-
28983-
28984-
fi
28985-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
28986-
$as_echo "$ac_cv_func_memcmp_working" >&6; }
28987-
test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
28988-
*" memcmp.$ac_objext "* ) ;;
28989-
*) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
28990-
;;
28991-
esac
28992-
28993-
28994-
2899528698

2899628699
# Select semaphore implementation type.
2899728700
if test "$PORTNAME" != "win32"; then

‎configure.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,12 +1114,9 @@ fi
11141114

11151115
m4_defun([AC_PROG_CC_STDC], []) dnl We don't want that.
11161116
AC_C_BIGENDIAN
1117-
AC_C_CONST
11181117
PGAC_C_INLINE
1119-
AC_C_STRINGIZE
11201118
AC_C_FLEXIBLE_ARRAY_MEMBER
11211119
PGAC_C_SIGNED
1122-
AC_C_VOLATILE
11231120
PGAC_C_FUNCNAME_SUPPORT
11241121
PGAC_C_STATIC_ASSERT
11251122
PGAC_C_TYPES_COMPATIBLE
@@ -1749,9 +1746,6 @@ operating system; use --disable-thread-safety to disable thread safety.])
17491746
fi
17501747
fi
17511748

1752-
# SunOS doesn't handle negative byte comparisons properly with +/- return
1753-
AC_FUNC_MEMCMP
1754-
17551749

17561750
# Select semaphore implementation type.
17571751
if test "$PORTNAME" != "win32"; then

‎src/include/c.h

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,28 +130,12 @@
130130
* CppConcat
131131
*Concatenate two arguments together, using the C preprocessor.
132132
*
133-
* Note: the standard Autoconf macro AC_C_STRINGIZE actually only checks
134-
* whether #identifier works, but if we have that we likely have ## too.
133+
* Note: There used to be support here for pre-ANSI C compilers that didn't
134+
* support # and ##. Nowadays, these macros are just for clarity and/or
135+
* backward compatibility with existing PostgreSQL code.
135136
*/
136-
#if defined(HAVE_STRINGIZE)
137-
138137
#defineCppAsString(identifier) #identifier
139138
#defineCppConcat(x,y)x##y
140-
#else/* !HAVE_STRINGIZE */
141-
142-
#defineCppAsString(identifier) "identifier"
143-
144-
/*
145-
* CppIdentity -- On Reiser based cpp's this is used to concatenate
146-
*two tokens. That is
147-
*CppIdentity(A)B ==> AB
148-
*We renamed it to _private_CppIdentity because it should not
149-
*be referenced outside this file. On other cpp's it
150-
*produces A B.
151-
*/
152-
#define_priv_CppIdentity(x)x
153-
#defineCppConcat(x,y)_priv_CppIdentity(x)y
154-
#endif/* !HAVE_STRINGIZE */
155139

156140
/*
157141
* dummyret is used to set return values in macros that use ?: to make

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp