Skip to content

Commit ff4628f

Browse files
committed
Remove unused AC_DEFINE symbols
ENABLE_DTRACE unused as of a7b7b07 HAVE_ERR_SET_MARK unused as of 4ed4b6c HAVE_FCVT unused as of 4553e1d HAVE_STRUCT_SOCKADDR_UN unused as of b4cea00 HAVE_SYSCONF unused as of f83356c TM_IN_SYS_TIME never used, obsolescent per Autoconf documentation
1 parent d461d05 commit ff4628f

File tree

4 files changed

+6
-203
lines changed

4 files changed

+6
-203
lines changed

config/c-library.m4

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ fi])# PGAC_VAR_INT_TIMEZONE
3030
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
3131
# tzname[] is checked for regardless of whether we find tm_zone.
3232
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
33-
[AC_REQUIRE([AC_STRUCT_TM])dnl
34-
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
33+
[AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
3534
#include <$ac_cv_struct_tm>
3635
])
3736
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
@@ -139,7 +138,7 @@ AC_DEFUN([PGAC_UNION_SEMUN],
139138
# If `struct sockaddr_un' exists, define HAVE_UNIX_SOCKETS.
140139
# (Requires test for <sys/un.h>!)
141140
AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
142-
[AC_CHECK_TYPES([struct sockaddr_un], [AC_DEFINE(HAVE_UNIX_SOCKETS, 1, [Define to 1 if you have unix sockets.])], [],
141+
[AC_CHECK_TYPE([struct sockaddr_un], [AC_DEFINE(HAVE_UNIX_SOCKETS, 1, [Define to 1 if you have unix sockets.])], [],
143142
[#include <sys/types.h>
144143
#ifdef HAVE_SYS_UN_H
145144
#include <sys/un.h>

configure

+2-177
Original file line numberDiff line numberDiff line change
@@ -2795,12 +2795,7 @@ if test "${enable_dtrace+set}" = set; then
27952795
enableval=$enable_dtrace;
27962796
case $enableval in
27972797
yes)
2798-
2799-
cat >>confdefs.h <<\_ACEOF
2800-
#define ENABLE_DTRACE 1
2801-
_ACEOF
2802-
2803-
for ac_prog in dtrace
2798+
for ac_prog in dtrace
28042799
do
28052800
# Extract the first word of "$ac_prog", so it can be a program name with args.
28062801
set dummy $ac_prog; ac_word=$2
@@ -13002,107 +12997,6 @@ $as_echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&
1300212997
fi
1300312998

1300412999

13005-
13006-
for ac_func in ERR_set_mark
13007-
do
13008-
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13009-
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13010-
$as_echo_n "checking for $ac_func... " >&6; }
13011-
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13012-
$as_echo_n "(cached) " >&6
13013-
else
13014-
cat >conftest.$ac_ext <<_ACEOF
13015-
/* confdefs.h. */
13016-
_ACEOF
13017-
cat confdefs.h >>conftest.$ac_ext
13018-
cat >>conftest.$ac_ext <<_ACEOF
13019-
/* end confdefs.h. */
13020-
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13021-
For example, HP-UX 11i <limits.h> declares gettimeofday. */
13022-
#define $ac_func innocuous_$ac_func
13023-
13024-
/* System header to define __stub macros and hopefully few prototypes,
13025-
which can conflict with char $ac_func (); below.
13026-
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13027-
<limits.h> exists even on freestanding compilers. */
13028-
13029-
#ifdef __STDC__
13030-
# include <limits.h>
13031-
#else
13032-
# include <assert.h>
13033-
#endif
13034-
13035-
#undef $ac_func
13036-
13037-
/* Override any GCC internal prototype to avoid an error.
13038-
Use char because int might match the return type of a GCC
13039-
builtin and then its argument prototype would still apply. */
13040-
#ifdef __cplusplus
13041-
extern "C"
13042-
#endif
13043-
char $ac_func ();
13044-
/* The GNU C library defines this for functions which it implements
13045-
to always fail with ENOSYS. Some functions are actually named
13046-
something starting with __ and the normal name is an alias. */
13047-
#if defined __stub_$ac_func || defined __stub___$ac_func
13048-
choke me
13049-
#endif
13050-
13051-
int
13052-
main ()
13053-
{
13054-
return $ac_func ();
13055-
;
13056-
return 0;
13057-
}
13058-
_ACEOF
13059-
rm -f conftest.$ac_objext conftest$ac_exeext
13060-
if { (ac_try="$ac_link"
13061-
case "(($ac_try" in
13062-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13063-
*) ac_try_echo=$ac_try;;
13064-
esac
13065-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13066-
$as_echo "$ac_try_echo") >&5
13067-
(eval "$ac_link") 2>conftest.er1
13068-
ac_status=$?
13069-
grep -v '^ *+' conftest.er1 >conftest.err
13070-
rm -f conftest.er1
13071-
cat conftest.err >&5
13072-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073-
(exit $ac_status); } && {
13074-
test -z "$ac_c_werror_flag" ||
13075-
test ! -s conftest.err
13076-
} && test -s conftest$ac_exeext && {
13077-
test "$cross_compiling" = yes ||
13078-
$as_test_x conftest$ac_exeext
13079-
}; then
13080-
eval "$as_ac_var=yes"
13081-
else
13082-
$as_echo "$as_me: failed program was:" >&5
13083-
sed 's/^/| /' conftest.$ac_ext >&5
13084-
13085-
eval "$as_ac_var=no"
13086-
fi
13087-
13088-
rm -rf conftest.dSYM
13089-
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13090-
conftest$ac_exeext conftest.$ac_ext
13091-
fi
13092-
ac_res=`eval 'as_val=${'$as_ac_var'}
13093-
$as_echo "$as_val"'`
13094-
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13095-
$as_echo "$ac_res" >&6; }
13096-
as_val=`eval 'as_val=${'$as_ac_var'}
13097-
$as_echo "$as_val"'`
13098-
if test "x$as_val" = x""yes; then
13099-
cat >>confdefs.h <<_ACEOF
13100-
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13101-
_ACEOF
13102-
13103-
fi
13104-
done
13105-
1310613000
fi
1310713001

1310813002
if test "$with_pam" = yes ; then
@@ -15536,68 +15430,6 @@ _ACEOF
1553615430

1553715431
fi
1553815432
fi
15539-
{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15540-
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15541-
if test "${ac_cv_struct_tm+set}" = set; then
15542-
$as_echo_n "(cached) " >&6
15543-
else
15544-
cat >conftest.$ac_ext <<_ACEOF
15545-
/* confdefs.h. */
15546-
_ACEOF
15547-
cat confdefs.h >>conftest.$ac_ext
15548-
cat >>conftest.$ac_ext <<_ACEOF
15549-
/* end confdefs.h. */
15550-
#include <sys/types.h>
15551-
#include <time.h>
15552-
15553-
int
15554-
main ()
15555-
{
15556-
struct tm tm;
15557-
int *p = &tm.tm_sec;
15558-
return !p;
15559-
;
15560-
return 0;
15561-
}
15562-
_ACEOF
15563-
rm -f conftest.$ac_objext
15564-
if { (ac_try="$ac_compile"
15565-
case "(($ac_try" in
15566-
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15567-
*) ac_try_echo=$ac_try;;
15568-
esac
15569-
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15570-
$as_echo "$ac_try_echo") >&5
15571-
(eval "$ac_compile") 2>conftest.er1
15572-
ac_status=$?
15573-
grep -v '^ *+' conftest.er1 >conftest.err
15574-
rm -f conftest.er1
15575-
cat conftest.err >&5
15576-
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15577-
(exit $ac_status); } && {
15578-
test -z "$ac_c_werror_flag" ||
15579-
test ! -s conftest.err
15580-
} && test -s conftest.$ac_objext; then
15581-
ac_cv_struct_tm=time.h
15582-
else
15583-
$as_echo "$as_me: failed program was:" >&5
15584-
sed 's/^/| /' conftest.$ac_ext >&5
15585-
15586-
ac_cv_struct_tm=sys/time.h
15587-
fi
15588-
15589-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15590-
fi
15591-
{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15592-
$as_echo "$ac_cv_struct_tm" >&6; }
15593-
if test $ac_cv_struct_tm = sys/time.h; then
15594-
15595-
cat >>confdefs.h <<\_ACEOF
15596-
#define TM_IN_SYS_TIME 1
15597-
_ACEOF
15598-
15599-
fi
15600-
1560115433
{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
1560215434
$as_echo_n "checking for struct tm.tm_zone... " >&6; }
1560315435
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
@@ -15997,11 +15829,6 @@ fi
1599715829
$as_echo "$ac_cv_type_struct_sockaddr_un" >&6; }
1599815830
if test "x$ac_cv_type_struct_sockaddr_un" = x""yes; then
1599915831

16000-
cat >>confdefs.h <<_ACEOF
16001-
#define HAVE_STRUCT_SOCKADDR_UN 1
16002-
_ACEOF
16003-
16004-
1600515832
cat >>confdefs.h <<\_ACEOF
1600615833
#define HAVE_UNIX_SOCKETS 1
1600715834
_ACEOF
@@ -19260,9 +19087,7 @@ fi
1926019087

1926119088

1926219089

19263-
19264-
19265-
for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs wcstombs_l
19090+
for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink towlower utime utimes waitpid wcstombs wcstombs_l
1926619091
do
1926719092
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1926819093
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5

configure.in

+2-5
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ AC_SUBST(enable_coverage)
220220
#
221221
PGAC_ARG_BOOL(enable, dtrace, no,
222222
[build with DTrace support],
223-
[AC_DEFINE([ENABLE_DTRACE], 1,
224-
[Define to 1 to enable DTrace support. (--enable-dtrace)])
225-
AC_CHECK_PROGS(DTRACE, dtrace)
223+
[AC_CHECK_PROGS(DTRACE, dtrace)
226224
if test -z "$DTRACE"; then
227225
AC_MSG_ERROR([dtrace not found])
228226
fi
@@ -1046,7 +1044,6 @@ fi
10461044
if test "$with_openssl" = yes ; then
10471045
AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([header file <openssl/ssl.h> is required for OpenSSL])])
10481046
AC_CHECK_HEADER(openssl/err.h, [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
1049-
AC_CHECK_FUNCS([ERR_set_mark])
10501047
fi
10511048

10521049
if test "$with_pam" = yes ; then
@@ -1200,7 +1197,7 @@ PGAC_VAR_INT_TIMEZONE
12001197
AC_FUNC_ACCEPT_ARGTYPES
12011198
PGAC_FUNC_GETTIMEOFDAY_1ARG
12021199

1203-
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getifaddrs getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs wcstombs_l])
1200+
AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink towlower utime utimes waitpid wcstombs wcstombs_l])
12041201

12051202
AC_REPLACE_FUNCS(fseeko)
12061203
case $host_os in

src/include/pg_config.h.in

-18
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848
/* Define to the default TCP port number as a string constant. */
4949
#undef DEF_PGPORT_STR
5050

51-
/* Define to 1 to enable DTrace support. (--enable-dtrace) */
52-
#undef ENABLE_DTRACE
53-
5451
/* Define to build with GSSAPI support. (--with-gssapi) */
5552
#undef ENABLE_GSS
5653

@@ -149,12 +146,6 @@
149146
/* Define to 1 if you have the <editline/readline.h> header file. */
150147
#undef HAVE_EDITLINE_READLINE_H
151148

152-
/* Define to 1 if you have the `ERR_set_mark' function. */
153-
#undef HAVE_ERR_SET_MARK
154-
155-
/* Define to 1 if you have the `fcvt' function. */
156-
#undef HAVE_FCVT
157-
158149
/* Define to 1 if you have the `fdatasync' function. */
159150
#undef HAVE_FDATASYNC
160151

@@ -514,18 +505,12 @@
514505
/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */
515506
#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN
516507

517-
/* Define to 1 if the system has the type `struct sockaddr_un'. */
518-
#undef HAVE_STRUCT_SOCKADDR_UN
519-
520508
/* Define to 1 if `tm_zone' is member of `struct tm'. */
521509
#undef HAVE_STRUCT_TM_TM_ZONE
522510

523511
/* Define to 1 if you have the `symlink' function. */
524512
#undef HAVE_SYMLINK
525513

526-
/* Define to 1 if you have the `sysconf' function. */
527-
#undef HAVE_SYSCONF
528-
529514
/* Define to 1 if you have the syslog interface. */
530515
#undef HAVE_SYSLOG
531516

@@ -735,9 +720,6 @@
735720
/* Define to 1 if strerror_r() returns a int. */
736721
#undef STRERROR_R_INT
737722

738-
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
739-
#undef TM_IN_SYS_TIME
740-
741723
/* Define to the appropriate snprintf format for unsigned 64-bit ints. */
742724
#undef UINT64_FORMAT
743725

0 commit comments

Comments
 (0)