Commit 770c33f6 authored by Alexandre Julliard's avatar Alexandre Julliard

Hopefully more portable errno check.

parent 5b80ce35
...@@ -65,9 +65,8 @@ dnl ...@@ -65,9 +65,8 @@ dnl
AC_DEFUN([WINE_CHECK_ERRNO], AC_DEFUN([WINE_CHECK_ERRNO],
[AC_CACHE_CHECK([for reentrant libc: $1],[wine_cv_libc_r_$1], [AC_CACHE_CHECK([for reentrant libc: $1],[wine_cv_libc_r_$1],
[AC_TRY_RUN([int myerrno = 0; [AC_TRY_RUN([int myerrno = 0;
char buf[256];
int *$1(){return &myerrno;} int *$1(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);}], main(){close(333); close(333); exit(!myerrno);}],
wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no, wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
wine_cv_libc_r_$1=yes)]) wine_cv_libc_r_$1=yes)])
AS_IF([test "$wine_cv_libc_r_$1" = "yes"],[$2],[$3])]) AS_IF([test "$wine_cv_libc_r_$1" = "yes"],[$2],[$3])])
......
...@@ -10542,9 +10542,8 @@ else ...@@ -10542,9 +10542,8 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
int myerrno = 0; int myerrno = 0;
char buf[256];
int *__errno_location(){return &myerrno;} int *__errno_location(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);} main(){close(333); close(333); exit(!myerrno);}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
...@@ -10585,9 +10584,8 @@ else ...@@ -10585,9 +10584,8 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
int myerrno = 0; int myerrno = 0;
char buf256;
int *__error(){return &myerrno;} int *__error(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);} main(){close(333); close(333); exit(!myerrno);}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
...@@ -10628,9 +10626,8 @@ else ...@@ -10628,9 +10626,8 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
int myerrno = 0; int myerrno = 0;
char buf256;
int *___errno(){return &myerrno;} int *___errno(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);} main(){close(333); close(333); exit(!myerrno);}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
...@@ -10671,9 +10668,8 @@ else ...@@ -10671,9 +10668,8 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
int myerrno = 0; int myerrno = 0;
char buf256;
int *__thr_errno(){return &myerrno;} int *__thr_errno(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);} main(){close(333); close(333); exit(!myerrno);}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
...@@ -10714,9 +10710,8 @@ else ...@@ -10714,9 +10710,8 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
int myerrno = 0; int myerrno = 0;
char buf256;
int *__errno(){return &myerrno;} int *__errno(){return &myerrno;}
main(){connect(0,buf,255); exit(!myerrno);} main(){close(333); close(333); exit(!myerrno);}
_ACEOF _ACEOF
rm -f conftest$ac_exeext rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment