Permalink
Browse files

Fix macOS Xcode build

React to Solaris fixes (0019c12) by hiding some more
functions from macOS. The Xcode build uses special weak-linking
magic.
  • Loading branch information...
1 parent 90f7d4b commit eb3ed2680b7cef01041e87eab83ad6d29d201f00 @ridiculousfish ridiculousfish committed Dec 11, 2016
Showing with 19 additions and 2 deletions.
  1. +15 −0 osx/config.h
  2. +2 −1 src/fallback.cpp
  3. +2 −1 src/fallback.h
View
@@ -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
@@ -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
@@ -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.

0 comments on commit eb3ed26

Please sign in to comment.