From 6349a663038dbe7b59467c5bd06cd5f5dc91c867 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Feb 2011 23:51:23 +0100 Subject: fix a problem with hidden getutent in non-threaded builds Signed-off-by: Denys Vlasenko --- libc/misc/utmp/utent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index bf265c2a3..11d615437 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -98,8 +98,8 @@ struct utmp *getutent(void) __UCLIBC_MUTEX_UNLOCK(utmplock); return ret; } -libc_hidden_def(getutent) #endif +libc_hidden_def(getutent) void endutent(void) { -- cgit v1.2.3 From 2c1c5db993c28e96b47a77148a4635931384810d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 13 Feb 2011 16:19:12 +0100 Subject: regex: remove set but not used variable Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/regex/regex_internal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/regex/regex_internal.c b/libc/misc/regex/regex_internal.c index de640e08d..c6ac8dda1 100644 --- a/libc/misc/regex/regex_internal.c +++ b/libc/misc/regex/regex_internal.c @@ -627,7 +627,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) if (pstr->is_utf8) { - const unsigned char *raw, *p, *q, *end; + const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ @@ -654,13 +654,11 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) unsigned char buf[6]; size_t mbclen; - q = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; - q = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ -- cgit v1.2.3 From 435f73337eff129943249b0d59aad50c8df5bd2e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 21 Feb 2011 21:29:58 -0500 Subject: tempname: fix int precision warnings The printf precision takes an integer, not a size_t. Otherwise we get: libc/misc/internals/tempname.c: In function '___path_search': libc/misc/internals/tempname.c:116: warning: field precision should have type 'int', but argument 3 has type 'size_t' field precision should have type 'int', but argument 5 has type 'size_t' Signed-off-by: Mike Frysinger --- libc/misc/internals/tempname.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index 4145c9478..0db28455b 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -62,7 +62,10 @@ int attribute_hidden ___path_search (char *tmpl, size_t tmpl_len, const char *di const char *pfx /*, int try_tmpdir*/) { /*const char *d; */ - size_t dlen, plen; + /* dir and pfx lengths should always fit into an int, + so don't bother using size_t here. Especially since + the printf func requires an int for precision (%*s). */ + int dlen, plen; if (!pfx || !pfx[0]) { -- cgit v1.2.3 From de71e42c04a7d35cf663b1c84ac1de5b6b93b052 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:26:30 +0100 Subject: syntax fixes Avoid compile warnings about the use of undefined constants Signed-off-by: Peter S. Mazinger --- libc/misc/ftw/ftw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c index 4a62e388a..9031e3589 100644 --- a/libc/misc/ftw/ftw.c +++ b/libc/misc/ftw/ftw.c @@ -752,7 +752,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors, /* Entry points. */ -#if __UCLIBC_HAS_FTW__ +#ifdef __UCLIBC_HAS_FTW__ int FTW_NAME (const char *path, FTW_FUNC_T func, int descriptors) { @@ -760,7 +760,7 @@ FTW_NAME (const char *path, FTW_FUNC_T func, int descriptors) } #endif -#if __UCLIBC_HAS_NFTW__ +#ifdef __UCLIBC_HAS_NFTW__ #ifndef _LIBC int NFTW_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags) -- cgit v1.2.3 From 1fc68eae4846de4a1e276e68aee743ef731f3e91 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:31:39 +0100 Subject: add missing prototypes Add some missing prototypes Signed-off-by: Peter S. Mazinger --- libc/misc/pthread/tsd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libc/misc') diff --git a/libc/misc/pthread/tsd.c b/libc/misc/pthread/tsd.c index 835ee22ce..0c222e8e9 100644 --- a/libc/misc/pthread/tsd.c +++ b/libc/misc/pthread/tsd.c @@ -2,6 +2,7 @@ We define it here instead of in libpthread so t here instead of in libpthread so that it doesn't need to have a TLS segment of its own just for this one pointer. */ +void **__libc_dl_error_tsd(void) __attribute__ ((const)); void ** __attribute__ ((const)) __libc_dl_error_tsd (void) { -- cgit v1.2.3 From f00e553e4b084007781df5e4b5accc2e152da231 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 19:41:29 +0100 Subject: add missing prototypes Add some missing prototypes Signed-off-by: Peter S. Mazinger --- libc/misc/internals/__uClibc_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 58f6643b2..da29ef69e 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -313,6 +313,11 @@ void __uClibc_fini(void) } libc_hidden_def(__uClibc_fini) +#ifndef SHARED +extern void __nptl_deallocate_tsd (void) __attribute ((weak)); +extern unsigned int __nptl_nthreads __attribute ((weak)); +#endif + /* __uClibc_main is the new main stub for uClibc. This function is * called from crt1 (version 0.9.28 or newer), after ALL shared libraries * are initialized, just before we call the application's main function. @@ -481,7 +486,6 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc, # ifdef SHARED __libc_pthread_functions.ptr__nptl_deallocate_tsd (); # else - extern void __nptl_deallocate_tsd (void) __attribute ((weak)); __nptl_deallocate_tsd (); # endif @@ -491,7 +495,6 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc, # ifdef SHARED unsigned int *const ptr = __libc_pthread_functions.ptr_nthreads; # else - extern unsigned int __nptl_nthreads __attribute ((weak)); unsigned int *const ptr = &__nptl_nthreads; # endif -- cgit v1.2.3 From 2e9d2266c0cea250f7a87dc6aa2b02d0bd5a0aea Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 21:49:38 +0100 Subject: Correct ssp code Avoid using strong_alias in ssp, some archs dislike it. Make stack_chk_guard static. Export __stack_smash_handler only if compatibility option is enabled. Signed-off-by: Peter S. Mazinger --- libc/misc/internals/__uClibc_main.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index da29ef69e..315365a25 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -45,22 +45,15 @@ void *__libc_stack_end = NULL; # ifdef __UCLIBC_HAS_SSP__ # include +static uintptr_t stack_chk_guard; # ifndef THREAD_SET_STACK_GUARD /* Only exported for architectures that don't store the stack guard canary * in thread local area. */ -# include -uintptr_t stack_chk_guard; /* for gcc-4.1 non-TLS */ uintptr_t __stack_chk_guard attribute_relro; +# endif /* for gcc-3.x + Etoh ssp */ -# ifdef __UCLIBC_HAS_SSP_COMPAT__ -# ifdef __HAVE_SHARED__ -strong_alias(__stack_chk_guard,__guard) -# else -uintptr_t __guard attribute_relro; -# endif -# endif -# elif defined __UCLIBC_HAS_SSP_COMPAT__ +# ifdef __UCLIBC_HAS_SSP_COMPAT__ uintptr_t __guard attribute_relro; # endif # endif @@ -251,18 +244,14 @@ void __uClibc_init(void) #ifndef SHARED # ifdef __UCLIBC_HAS_SSP__ /* Set up the stack checker's canary. */ + stack_chk_guard = _dl_setup_stack_chk_guard(); # ifdef THREAD_SET_STACK_GUARD - uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard(); THREAD_SET_STACK_GUARD (stack_chk_guard); -# ifdef __UCLIBC_HAS_SSP_COMPAT__ - stack_chk_guard = _dl_setup_stack_chk_guard(); - __guard = stack_chk_guard; -# endif # else __stack_chk_guard = stack_chk_guard; -# if !defined __HAVE_SHARED__ && defined __UCLIBC_HAS_SSP_COMPAT__ - __guard = stack_chk_guard; -# endif +# endif +# ifdef __UCLIBC_HAS_SSP_COMPAT__ + __guard = stack_chk_guard; # endif # endif #endif -- cgit v1.2.3 From 370e40a5d94efb44d6b8adbca6fcaa1262793f0b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 22:13:19 +0100 Subject: initialize 2 variables to get rid of compiler warning Signed-off-by: Peter S. Mazinger --- libc/misc/time/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index ff44892a8..096c3b6b4 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -1013,7 +1013,7 @@ size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize, const char *stack[MAX_PUSH]; size_t count; size_t o_count; - int field_val, i, j, lvl; + int field_val = 0, i = 0, j, lvl; int x[3]; /* wday, yday, year */ int isofm, days; char buf[__UIM_BUFLEN_LONG]; -- cgit v1.2.3 From 152e66242f2af7cd26e29d59a31f8bb8479595e5 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 3 Mar 2011 00:37:29 +0100 Subject: update some headers Signed-off-by: Peter S. Mazinger --- libc/misc/locale/locale.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libc/misc') diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index 52055a2d2..255c10d61 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -1057,6 +1057,7 @@ libc_hidden_def(__XL_NPP(nl_langinfo)) /**********************************************************************/ #ifdef L_newlocale +#warning mask defines for extra locale categories #ifdef __UCLIBC_MJN3_ONLY__ #warning TODO: Move posix and utf8 strings. -- cgit v1.2.3 From 95adc01517efce365da4e40e0d2a081ec4497928 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Wed, 23 Feb 2011 12:56:43 +0100 Subject: Add support for DSBT ELF to ld.so This adds support for DSBT ELF to ld.so. This uses loadmaps like FD-PIC. Some code is added in ld.so to initialize the DSBT tables, and there's also a new target macro FINISH_BOOTSTRAP_RELOC. Signed-off-by: Mark Salter Signed-off-by: Aurelien Jacquiot Signed-off-by: Bernd Schmidt --- libc/misc/elf/dl-iterate-phdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/elf/dl-iterate-phdr.c b/libc/misc/elf/dl-iterate-phdr.c index a7677f11f..f0233ca37 100644 --- a/libc/misc/elf/dl-iterate-phdr.c +++ b/libc/misc/elf/dl-iterate-phdr.c @@ -62,9 +62,11 @@ dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, /* This entry describes this statically-linked program itself. */ struct dl_phdr_info info; int ret; -#ifdef __FDPIC__ +#if defined(__FDPIC__) info.dlpi_addr.map = NULL; info.dlpi_addr.got_value = NULL; +#elif defined(__DSBT__) + info.dlpi_addr.map = NULL; #else info.dlpi_addr = 0; #endif -- cgit v1.2.3 From 19373021defb3b917ba9617c3f45b22ab8da26dd Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 7 Mar 2011 17:28:57 +0100 Subject: locale.c, locale.h: no need for hidden duplocale Signed-off-by: Peter S. Mazinger --- libc/misc/locale/locale.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index 255c10d61..e49cd3ba5 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -1337,7 +1337,6 @@ __locale_t duplocale(__locale_t dataset) } return r; } -libc_hidden_def(duplocale) #endif /**********************************************************************/ -- cgit v1.2.3 From 5c38edaeca35c3b3631d28acc43c96f3970d9d48 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 7 Mar 2011 17:39:14 +0100 Subject: locale.c: export newlocale only if XLOCALE is defined newlocale is used by setlocale, so we need the hidden version even if XLOCALE is not defined Signed-off-by: Peter S. Mazinger --- libc/misc/locale/locale.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/misc') diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index e49cd3ba5..40303ab14 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -1303,7 +1303,9 @@ __locale_t newlocale(int category_mask, const char *locale, __locale_t base) return base; } +#ifdef __UCLIBC_HAS_XLOCALE__ libc_hidden_def(newlocale) +#endif #endif /**********************************************************************/ -- cgit v1.2.3 From 1dd9275091d6cbb14d6b149770fc90cef53577cf Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 13:32:30 +0100 Subject: remove trailing ';' from _syscallX() Signed-off-by: Peter S. Mazinger --- libc/misc/sysvipc/msgq.c | 2 +- libc/misc/sysvipc/sem.c | 2 +- libc/misc/sysvipc/shm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/sysvipc/msgq.c b/libc/misc/sysvipc/msgq.c index 27eb1ff92..185cd268b 100644 --- a/libc/misc/sysvipc/msgq.c +++ b/libc/misc/sysvipc/msgq.c @@ -12,7 +12,7 @@ #ifdef __NR_msgctl #define __NR___libc_msgctl __NR_msgctl -static __inline__ _syscall3(int, __libc_msgctl, int, msqid, int, cmd, struct msqid_ds *, buf); +static __inline__ _syscall3(int, __libc_msgctl, int, msqid, int, cmd, struct msqid_ds *, buf) #endif /* Message queue control operation. */ int msgctl(int msqid, int cmd, struct msqid_ds *buf) diff --git a/libc/misc/sysvipc/sem.c b/libc/misc/sysvipc/sem.c index e340216e9..cca4cdfcc 100644 --- a/libc/misc/sysvipc/sem.c +++ b/libc/misc/sysvipc/sem.c @@ -41,7 +41,7 @@ union semun { #ifdef __NR_semctl #define __NR___semctl __NR_semctl -static __inline__ _syscall4(int, __semctl, int, semid, int, semnum, int, cmd, void *, arg); +static __inline__ _syscall4(int, __semctl, int, semid, int, semnum, int, cmd, void *, arg) #endif int semctl(int semid, int semnum, int cmd, ...) diff --git a/libc/misc/sysvipc/shm.c b/libc/misc/sysvipc/shm.c index 4b7ea0753..27e871f27 100644 --- a/libc/misc/sysvipc/shm.c +++ b/libc/misc/sysvipc/shm.c @@ -55,7 +55,7 @@ void * shmat (int shmid, const void *shmaddr, int shmflg) /* Provide operations to control over shared memory segments. */ #ifdef __NR_shmctl #define __NR___libc_shmctl __NR_shmctl -static __inline__ _syscall3(int, __libc_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf); +static __inline__ _syscall3(int, __libc_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf) #endif int shmctl(int shmid, int cmd, struct shmid_ds *buf) { -- cgit v1.2.3 From cf67a3699e98c57b3a06e5dd4c7e70baa648db6a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 15:06:17 +0100 Subject: fnmatch.c: use MB_CUR_MAX from stdlib.h included earlier Signed-off-by: Peter S. Mazinger --- libc/misc/fnmatch/fnmatch.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c index 0fa043bad..2874413ec 100644 --- a/libc/misc/fnmatch/fnmatch.c +++ b/libc/misc/fnmatch/fnmatch.c @@ -334,11 +334,6 @@ is_char_class (const wchar_t *wcs) # include "fnmatch_loop.c" # endif -#ifndef __UCLIBC_HAS_WCHAR__ -# undef MB_CUR_MAX -# define MB_CUR_MAX 1 -#endif - int fnmatch (const char *pattern, const char *string, int flags) { -- cgit v1.2.3 From 3fa004b7d2d9a3648aa95b093000259a123fa2d8 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 15:14:48 +0100 Subject: regcomp.c, aeabi_mb_cur_max.c: use unconditionally MB_CUR_MAX from stdlib.h Signed-off-by: Peter S. Mazinger --- libc/misc/regex/regcomp.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c index 8f2e18ce4..b25850ccd 100644 --- a/libc/misc/regex/regcomp.c +++ b/libc/misc/regex/regcomp.c @@ -819,11 +819,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; -#ifdef __UCLIBC_HAS_WCHAR__ dfa->mb_cur_max = MB_CUR_MAX; -#else - dfa->mb_cur_max = 1; -#endif #if 0 if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) -- cgit v1.2.3 From f4ec824864b8ea68af8953669f789656cc05143d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 21:11:47 +0100 Subject: ctype.c, _collate.c, str[n]casecmp.c, strlcpy.c: remove unused hidden functions Signed-off-by: Peter S. Mazinger --- libc/misc/ctype/ctype.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libc/misc') diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c index e46f66b58..54cd21e87 100644 --- a/libc/misc/ctype/ctype.c +++ b/libc/misc/ctype/ctype.c @@ -346,7 +346,6 @@ int toupper_l(int c, __locale_t l) #endif return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c; } -libc_hidden_def(toupper_l) /*remove after 0.9.31. See ctype.h for why. *weak_alias (toupper_l, __toupper_l) */ -- cgit v1.2.3 From 5ab9845ea03ba2c356e58617daeab6b306959380 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 00:49:01 +0100 Subject: time.c, wchar.h: remove unused hidden wcsftime Signed-off-by: Peter S. Mazinger --- libc/misc/time/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 096c3b6b4..ccfe3444d 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -2455,11 +2455,9 @@ size_t wcsftime(wchar_t *__restrict s, size_t maxsize, { return wcsftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE); } -libc_hidden_def(wcsftime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ -libc_hidden_proto(__XL_NPP(wcsftime)) size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize, const wchar_t *__restrict format, const struct tm *__restrict timeptr __LOCALE_PARAM ) @@ -2467,7 +2465,9 @@ size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize, #warning wcsftime always fails return 0; /* always fail */ } -libc_hidden_def(__XL_NPP(wcsftime)) +#ifdef L_wcsftime_l +libc_hidden_def(wcsftime_l) +#endif #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ -- cgit v1.2.3 From 3e223e6c18912091bf75b77f9c7ae2ded0063037 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 10:50:01 +0100 Subject: _wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions Signed-off-by: Peter S. Mazinger --- libc/misc/wctype/_wctype.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c index 296293ff3..89269f45e 100644 --- a/libc/misc/wctype/_wctype.c +++ b/libc/misc/wctype/_wctype.c @@ -140,28 +140,27 @@ enum { #ifdef __UCLIBC_DO_XLOCALE #define ISW_FUNC_BODY(NAME) \ -libc_hidden_proto(__PASTE3(isw,NAME,_l)) \ int __PASTE3(isw,NAME,_l) (wint_t wc, __locale_t l) \ { \ return iswctype_l(wc, __PASTE2(_CTYPE_is,NAME), l); \ -} \ -libc_hidden_def(__PASTE3(isw,NAME,_l)) +} #else /* __UCLIBC_DO_XLOCALE */ #define ISW_FUNC_BODY(NAME) \ -libc_hidden_proto(__PASTE2(isw,NAME)) \ int __PASTE2(isw,NAME) (wint_t wc) \ { \ return iswctype(wc, __PASTE2(_CTYPE_is,NAME)); \ -} \ -libc_hidden_def(__PASTE2(isw,NAME)) +} #endif /* __UCLIBC_DO_XLOCALE */ /**********************************************************************/ #if defined(L_iswalnum) || defined(L_iswalnum_l) ISW_FUNC_BODY(alnum); +# ifdef L_iswalnum +libc_hidden_def(iswalnum) +# endif #endif /**********************************************************************/ @@ -198,6 +197,9 @@ ISW_FUNC_BODY(graph); #if defined(L_iswlower) || defined(L_iswlower_l) ISW_FUNC_BODY(lower); +# ifdef L_iswlower +libc_hidden_def(iswlower) +# endif #endif /**********************************************************************/ @@ -216,12 +218,20 @@ ISW_FUNC_BODY(punct); #if defined(L_iswspace) || defined(L_iswspace_l) ISW_FUNC_BODY(space); +# ifdef L_iswspace +libc_hidden_def(iswspace) +# else +libc_hidden_def(iswspace_l) +# endif #endif /**********************************************************************/ #if defined(L_iswupper) || defined(L_iswupper_l) ISW_FUNC_BODY(upper); +# ifdef L_iswupper +libc_hidden_def(iswupper) +# endif #endif /**********************************************************************/ @@ -461,7 +471,6 @@ wctype_t wctype_l (const char *property, __locale_t locale) { return wctype(property); } -libc_hidden_def(wctype_l) #endif /**********************************************************************/ -- cgit v1.2.3 From 14b0a648ca751773fe28dd98f2c031bf6287e52a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 11:06:25 +0100 Subject: ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31 Signed-off-by: Peter S. Mazinger --- libc/misc/ctype/ctype.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c index 54cd21e87..1c40b244a 100644 --- a/libc/misc/ctype/ctype.c +++ b/libc/misc/ctype/ctype.c @@ -306,8 +306,6 @@ int tolower_l(int c, __locale_t l) return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c; } libc_hidden_def(tolower_l) -/*remove after 0.9.31. See ctype.h for why. - *weak_alias (tolower_l, __tolower_l) */ #endif /**********************************************************************/ @@ -346,8 +344,6 @@ int toupper_l(int c, __locale_t l) #endif return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c; } -/*remove after 0.9.31. See ctype.h for why. - *weak_alias (toupper_l, __toupper_l) */ #endif /**********************************************************************/ -- cgit v1.2.3 From 24a14a0bb867f02ba87b498ee64e3ed6ce33b27a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 10 Mar 2011 11:34:38 +0100 Subject: time.c, time.h: remove unused hidden strftime/strptime Signed-off-by: Peter S. Mazinger --- libc/misc/time/time.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index ccfe3444d..19d68e105 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -799,7 +799,6 @@ size_t strftime(char *__restrict s, size_t maxsize, { return strftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE); } -libc_hidden_def(strftime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -999,7 +998,6 @@ static int load_field(int k, const struct tm *__restrict timeptr) #warning TODO: Check multibyte format string validity. #endif -libc_hidden_proto(__XL_NPP(strftime)) size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize, const char *__restrict format, const struct tm *__restrict timeptr __LOCALE_PARAM ) @@ -1291,7 +1289,9 @@ OUTPUT: } goto LOOP; } -libc_hidden_def(__XL_NPP(strftime)) +# ifdef L_strftime_l +libc_hidden_def(strftime_l) +# endif #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -1314,7 +1314,6 @@ char *strptime(const char *__restrict buf, const char *__restrict format, { return strptime_l(buf, format, tm, __UCLIBC_CURLOCALE); } -libc_hidden_def(strptime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -1460,7 +1459,6 @@ static const unsigned char spec[] = { #define MAX_PUSH 4 -libc_hidden_proto(__XL_NPP(strptime)) char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict format, struct tm *__restrict tm __LOCALE_PARAM) { @@ -1671,7 +1669,9 @@ LOOP: } return NULL; } -libc_hidden_def(__XL_NPP(strptime)) +# ifdef L_strptime_l +libc_hidden_def(strptime_l) +# endif #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ -- cgit v1.2.3