simplify some logic in scanf and remove redundant invalid-format check
[musl] / include / locale.h
index 7023023..f6a29b2 100644 (file)
@@ -5,12 +5,9 @@
 extern "C" {
 #endif
 
-#undef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif
+#include <features.h>
+
+#define NULL 0L
 
 #define LC_CTYPE    0
 #define LC_NUMERIC  1
@@ -53,7 +50,8 @@ char *setlocale (int, const char *);
 struct lconv *localeconv(void);
 
 
-#if 1
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
 
 #define __NEED_locale_t