Fix macOS Xcode build

React to Solaris fixes (0019c12af3) by hiding some more
functions from macOS. The Xcode build uses special weak-linking
magic.
This commit is contained in:
ridiculousfish 2016-12-10 20:48:07 -08:00
parent 90f7d4b081
commit eb3ed2680b
3 changed files with 19 additions and 2 deletions

View file

@ -17,6 +17,9 @@
*/
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dirfd' function. */
#define HAVE_DIRFD 1
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
@ -86,6 +89,15 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `std::wcscasecmp' function. */
/* #undef HAVE_STD__WCSCASECMP */
/* Define to 1 if you have the `std::wcsdup' function. */
/* #undef HAVE_STD__WCSDUP */
/* Define to 1 if you have the `std::wcsncasecmp' function. */
/* #undef HAVE_STD__WCSNCASECMP */
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
@ -148,6 +160,9 @@
/* Define to 1 if you have the `wcslcpy' function. */
#define HAVE_WCSLCPY 1
/* Define to 1 if you have the `wcsncasecmp' function. */
#define HAVE_WCSNCASECMP 1
/* Define to 1 if you have the `wcsndup' function. */
/* #undef HAVE_WCSNDUP */

View file

@ -156,7 +156,7 @@ int wcsncasecmp(const wchar_t *a, const wchar_t *b, size_t n) {
return wcsncasecmp_fallback(a, b, n);
}
#endif // __DARWIN_C_LEVEL >= 200809L
#endif // __APPLE__
#else // __APPLE__
/// These functions are missing from Solaris 10
#ifndef HAVE_WCSDUP
@ -170,6 +170,7 @@ int wcsncasecmp(const wchar_t *a, const wchar_t *b, size_t n) {
return wcsncasecmp_fallback(a, b, n);
}
#endif
#endif
#ifndef HAVE_WCSNDUP
wchar_t *wcsndup(const wchar_t *in, size_t c) {

View file

@ -75,7 +75,7 @@ int wcscasecmp(const wchar_t *a, const wchar_t *b);
int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *wcsndup(const wchar_t *in, size_t c);
#endif
#endif //__APPLE__
#else //__APPLE__
/// These functions are missing from Solaris 10
#ifndef HAVE_WCSDUP
@ -94,6 +94,7 @@ int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
#define dirfd(d) (d->d_fd)
#endif
#endif
#endif
#ifndef HAVE_WCSNDUP
/// Fallback for wcsndup function. Returns a copy of \c in, truncated to a maximum length of \c c.