Remove some unused configure tests. (#8533)

master
Stephen Dolan 2019-03-21 16:35:59 +00:00 committed by Sébastien Hinderer
parent f1a1347e7b
commit 58ef7303bb
6 changed files with 3 additions and 189 deletions

View File

@ -707,6 +707,9 @@ OCaml 4.08.0
- GPR#2295: Restore support for bytecode target XLC/AIX/Power
(Konstantin Romanov, review by Sébastien Hinderer and David Allsopp)
* GPR#8533: Remove some unused configure tests
(Stephen Dolan, review by David Allsopp and Sébastien Hinderer)
### Internal/compiler-libs changes:
- MPR#7918, GPR#1703, GPR#1944, GPR#2213, GPR#2257: Add the module

1
aclocal.m4 vendored
View File

@ -69,7 +69,6 @@ AC_DEFUN([OCAML_SIGNAL_HANDLERS_SEMANTICS], [
[AC_DEFINE([POSIX_SIGNALS])
AC_MSG_NOTICE([POSIX signal handling found.])],
[AC_MSG_NOTICE([assuming signals have the System V semantics.])
AC_CHECK_FUNCS([sigsetmask], [AC_DEFINE([HAS_SIGSETMASK])])
]
)
])

View File

@ -25,7 +25,6 @@
#define HAS_SOCKETS
#define HAS_GETCWD
#define HAS_UTIME
#define HAS_DUP2
#define HAS_GETHOSTNAME
#define HAS_MKTIME
#define HAS_PUTENV

104
configure vendored
View File

