summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-16 09:52:34 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-16 09:52:34 +0000
commitb5543599fd6ef5424a7081abd0ead627fa006116 (patch)
tree9a8a0513af228dde22bca155597a52437e6433dc /libc/sysdeps/linux/common
parente483359d3e793318147da2cb09600c323753edee (diff)
Better guards within _LIBC, cleanup, typos
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_ctype.h8
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_locale.h19
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_stdio.h2
3 files changed, 10 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/common/bits/uClibc_ctype.h b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
index 50cbd6bb2..dd723c77c 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_ctype.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
@@ -184,14 +184,6 @@ extern int toascii(int c) __THROW;
#define _toupper(c) ((c) ^ 0x20)
#define _tolower(c) ((c) | 0x20)
-
-/* Apparently, glibc implements things as macros if __NO_CTYPE isn't defined.
- * If we don't have locale support, we'll do the same. Otherwise, we'll
- * only use macros for the supported-locale-invariant cases. */
-#ifndef __UCLIBC_HAS_LOCALE__
-
-#endif /* __UCLIBC_HAS_LOCALE__ */
-
__END_DECLS
/**********************************************************************/
diff --git a/libc/sysdeps/linux/common/bits/uClibc_locale.h b/libc/sysdeps/linux/common/bits/uClibc_locale.h
index 1f26d7b4a..fe52834e6 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_locale.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_locale.h
@@ -65,18 +65,17 @@
#define __LC_ALL 6
/**********************************************************************/
-/* #if defined(_LIBC) && !defined(__LOCALE_C_ONLY) */
#ifndef __LOCALE_C_ONLY
-#ifdef _LIBC
+#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
#include <stddef.h>
#include <stdint.h>
#include <bits/uClibc_touplow.h>
-#endif
-#if defined(_LIBC) && !defined(__UCLIBC_GEN_LOCALE)
+#ifndef __UCLIBC_GEN_LOCALE
#include <bits/uClibc_locale_data.h>
#endif
+#endif
/* extern void _locale_set(const unsigned char *p); */
/* extern void _locale_init(void); */
@@ -101,7 +100,7 @@ enum {
* In particular, C/POSIX locale is '#' + "\x80\x01"}*LC_ALL + nul.
*/
-#if defined(_LIBC) && !defined(__UCLIBC_GEN_LOCALE)
+#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc) && !defined __UCLIBC_GEN_LOCALE
typedef struct {
uint16_t num_weights;
uint16_t num_starters;
@@ -319,11 +318,11 @@ typedef struct __uclibc_locale_struct {
extern __uclibc_locale_t __global_locale_data;
extern struct __uclibc_locale_struct * __global_locale;
-#endif
+#endif /* _LIBC */
typedef struct __uclibc_locale_struct *__locale_t;
-#if defined _LIBC && defined IS_IN_libc
+#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
extern int __locale_mbrtowc_l(wchar_t *__restrict dst,
const char *__restrict src,
__locale_t loc ) attribute_hidden;
@@ -368,7 +367,7 @@ extern __locale_t __curlocale_set(__locale_t newloc);
#define __LOCALE_ARG , locale_arg
#define __LOCALE_PTR locale_arg
-#else /* defined(__UCLIBC_HAS_XLOCALE__) && defined(__STDLIB_DO_XLOCALE) */
+#else /* defined(__UCLIBC_HAS_XLOCALE__) && defined(__UCLIBC_DO_XLOCALE) */
#define __XL(N) N
#define __XL_NPP(N) N
@@ -377,10 +376,10 @@ extern __locale_t __curlocale_set(__locale_t newloc);
#define __LOCALE_ARG
#define __LOCALE_PTR __UCLIBC_CURLOCALE
-#endif /* defined(__UCLIBC_HAS_XLOCALE__) && defined(__STDLIB_DO_XLOCALE) */
+#endif /* defined(__UCLIBC_HAS_XLOCALE__) && defined(__UCLIBC_DO_XLOCALE) */
/**********************************************************************/
-#endif /* defined(_LIBC) && !defined(__LOCALE_C_ONLY) */
+#endif /* !defined(__LOCALE_C_ONLY) */
/**********************************************************************/
#endif /* _UCLIBC_LOCALE_H */
diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
index b3b330f66..3c12a74dc 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
@@ -402,7 +402,7 @@ extern void __stdio_init_mutex(pthread_mutex_t *m) attribute_hidden;
extern int __fgetc_unlocked(FILE *__stream);
extern int __fputc_unlocked(int __c, FILE *__stream);
-/* First define the default definitions. They overwritten below as necessary. */
+/* First define the default definitions. They will be overwritten below as necessary. */
#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
#define __FGETC(__stream) (fgetc)((__stream))
#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream))