root / trunk / data / curl / strerror.diff

Revision 2, 1.4 kB (checked in by saurik, 11 months ago)

Initial commit.

  • acinclude.m4

    diff -r -u curl-7.17.1/acinclude.m4 curl-7.17.1+iPhone/acinclude.m4
    old new  
    19441944       ) dnl with _THREAD_SAFE 
    19451945    ]) dnl plain cpp for it 
    19461946 
    1947     dnl determine if this strerror_r() is glibc or POSIX 
    1948     AC_MSG_CHECKING([for a glibc strerror_r API]) 
    1949     AC_TRY_RUN([ 
    1950 #include <string.h> 
    1951 #include <errno.h> 
    1952 int 
    1953 main () { 
    1954   char buffer[1024]; /* big enough to play with */ 
    1955   char *string = 
    1956     strerror_r(EACCES, buffer, sizeof(buffer)); 
    1957     /* this should've returned a string */ 
    1958     if(!string || !string[0]) 
    1959       return 99; 
    1960     return 0; 
    1961 } 
    1962 ], 
    19631947    GLIBC_STRERROR_R="1" 
    19641948    AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()]) 
    1965     AC_MSG_RESULT([yes]), 
    1966     AC_MSG_RESULT([no]), 
    1967  
    1968     dnl Use an inferior method of strerror_r detection while cross-compiling 
    1969     AC_EGREP_CPP(yes, [ 
    1970 #include <features.h> 
    1971 #ifdef __GLIBC__ 
    1972 yes 
    1973 #endif 
    1974 ],  
    1975       dnl looks like glibc, so assume a glibc-style strerror_r() 
    1976       GLIBC_STRERROR_R="1" 
    1977       AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()]) 
    1978       AC_MSG_RESULT([yes]), 
    1979       AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!]) 
    1980     ) dnl while cross-compiling 
    1981     ) 
    19821949 
    19831950    if test -z "$GLIBC_STRERROR_R"; then 
    19841951 
Note: See TracBrowser for help on using the browser.