@ -13863,18 +13863,6 @@ $as_echo "$as_me: POSIX signal handling found." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5
$as_echo "$as_me: assuming signals have the System V semantics." >&6;}
for ac_func in sigsetmask
do :
ac_fn_c_check_func "$LINENO" "sigsetmask" "ac_cv_func_sigsetmask"
if test "x$ac_cv_func_sigsetmask" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SIGSETMASK 1
_ACEOF
$as_echo "#define HAS_SIGSETMASK 1" >>confdefs.h
fi
done
fi
@ -14233,17 +14221,6 @@ if test "x$ac_cv_func_getcwd" = xyes; then :
fi
ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority"
if test "x$ac_cv_func_getpriority" = xyes; then :
ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
if test "x$ac_cv_func_setpriority" = xyes; then :
$as_echo "#define HAS_GETPRIORITY 1" >>confdefs.h
fi
fi
## utime
## Note: this was defined in config/s-nt.h but the autoconf macros do not
# seem to detect it properly on Windows so we hardcode the definition
@ -14278,13 +14255,6 @@ if test "x$ac_cv_func_utimes" = xyes; then :
fi
ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
if test "x$ac_cv_func_dup2" = xyes; then :
$as_echo "#define HAS_DUP2 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
if test "x$ac_cv_func_fchmod" = xyes; then :
ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
@ -14425,80 +14395,6 @@ fi
## Asynchronous I/O
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for asynchronous I/O" >&5
$as_echo_n "checking for asynchronous I/O... " >&6; }
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
int signalled;
void sigio_handler(int arg)
{
signalled = 1;
}
int main(void)
{
#if defined(SIGIO) && defined(FASYNC) && defined(F_SETFL) && defined(F_SETOWN)
int p[2];
int ret;
#define OUT 0
#define IN 1
if (socketpair(PF_UNIX, SOCK_STREAM, 0, p) == -1) return 1;
signalled = 0;
signal(SIGIO, sigio_handler);
ret = fcntl(p[OUT], F_GETFL, 0);
fcntl(p[OUT], F_SETFL, ret | FASYNC);
fcntl(p[OUT], F_SETOWN, getpid());
switch(fork()) {
case -1:
return 1;
case 0:
close(p[OUT]);
write(p[IN], "x", 1);
sleep(1);
exit(0);
default:
close(p[IN]);
while(wait(NULL) == -1 && errno == EINTR) /*nothing*/;
}
if (signalled) return 0; else return 1;
#else
return 1;
#endif
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
$as_echo "#define HAS_ASYNC_IO 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
## setitimer
ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"

View File

@ -1114,10 +1114,6 @@ AC_CHECK_FUNC([mkfifo], [AC_DEFINE([HAS_MKFIFO])])
AC_CHECK_FUNC([getcwd], [AC_DEFINE([HAS_GETCWD])])
AC_CHECK_FUNC([getpriority],
[AC_CHECK_FUNC([setpriority],
[AC_DEFINE([HAS_GETPRIORITY])])])
## utime
## Note: this was defined in config/s-nt.h but the autoconf macros do not
# seem to detect it properly on Windows so we hardcode the definition
@ -1130,8 +1126,6 @@ AS_CASE([$host],
AC_CHECK_FUNC([utimes], [AC_DEFINE([HAS_UTIMES])])
AC_CHECK_FUNC([dup2], [AC_DEFINE([HAS_DUP2])])
AC_CHECK_FUNC([fchmod],
[AC_CHECK_FUNC([fchown], [AC_DEFINE([HAS_FCHMOD])])])
@ -1187,64 +1181,6 @@ AC_CHECK_HEADER([termios.h],
[AC_CHECK_FUNC([tcflush],
[AC_CHECK_FUNC([tcflow], [AC_DEFINE([HAS_TERMIOS])])])])])])])
## Asynchronous I/O
AC_MSG_CHECKING([for asynchronous I/O])
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
int signalled;
void sigio_handler(int arg)
{
signalled = 1;
}
int main(void)
{
#if defined(SIGIO) && defined(FASYNC) && defined(F_SETFL) && defined(F_SETOWN)
int p[2];
int ret;
#define OUT 0
#define IN 1
if (socketpair(PF_UNIX, SOCK_STREAM, 0, p) == -1) return 1;
signalled = 0;
signal(SIGIO, sigio_handler);
ret = fcntl(p[OUT], F_GETFL, 0);
fcntl(p[OUT], F_SETFL, ret | FASYNC);
fcntl(p[OUT], F_SETOWN, getpid());
switch(fork()) {
case -1:
return 1;
case 0:
close(p[OUT]);
write(p[IN], "x", 1);
sleep(1);
exit(0);
default:
close(p[IN]);
while(wait(NULL) == -1 && errno == EINTR) /*nothing*/;
}
if (signalled) return 0; else return 1;
#else
return 1;
#endif
}
]])],
[
AC_DEFINE([HAS_ASYNC_IO])
AC_MSG_RESULT([yes])
],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([no])]
)
## setitimer
AC_CHECK_FUNC([setitimer],

View File

@ -37,10 +37,6 @@
undefined if signal handlers have the System V semantics: the signal
resets the behavior to default. */
#undef HAS_SIGSETMASK
/* Define HAS_SIGSETMASK if you have sigsetmask(), as in BSD. */
#undef SUPPORT_DYNAMIC_LINKING
/* Define SUPPORT_DYNAMIC_LINKING if dynamic loading of C stub code
@ -110,21 +106,12 @@
/* Define HAS_GETCWD if the library provides the getcwd() function. */
#undef HAS_GETPRIORITY
/* Define HAS_GETPRIORITY if the library provides getpriority() and
setpriority(). Otherwise, we'll use nice(). */
#undef HAS_UTIME
#undef HAS_UTIMES
/* Define HAS_UTIME if you have /usr/include/utime.h and the library
provides utime(). Define HAS_UTIMES if the library provides utimes(). */
#undef HAS_DUP2
/* Define HAS_DUP2 if you have dup2(). */
#undef HAS_FCHMOD
/* Define HAS_FCHMOD if you have fchmod() and fchown(). */
@ -173,12 +160,6 @@
/* Define HAS_TERMIOS if you have /usr/include/termios.h and it is
Posix-compliant. */
#undef HAS_ASYNC_IO
/* Define HAS_ASYNC_IO if BSD-style asynchronous I/O are supported
(the process can request to be sent a SIGIO signal when a descriptor
is ready for reading). */
#undef HAS_SETITIMER
/* Define HAS_SETITIMER if you have setitimer(). */