Make the aio detection work with cross compiling. The tests no longer
even look at the status code and basically guarantee that the aio function was never called, so there's really no point in AC_TRY_RUN over AC_COMPILE_IFELSE... This commit was SVN r15033.
Этот коммит содержится в:
родитель
278ec7fd4f
Коммит
b71b2b4b0d
@ -1325,7 +1325,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
# actually use the aio_write interface). Note that this will
|
# actually use the aio_write interface). Note that this will
|
||||||
# fail for some pre-POSIX implementations of the aio interface
|
# fail for some pre-POSIX implementations of the aio interface
|
||||||
# (an old IBM interface needs an fd argument as well)
|
# (an old IBM interface needs an fd argument as well)
|
||||||
AC_TRY_RUN([
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_SIGNAL_H
|
#ifdef HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -1336,19 +1336,15 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
#ifdef HAVE_SYS_AIO_H
|
#ifdef HAVE_SYS_AIO_H
|
||||||
#include <sys/aio.h>
|
#include <sys/aio.h>
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char **argv)
|
],[
|
||||||
{
|
|
||||||
struct aiocb *aiocbp;
|
struct aiocb *aiocbp;
|
||||||
if (argc > 10) aio_write(aiocbp);
|
aio_write(aiocbp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
])],
|
||||||
],
|
[aio_runs=yes
|
||||||
aio_runs=yes
|
AC_MSG_RESULT(yes)],
|
||||||
AC_MSG_RESULT(yes),
|
[aio_runs=no
|
||||||
aio_runs=no
|
AC_MSG_RESULT(no)]
|
||||||
AC_MSG_RESULT(no),
|
|
||||||
aio_runs=unknown
|
|
||||||
AC_MSG_RESULT(unknown)
|
|
||||||
)
|
)
|
||||||
if test "$aio_runs" != "no" ; then
|
if test "$aio_runs" != "no" ; then
|
||||||
AC_DEFINE(ROMIO_HAVE_WORKING_AIO, 1, Define if AIO calls seem to work)
|
AC_DEFINE(ROMIO_HAVE_WORKING_AIO, 1, Define if AIO calls seem to work)
|
||||||
@ -1365,7 +1361,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
# aio_read correctly
|
# aio_read correctly
|
||||||
|
|
||||||
AC_MSG_CHECKING([for obsolete two-argument aio_write])
|
AC_MSG_CHECKING([for obsolete two-argument aio_write])
|
||||||
AC_TRY_RUN([
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_SIGNAL_H
|
#ifdef HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -1376,20 +1372,16 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
#ifdef HAVE_SYS_AIO_H
|
#ifdef HAVE_SYS_AIO_H
|
||||||
#include <sys/aio.h>
|
#include <sys/aio.h>
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char **argv)
|
],[
|
||||||
{
|
|
||||||
int fd;
|
int fd;
|
||||||
struct aiocb *aiocbp;
|
struct aiocb *aiocbp;
|
||||||
if (argc > 10) aio_write(fd, aiocbp);
|
aio_write(fd, aiocbp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
])],
|
||||||
],
|
[aio_two_arg_write=yes
|
||||||
aio_two_arg_write=yes
|
AC_MSG_RESULT(yes)],
|
||||||
AC_MSG_RESULT(yes),
|
[aio_two_arg_write=no
|
||||||
aio_two_arg_write=no
|
AC_MSG_RESULT(no)]
|
||||||
AC_MSG_RESULT(no),
|
|
||||||
aio_two_arg_write=unknown
|
|
||||||
AC_MSG_RESULT(unknown)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if test "$aio_two_arg_write" != "no" -a "$aio_runs" != "yes" ; then
|
if test "$aio_two_arg_write" != "no" -a "$aio_runs" != "yes" ; then
|
||||||
@ -1398,7 +1390,7 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for obsolete two-argument aio_suspend])
|
AC_MSG_CHECKING([for obsolete two-argument aio_suspend])
|
||||||
AC_TRY_RUN([
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_SIGNAL_H
|
#ifdef HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -1409,19 +1401,15 @@ if test "$have_aio_h" = "yes" -o "$have_sys_aio_h" = "yes" ; then
|
|||||||
#ifdef HAVE_SYS_AIO_H
|
#ifdef HAVE_SYS_AIO_H
|
||||||
#include <sys/aio.h>
|
#include <sys/aio.h>
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char **argv)
|
],[
|
||||||
{
|
|
||||||
struct aiocb *aiocbp;
|
struct aiocb *aiocbp;
|
||||||
if (argc > 10) aio_suspend(1, &aiocbp);
|
aio_suspend(1, &aiocbp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
])],
|
||||||
],
|
[aio_two_arg_suspend=yes
|
||||||
aio_two_arg_suspend=yes
|
AC_MSG_RESULT(yes)],
|
||||||
AC_MSG_RESULT(yes),
|
[aio_two_arg_suspend=no
|
||||||
aio_two_arg_suspend=no
|
AC_MSG_RESULT(no)]
|
||||||
AC_MSG_RESULT(no),
|
|
||||||
aio_two_arg_suspend=unknown
|
|
||||||
AC_MSG_RESULT(unknown)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if test "$aio_two_arg_suspend" != "no" -a "$aio_runs" != "yes" ; then
|
if test "$aio_two_arg_suspend" != "no" -a "$aio_runs" != "yes" ; then
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user