summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-02 18:14:44 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-02 18:14:44 -0400
commit2e5dfa515f78f5a67eb0cd7e323ab6f3ed76c15d (patch)
tree4e816a3068b164bd62551f58b175e76b96c7720a
parent0c7294ef30544f825430a3692c717f6f470974fe (diff)
downloadmusl-2e5dfa515f78f5a67eb0cd7e323ab6f3ed76c15d.tar.gz
musl-2e5dfa515f78f5a67eb0cd7e323ab6f3ed76c15d.tar.bz2
musl-2e5dfa515f78f5a67eb0cd7e323ab6f3ed76c15d.tar.xz
musl-2e5dfa515f78f5a67eb0cd7e323ab6f3ed76c15d.zip
fix feature test macro logic for _BSD_SOURCE
in several places, _BSD_SOURCE was not even implying POSIX, resulting in it being subtractive rather than additive (compared to the default features).
-rw-r--r--include/locale.h2
-rw-r--r--include/wchar.h8
-rw-r--r--include/wctype.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/include/locale.h b/include/locale.h
index f6a29b2a..7e80fd93 100644
--- a/include/locale.h
+++ b/include/locale.h
@@ -51,7 +51,7 @@ struct lconv *localeconv(void);
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_locale_t
diff --git a/include/wchar.h b/include/wchar.h
index 96cd4447..fd5aac5f 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -14,12 +14,12 @@ extern "C" {
#define __NEED_wint_t
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_locale_t
#define __NEED_va_list
#endif
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_wctype_t
#endif
@@ -137,7 +137,7 @@ size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s
#undef iswdigit
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
FILE *open_wmemstream(wchar_t **, size_t *);
size_t mbsnrtowcs(wchar_t *__restrict, const char **__restrict, size_t, size_t, mbstate_t *__restrict);
size_t wcsnrtombs(char *__restrict, const wchar_t **__restrict, size_t, size_t, mbstate_t *__restrict);
@@ -153,7 +153,7 @@ int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
size_t wcsxfrm_l(wchar_t *__restrict, const wchar_t *__restrict, size_t n, locale_t);
#endif
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
int wcwidth (wchar_t);
int wcswidth (const wchar_t *, size_t);
int iswalnum(wint_t);
diff --git a/include/wctype.h b/include/wctype.h
index 8c544f24..3ac24f13 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -11,7 +11,7 @@ extern "C" {
#define __NEED_wctype_t
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_locale_t
#endif
@@ -47,7 +47,7 @@ wctype_t wctype(const char *);
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
int iswalnum_l(wint_t, locale_t);
int iswalpha_l(wint_t, locale_t);