mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Reverted the previous change and redid it differently as it seemed to not
work. This is supposed to detect cross-compiling and alert the user, and not do the POSIX-check for strerror_r() if it already detected a glibc-compatible strerror_r().
This commit is contained in:
parent
4c58797607
commit
18dd8154e2
34
acinclude.m4
34
acinclude.m4
@ -423,14 +423,18 @@ main () {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dnl if it worked fine
|
GLIBC_STRERROR_R="1"
|
||||||
AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
|
AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
|
||||||
AC_MSG_RESULT([yes]),
|
AC_MSG_RESULT([yes]),
|
||||||
dnl this didn't work!
|
AC_MSG_RESULT([no]),
|
||||||
AC_MSG_RESULT([no])
|
dnl cross-compiling!
|
||||||
|
AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
|
||||||
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([for a POSIX strerror_r API])
|
if test -z "$GLIBC_STRERROR_R"; then
|
||||||
AC_TRY_RUN([
|
|
||||||
|
AC_MSG_CHECKING([for a POSIX strerror_r API])
|
||||||
|
AC_TRY_RUN([
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
int
|
int
|
||||||
@ -445,18 +449,16 @@ main () {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dnl it worked, we have POSIX-style strerror()
|
AC_DEFINE(HAVE_POSIX_STRERROR_R, 1, [we have a POSIX-style strerror_r()])
|
||||||
AC_DEFINE(HAVE_POSIX_STRERROR_R, 1, [we have a POSIX-style strerror_r()])
|
AC_MSG_RESULT([yes]),
|
||||||
AC_MSG_RESULT([yes]),
|
AC_MSG_RESULT([no]) ,
|
||||||
dnl it failed, we don't have POSIX-style
|
dnl cross-compiling!
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
|
||||||
) dnl end of AC_TRY_RUN() for POSIX strerror_r()
|
)
|
||||||
|
|
||||||
dnl cross-compiling!
|
fi dnl if not using glibc API
|
||||||
,
|
|
||||||
AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
|
fi dnl we have a strerror_r
|
||||||
) dnl end of AC_TRY_RUN() for glibc strerror_r()
|
|
||||||
fi
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user