diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-18 23:07:26 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-18 23:07:26 +0200 |
commit | 93f8a2e834eed69aff7ef3be8c2baba14bab0658 (patch) | |
tree | 347b5239f26d3b5f526fffcf7afe151e83124a61 /libc | |
parent | 21730caa6647f645974e132ca8afec79b4eeab2b (diff) |
convert // comments to /**/; remove empty #if/#endif pairs. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libc')
52 files changed, 64 insertions, 214 deletions
diff --git a/libc/inet/addr.c b/libc/inet/addr.c index 8bef59ffa..c71d4d4f7 100644 --- a/libc/inet/addr.c +++ b/libc/inet/addr.c @@ -43,9 +43,6 @@ * leading 0 -> octal * all else -> decimal */ -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif int inet_aton(const char *cp, struct in_addr *addrptr) { in_addr_t addr; diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index a9fe3c884..b91486f53 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -70,9 +70,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <net/if.h> #include <ifaddrs.h> -#ifdef __UCLIBC_HAS_IPV6__ -#endif - #define GAIH_OKIFUNSPEC 0x0100 #define GAIH_EAI ~(GAIH_OKIFUNSPEC) @@ -638,8 +635,6 @@ gaih_inet(const char *name, const struct gaih_service *service, do { tmpbuflen *= 2; tmpbuf = alloca(tmpbuflen); - //if (tmpbuf == NULL) - // return -EAI_MEMORY; rc = gethostbyaddr_r(at2->addr, ((at2->family == AF_INET6) ? sizeof(struct in6_addr) diff --git a/libc/inet/if_index.c b/libc/inet/if_index.c index 36012975f..750a4649e 100644 --- a/libc/inet/if_index.c +++ b/libc/inet/if_index.c @@ -53,11 +53,11 @@ if_nametoindex(const char* ifname) strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); if (ioctl (fd, SIOCGIFINDEX, &ifr) < 0) { - // close never fails here, fd is just a unconnected socket - //int saved_errno = errno; + /* close never fails here, fd is just a unconnected socket. + *int saved_errno = errno; */ close(fd); - //if (saved_errno == EINVAL) - // __set_errno(ENOSYS); + /*if (saved_errno == EINVAL) + * __set_errno(ENOSYS); */ return 0; } diff --git a/libc/inet/inet_net.c b/libc/inet/inet_net.c index 6bade8aee..3740311f9 100644 --- a/libc/inet/inet_net.c +++ b/libc/inet/inet_net.c @@ -38,10 +38,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - /* * Internet network address interpretation routine. * The library routines call this routine to interpret diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index f71a426f8..1337214e5 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -56,9 +56,6 @@ # include <wchar.h> #endif -#ifdef USE_IN_LIBIO -#endif - /* * Unix authenticator operations vector */ diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index b3aedc558..8dbae729f 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -51,9 +51,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; # define fputs(s, f) _IO_fputs (s, f) #endif -#ifdef USE_IN_LIBIO -#endif - static char *auth_errmsg (enum auth_stat stat) internal_function; #ifdef __UCLIBC_HAS_THREADS__ diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index a6d4fbd42..26abc3e17 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -65,9 +65,6 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; # include <wchar.h> #endif -#ifdef USE_IN_LIBIO -#endif - extern u_long _create_xid (void) attribute_hidden; #define MCALL_MSG_SIZE 24 diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index f34e92db6..745ea776a 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -87,10 +87,6 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #endif #include <sys/uio.h> -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - /* some forward declarations */ static int __ivaliduser2(FILE *hostf, u_int32_t raddr, diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c index 6abb49ac4..e46f66b58 100644 --- a/libc/misc/ctype/ctype.c +++ b/libc/misc/ctype/ctype.c @@ -35,13 +35,10 @@ #include <stdint.h> #include <assert.h> #include <locale.h> -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif #ifdef __UCLIBC_HAS_XLOCALE__ -#include <xlocale.h> -#endif /* __UCLIBC_HAS_XLOCALE__ */ +# include <xlocale.h> +#endif /**********************************************************************/ #ifdef __UCLIBC_HAS_CTYPE_TABLES__ @@ -276,9 +273,6 @@ IS_FUNC_BODY(xdigit); #ifdef L_tolower #undef tolower -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif #ifdef __UCLIBC_HAS_CTYPE_TABLES__ int tolower(int c) @@ -312,17 +306,14 @@ 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) +/*remove after 0.9.31. See ctype.h for why. + *weak_alias (tolower_l, __tolower_l) */ #endif /**********************************************************************/ #ifdef L_toupper #undef toupper -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif #ifdef __UCLIBC_HAS_CTYPE_TABLES__ int toupper(int c) @@ -356,8 +347,8 @@ int toupper_l(int c, __locale_t l) 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) +/*remove after 0.9.31. See ctype.h for why. + *weak_alias (toupper_l, __toupper_l) */ #endif /**********************************************************************/ diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c index 672ef15a4..e85dd3003 100644 --- a/libc/misc/dirent/opendir.c +++ b/libc/misc/dirent/opendir.c @@ -93,11 +93,11 @@ DIR *opendir(const char *name) * to worry about it right now (if ever). */ if (fstat(fd, &statbuf) < 0) { - // this close() never fails - //int saved_errno; - //saved_errno = errno; + /* this close() never fails + *int saved_errno; + *saved_errno = errno; */ close(fd); - //__set_errno(saved_errno); + /*__set_errno(saved_errno);*/ return NULL; } diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c index 28f744a26..f069e5cea 100644 --- a/libc/misc/fnmatch/fnmatch.c +++ b/libc/misc/fnmatch/fnmatch.c @@ -61,10 +61,7 @@ #endif #ifdef __UCLIBC__ -#define __memset memset -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif +# define __memset memset #endif /* For platform which support the ISO C amendement 1 functionality we @@ -73,10 +70,6 @@ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ # include <wchar.h> # include <wctype.h> -# ifdef __UCLIBC__ -# ifdef __UCLIBC_HAS_LOCALE__ -# endif -# endif #endif /* We need some of the locale data (the collation sequence information) diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c index 74f6e1354..70607fd4e 100644 --- a/libc/misc/ftw/ftw.c +++ b/libc/misc/ftw/ftw.c @@ -83,9 +83,6 @@ char *alloca (); # include <sys/stat.h> #endif -#ifdef __UCLIBC_HAS_LFS__ -#endif - #if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy char *stpcpy (); #endif diff --git a/libc/misc/glob/glob-susv3.c b/libc/misc/glob/glob-susv3.c index b242a45fa..1d64249c7 100644 --- a/libc/misc/glob/glob-susv3.c +++ b/libc/misc/glob/glob-susv3.c @@ -209,9 +209,6 @@ int __glob_sort(const void *a, const void *b) } #endif /* !__GLOB64 */ -#ifdef __GLOB64 -#else -#endif int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), glob_t *g) { const char *p=pat, *d; @@ -285,9 +282,6 @@ libc_hidden_def(glob64) libc_hidden_def(glob) #endif -#ifdef __GLOB64 -#else -#endif void globfree(glob_t *g) { size_t i; diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c index 8f27443ff..488f22970 100644 --- a/libc/misc/glob/glob.c +++ b/libc/misc/glob/glob.c @@ -469,9 +469,6 @@ static int glob_in_dir (const char *pattern, const char *directory, int flags, return GLOB_NOSPACE; } -#ifdef COMPILE_GLOB64 -#else -#endif /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. If a directory cannot be opened or read and ERRFUNC is not nil, diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 3588768a3..b166aaaa7 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -28,12 +28,6 @@ #include <sys/sysmacros.h> -#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ -#endif -#ifndef __ARCH_HAS_NO_LDSO__ - -#endif - #ifndef SHARED void *__libc_stack_end = NULL; diff --git a/libc/misc/internals/errno.c b/libc/misc/internals/errno.c index 65728f863..029fdcfde 100644 --- a/libc/misc/internals/errno.c +++ b/libc/misc/internals/errno.c @@ -1,7 +1,5 @@ #include "internal_errno.h" -#ifdef __UCLIBC_HAS_THREADS__ -#endif int errno = 0; int h_errno = 0; diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index e0bf922c4..cbd4ced7a 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -45,9 +45,6 @@ #include <sys/time.h> #include "tempname.h" -#ifdef __UCLIBC_HAS_LFS__ -#endif - /* Return nonzero if DIR is an existent directory. */ static int direxists (const char *dir) { diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index a9fd952f9..52055a2d2 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -58,9 +58,6 @@ #include <ctype.h> #include <stdio.h> -#ifdef __UCLIBC_HAS_CTYPE_TABLES__ -#endif - #ifdef __UCLIBC_MJN3_ONLY__ #ifdef L_setlocale #warning TODO: Make the link_warning()s a config option? @@ -351,9 +348,6 @@ libc_hidden_def(localeconv) /**********************************************************************/ #if defined(L__locale_init) && !defined(__LOCALE_C_ONLY) -#ifndef __UCLIBC_HAS_XLOCALE__ -#endif - struct __uclibc_locale_struct __global_locale_data; __locale_t __global_locale = &__global_locale_data; diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c index ada380632..8f2e18ce4 100644 --- a/libc/misc/regex/regcomp.c +++ b/libc/misc/regex/regcomp.c @@ -791,9 +791,6 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length, /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ -#ifdef __UCLIBC_HAS_WCHAR__ -#endif - static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index fc51610c8..3550698d3 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -6035,17 +6035,18 @@ byte_re_match_2_internal ( { /* No. So allocate them with malloc. We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ -// regex specs say: -// "If REGS_UNALLOCATED, allocate space in the regs structure -// for max(RE_NREGS, re_nsub + 1) groups" -// but real-world testsuites fail with contrived examples -// with lots of groups. -// I don't see why we can't just allocate exact needed number. -// Incidentally, it makes RE_NREGS unused. -// -// regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG -// regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong -// good one which passes uclibc test/regex/tst-regex2.c: +/* regex specs say: + * "If REGS_UNALLOCATED, allocate space in the regs structure + * for max(RE_NREGS, re_nsub + 1) groups" + * but real-world testsuites fail with contrived examples + * with lots of groups. + * I don't see why we can't just allocate exact needed number. + * Incidentally, it makes RE_NREGS unused. + * + * regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG + * regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong + * good one which passes uclibc test/regex/tst-regex2.c: + */ regs->num_regs = num_regs + 1; regs->start = TALLOC (regs->num_regs, regoff_t); regs->end = TALLOC (regs->num_regs, regoff_t); diff --git a/libc/misc/statfs/fstatvfs64.c b/libc/misc/statfs/fstatvfs64.c index efaea03c2..f57e9d9bb 100644 --- a/libc/misc/statfs/fstatvfs64.c +++ b/libc/misc/statfs/fstatvfs64.c @@ -29,12 +29,8 @@ #include <sys/statvfs.h> - #undef stat #define stat stat64 -#if !defined __UCLIBC_LINUX_SPECIFIC__ -#else -#endif int fstatvfs64 (int fd, struct statvfs64 *buf) { diff --git a/libc/misc/statfs/statvfs64.c b/libc/misc/statfs/statvfs64.c index 8716b1517..9923e66a4 100644 --- a/libc/misc/statfs/statvfs64.c +++ b/libc/misc/statfs/statvfs64.c @@ -31,9 +31,6 @@ #undef stat #define stat stat64 -#if defined __UCLIBC_LINUX_SPECIFIC__ -#else -#endif int statvfs64 (const char *file, struct statvfs64 *buf) { diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c index f28385d35..474f7f098 100644 --- a/libc/misc/ttyent/getttyent.c +++ b/libc/misc/ttyent/getttyent.c @@ -35,11 +35,7 @@ #include <string.h> #include <stdlib.h> #ifdef __UCLIBC_HAS_THREADS__ -#include <pthread.h> -#endif - -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ +# include <pthread.h> #endif static char zapchar; diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index 7d8a2d3c1..beb00591c 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -47,15 +47,16 @@ static void __setutent(void) if (O_CLOEXEC == 0) { /* Make sure the file will be closed on exec() */ fcntl(static_fd, F_SETFD, FD_CLOEXEC); - // thus far, {G,S}ETFD only has this single flag, - // and setting it never fails. - //int ret = fcntl(static_fd, F_GETFD, 0); - //if (ret >= 0) { - // ret = fcntl(static_fd, F_SETFD, ret | FD_CLOEXEC); - //} - //if (ret < 0) { - // static_fd = -1; - //} + /* thus far, {G,S}ETFD only has this single flag, + * and setting it never fails. + *int ret = fcntl(static_fd, F_GETFD, 0); + *if (ret >= 0) { + * ret = fcntl(static_fd, F_SETFD, ret | FD_CLOEXEC); + *} + *if (ret < 0) { + * static_fd = -1; + *} + */ } return; } diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c index 6ab6bab77..6340281c7 100644 --- a/libc/misc/wctype/_wctype.c +++ b/libc/misc/wctype/_wctype.c @@ -44,10 +44,6 @@ #ifdef __UCLIBC_HAS_XLOCALE__ #include <xlocale.h> -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif /* __UCLIBC_HAS_XLOCALE__ */ - -#ifdef __UCLIBC_HAS_CTYPE_TABLES__ #endif /* We know wide char support is enabled. We wouldn't be here otherwise. */ @@ -682,11 +678,12 @@ wint_t towctrans(wint_t wc, wctrans_t desc) { if ((unsigned int)(desc - _CTYPE_tolower) <= (_CTYPE_toupper - _CTYPE_tolower)) { /* Transliteration is either tolower or toupper. */ -// I think it's wrong: _toupper(c) assumes that c is a *lowercase* *letter* - -// it is defined as ((c) ^ 0x20)! -// if ((__uwchar_t) wc <= 0x7f) { -// return (desc == _CTYPE_tolower) ? _tolower(wc) : _toupper(wc); -// } +/* I think it's wrong: _toupper(c) assumes that c is a *lowercase* *letter* - + * it is defined as ((c) ^ 0x20)! + * if ((__uwchar_t) wc <= 0x7f) { + * return (desc == _CTYPE_tolower) ? _tolower(wc) : _toupper(wc); + * } + */ __uwchar_t c = wc | 0x20; /* lowercase if it's a letter */ if (c >= 'a' && c <= 'z') { if (desc == _CTYPE_toupper) diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c index b573b2e14..1737ccc48 100644 --- a/libc/misc/wordexp/wordexp.c +++ b/libc/misc/wordexp/wordexp.c @@ -36,15 +36,14 @@ #include <wordexp.h> #define __WORDEXP_FULL -//#undef __WORDEXP_FULL /* * This is a recursive-descent-style word expansion routine. */ /* These variables are defined and initialized in the startup code. */ -//extern int __libc_argc; -//extern char **__libc_argv; +/*extern int __libc_argc;*/ +/*extern char **__libc_argv;*/ /* FIXME!!!! */ int attribute_hidden __libc_argc; diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index b4f6c98f7..f5c22f885 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -32,14 +32,10 @@ #include <grp.h> #include <paths.h> #ifdef __UCLIBC_HAS_SHADOW__ -#include <shadow.h> +# include <shadow.h> #endif #include <bits/uClibc_mutex.h> -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - /**********************************************************************/ /* Prototypes for internal functions. */ diff --git a/libc/stdio/_cs_funcs.c b/libc/stdio/_cs_funcs.c index 49b636b19..9df93f227 100644 --- a/libc/stdio/_cs_funcs.c +++ b/libc/stdio/_cs_funcs.c @@ -7,10 +7,6 @@ #include "_stdio.h" -#ifdef __UCLIBC_HAS_LFS__ -#else -#endif - /**********************************************************************/ #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ /**********************************************************************/ diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 11d5c7854..914311877 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -77,12 +77,6 @@ #include <bits/uClibc_fpmax.h> #endif /* __UCLIBC_HAS_FLOATS__ */ -#ifdef __UCLIBC_HAS_WCHAR__ -#endif -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - #ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ #ifdef L_vfscanf /* only emit this once */ diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c index d651cc965..f288cb501 100644 --- a/libc/stdio/_vfprintf.c +++ b/libc/stdio/_vfprintf.c @@ -115,9 +115,6 @@ #include <bits/uClibc_uintmaxtostr.h> #include <bits/uClibc_va_copy.h> -#ifdef __UCLIBC_HAS_WCHAR__ -#endif - /* Some older or broken gcc toolchains define LONG_LONG_MAX but not * LLONG_MAX. Since LLONG_MAX is part of the standard, that's what * we use. So complain if we do not have it but should. @@ -714,10 +711,6 @@ void attribute_hidden _ppfs_setargs(register ppfs_t *ppfs) /**********************************************************************/ #ifdef L__ppfs_parsespec -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - /* Notes: argtype differs from glibc for the following: * mine glibc * lc PA_WCHAR PA_CHAR the standard says %lc means %C diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index fc25002ee..56a284c02 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -76,10 +76,6 @@ libc_hidden_def(__fgetc_unlocked) strong_alias(__fgetc_unlocked,fgetc_unlocked) libc_hidden_def(fgetc_unlocked) -///* libc_hidden_proto(__getc_unlocked) */ -//strong_alias(__fgetc_unlocked,__getc_unlocked) -//libc_hidden_def(__getc_unlocked) - strong_alias(__fgetc_unlocked,getc_unlocked) libc_hidden_def(getc_unlocked) diff --git a/libc/stdio/ftello.c b/libc/stdio/ftello.c index ad8f4df60..e8ff36533 100644 --- a/libc/stdio/ftello.c +++ b/libc/stdio/ftello.c @@ -7,9 +7,6 @@ #include "_stdio.h" -#ifdef __UCLIBC_HAS_LFS__ -#endif - #ifndef __DO_LARGEFILE # define FTELL ftell # define OFFSET_TYPE long int diff --git a/libc/stdlib/_strtod.c b/libc/stdlib/_strtod.c index 71fba8248..dc5d55743 100644 --- a/libc/stdlib/_strtod.c +++ b/libc/stdlib/_strtod.c @@ -172,10 +172,6 @@ extern void __fp_range_check(__fpmax_t y, __fpmax_t x) attribute_hidden; /**********************************************************************/ #if defined(L___strtofpmax) || defined(L___strtofpmax_l) || defined(L___wcstofpmax) || defined(L___wcstofpmax_l) -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - #if defined(L___wcstofpmax) || defined(L___wcstofpmax_l) #define __strtofpmax __wcstofpmax diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c index 416db6d0c..97f318a57 100644 --- a/libc/stdlib/arc4random.c +++ b/libc/stdlib/arc4random.c @@ -35,7 +35,6 @@ #include <sys/time.h> #ifdef __ARC4RANDOM_USE_ERANDOM__ #include <sys/sysctl.h> -//libc_hidden_proto(sysctl) #endif diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c index c7bff6473..eb34dfc0b 100644 --- a/libc/stdlib/stdlib.c +++ b/libc/stdlib/stdlib.c @@ -493,10 +493,6 @@ unsigned long attribute_hidden _stdlib_strto_l(register const Wchar * __restrict /* This is the main work fuction which handles both strtol (sflag = 1) and * strtoul (sflag = 0). */ -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - unsigned long attribute_hidden __XL_NPP(_stdlib_strto_l)(register const Wchar * __restrict str, Wchar ** __restrict endptr, int base, int sflag __LOCALE_PARAM) diff --git a/libc/string/i386/memchr.c b/libc/string/i386/memchr.c index c2fc44b4a..1960f6ba4 100644 --- a/libc/string/i386/memchr.c +++ b/libc/string/i386/memchr.c @@ -33,7 +33,7 @@ #include <string.h> #undef memchr -//#define memchr TESTING +/*#define memchr TESTING*/ void *memchr(const void *s, int c, size_t count) { void *edi; diff --git a/libc/string/i386/memmove.c b/libc/string/i386/memmove.c index 72d8002a5..0ec8016a5 100644 --- a/libc/string/i386/memmove.c +++ b/libc/string/i386/memmove.c @@ -33,7 +33,7 @@ #include <string.h> #undef memmove -//#define memmove TESTING +/*#define memmove TESTING*/ void *memmove(void *dest, const void *src, size_t n) { int eax, ecx, esi, edi; diff --git a/libc/string/i386/strchrnul.c b/libc/string/i386/strchrnul.c index c4da2b587..d48427214 100644 --- a/libc/string/i386/strchrnul.c +++ b/libc/string/i386/strchrnul.c @@ -9,7 +9,7 @@ #include <string.h> #undef strchrnul -//#define strchrnul TESTING +/*#define strchrnul TESTING*/ char *strchrnul(const char *s, int c) { int esi; diff --git a/libc/string/i386/strncat.c b/libc/string/i386/strncat.c index 640b0d213..12f0a302b 100644 --- a/libc/string/i386/strncat.c +++ b/libc/string/i386/strncat.c @@ -33,7 +33,7 @@ #include <string.h> #undef strncat -//#define strncat TESTING +/*#define strncat TESTING*/ char *strncat(char * dest, const char * src, size_t count) { int esi, edi, eax, ecx, edx; diff --git a/libc/string/i386/strncpy.c b/libc/string/i386/strncpy.c index e1c7f1dcf..99d104b0d 100644 --- a/libc/string/i386/strncpy.c +++ b/libc/string/i386/strncpy.c @@ -33,7 +33,7 @@ #include <string.h> #undef strncpy -//#define strncpy TESTING +/*#define strncpy TESTING*/ char *strncpy(char * dest, const char * src, size_t count) { int esi, edi, ecx, eax; diff --git a/libc/string/i386/strnlen.c b/libc/string/i386/strnlen.c index 3abde48e2..f58f698d1 100644 --- a/libc/string/i386/strnlen.c +++ b/libc/string/i386/strnlen.c @@ -35,7 +35,7 @@ #ifdef __USE_GNU #undef strnlen -//#define strnlen TESTING +/*#define strnlen TESTING*/ size_t strnlen(const char *s, size_t count) { int edx; diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c index 20b3cd8d7..33e48fa22 100644 --- a/libc/string/strcasecmp.c +++ b/libc/string/strcasecmp.c @@ -12,8 +12,6 @@ #ifdef WANT_WIDE # define strcasecmp wcscasecmp # define strcasecmp_l wcscasecmp_l -# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__) -# endif # ifdef __UCLIBC_DO_XLOCALE # define TOLOWER(C) towlower_l((C), locale_arg) # else @@ -23,8 +21,6 @@ # ifdef __UCLIBC_DO_XLOCALE # define TOLOWER(C) tolower_l((C), locale_arg) # else -#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif # define TOLOWER(C) tolower((C)) # endif #endif diff --git a/libc/string/strcasestr.c b/libc/string/strcasestr.c index 3ca4df088..3334086bf 100644 --- a/libc/string/strcasestr.c +++ b/libc/string/strcasestr.c @@ -8,10 +8,6 @@ #include "_string.h" #include <ctype.h> -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - char *strcasestr(const char *s1, const char *s2) { register const char *s = s1; diff --git a/libc/string/strncasecmp.c b/libc/string/strncasecmp.c index 8f768d6f1..b290e5a22 100644 --- a/libc/string/strncasecmp.c +++ b/libc/string/strncasecmp.c @@ -12,8 +12,6 @@ #ifdef WANT_WIDE # define strncasecmp wcsncasecmp # define strncasecmp_l wcsncasecmp_l -# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__) -# endif # ifdef __UCLIBC_DO_XLOCALE # define TOLOWER(C) towlower_l((C), locale_arg) # else diff --git a/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c b/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c index 941e5a625..f12309eaf 100644 --- a/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c +++ b/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c @@ -20,9 +20,6 @@ #include <locale.h> #include <stdlib.h> -#ifdef __UCLIBC_HAS_WCHAR__ -#endif - int __aeabi_MB_CUR_MAX (void) { diff --git a/libc/sysdeps/linux/common/bits/uClibc_ctype.h b/libc/sysdeps/linux/common/bits/uClibc_ctype.h index 9fe1f5fc4..43371286b 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_ctype.h +++ b/libc/sysdeps/linux/common/bits/uClibc_ctype.h @@ -143,10 +143,11 @@ __END_DECLS # define __ispunct(c) __body(ispunct,c) # define __isgraph(c) __body(isgraph,c) -//locale-aware ctype.h has no __tolower, why stub locale -//tries to have it? remove after 0.9.31 -//# define __tolower(c) __body(tolower,c) -//# define __toupper(c) __body(toupper,c) +/*locale-aware ctype.h has no __tolower, why stub locale + *tries to have it? remove after 0.9.31 + *# define __tolower(c) __body(tolower,c) + *# define __toupper(c) __body(toupper,c) + */ /* Do not combine in one #if - unifdef tool is not that clever */ # ifndef __NO_CTYPE diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c index 63b9b750e..c02f66bb9 100644 --- a/libc/sysdeps/linux/common/getdirname.c +++ b/libc/sysdeps/linux/common/getdirname.c @@ -25,10 +25,6 @@ #include <stdlib.h> #include <string.h> -#ifdef __UCLIBC_HAS_LFS__ -#else -#endif - /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ diff --git a/libc/sysdeps/linux/sparc/sigaction.c b/libc/sysdeps/linux/sparc/sigaction.c index 950fa2645..3964ae183 100644 --- a/libc/sysdeps/linux/sparc/sigaction.c +++ b/libc/sysdeps/linux/sparc/sigaction.c @@ -43,10 +43,10 @@ int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oac if (act) { kact.k_sa_handler = act->sa_handler; - // BUG?! kact.sa_mask is a long, but sigset_t is a vector - // of longs and it may be bigger (in glibc, it _is_ bigger). - // Should we do this instead? - // kact.sa_mask = act->sa_mask.__val[0]; + /* BUG?! kact.sa_mask is a long, but sigset_t is a vector + /* of longs and it may be bigger (in glibc, it _is_ bigger). + /* Should we do this instead? + /* kact.sa_mask = act->sa_mask.__val[0]; */ memcpy(&kact.sa_mask, &act->sa_mask, sizeof(sigset_t)); kact.sa_flags = act->sa_flags; if (kact.sa_flags & SA_SIGINFO) @@ -64,11 +64,11 @@ int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oac stub, _NSIG / 8); - // BUG?! if ret == -1, we return -1 but do not set errno?! + /* BUG?! if ret == -1, we return -1 but do not set errno?! */ if (ret >= 0 || errno != ENOSYS) { if (oact && ret >= 0) { oact->sa_handler = koact.k_sa_handler; - // maybe oact->sa_mask.__val[0] = koact.sa_mask; ? + /* maybe oact->sa_mask.__val[0] = koact.sa_mask;? */ memcpy(&oact->sa_mask, &koact.sa_mask, sizeof(sigset_t)); oact->sa_flags = koact.sa_flags; oact->sa_restorer = koact.sa_restorer; diff --git a/libc/unistd/fpathconf.c b/libc/unistd/fpathconf.c index 6f618ee0c..02b4445a7 100644 --- a/libc/unistd/fpathconf.c +++ b/libc/unistd/fpathconf.c @@ -24,9 +24,6 @@ #include <fcntl.h> #include <sys/stat.h> #include <sys/statfs.h> -//#include <sys/statvfs.h> - -//#include "linux_fsinfo.h" #ifndef __USE_FILE_OFFSET64 diff --git a/libc/unistd/pathconf.c b/libc/unistd/pathconf.c index bbdceabcc..84f20ed81 100644 --- a/libc/unistd/pathconf.c +++ b/libc/unistd/pathconf.c @@ -29,7 +29,6 @@ #include <fcntl.h> #include <sys/stat.h> #include <sys/statfs.h> -//#include <sys/statvfs.h> extern __typeof(statfs) __libc_statfs; diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c index de4c14a24..0c0416e6d 100644 --- a/libc/unistd/sleep.c +++ b/libc/unistd/sleep.c @@ -27,9 +27,6 @@ /* version perusing nanosleep */ #if defined __UCLIBC_HAS_REALTIME__ -//libc_hidden_proto(__sigaddset) -//libc_hidden_proto(__sigemptyset) -//libc_hidden_proto(__sigismember) #if 0 /* This is a quick and dirty, but not 100% compliant with diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c index 46b1b98ad..10c5bf1a5 100644 --- a/libc/unistd/usershell.c +++ b/libc/unistd/usershell.c @@ -42,10 +42,6 @@ #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98) -#ifdef __UCLIBC_HAS_XLOCALE__ -#elif defined __UCLIBC_HAS_CTYPE_TABLES__ -#endif - /* * Local shells should NOT be added here. They should be added in * /etc/shells. |