#688: Stronger check for return type of strrerror_r. (Nikolai Saoukh)

v0.27.3
Andreas Huggel 15 years ago
parent c7d5396669
commit 4eea186240

@ -144,12 +144,10 @@ return 0;
endif( HAVE_SYS_TIME_H ) endif( HAVE_SYS_TIME_H )
# strerror_r returns char* # strerror_r returns char*
check_c_source_compiles( "#include <string.h> check_cxx_source_compiles( "
int main() { #include <cstring>
char * c; int dfunc() { char cb[12]; return *(strerror_r(1, cb, sizeof(cb))) == '\0'; }
c = strerror_r(0,c,0); " STRERROR_R_CHAR_P )
return 0;
}" STRERROR_R_CHAR_P )
#function is declared with the above #function is declared with the above
if( STRERROR_R_CHAR_P ) if( STRERROR_R_CHAR_P )

Loading…
Cancel
Save