lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*.

AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h.

FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()).
FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi
2011-02-09 04:18:48 +00:00
parent fd289497a5
commit e29b0aca51
6 changed files with 102 additions and 11 deletions

View File

@@ -62,6 +62,10 @@
/* Define to 1 if you have the <ctype.h> header file. */
#cmakedefine HAVE_CTYPE_H ${HAVE_CTYPE_H}
/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you
don't. */
#cmakedefine01 HAVE_DECL_STRERROR_S
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#cmakedefine HAVE_DIRENT_H ${HAVE_DIRENT_H}
@@ -368,9 +372,6 @@
/* Define to 1 if you have the `strerror_r' function. */
#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}
/* Define to 1 if you have the `strerror_s' function. */
#cmakedefine HAVE_STRERROR_S ${HAVE_STRERROR_S}
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}

View File

@@ -78,6 +78,10 @@
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_S
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -384,9 +388,6 @@
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the `strerror_s' function. */
#undef HAVE_STRERROR_S
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H