diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | extra/Configs/Config.alpha | 6 | ||||
-rw-r--r-- | extra/Configs/Config.arm | 6 | ||||
-rw-r--r-- | extra/Configs/Config.cross.arm.uclinux | 6 | ||||
-rw-r--r-- | extra/Configs/Config.h8300 | 6 | ||||
-rw-r--r-- | extra/Configs/Config.i386 | 6 | ||||
-rw-r--r-- | extra/Configs/Config.i960 | 6 | ||||
-rw-r--r-- | extra/Configs/Config.m68k | 6 | ||||
-rw-r--r-- | extra/Configs/Config.m68k.coff | 6 | ||||
-rw-r--r-- | extra/Configs/Config.mips | 6 | ||||
-rw-r--r-- | extra/Configs/Config.mipsel | 6 | ||||
-rw-r--r-- | extra/Configs/Config.powerpc | 6 | ||||
-rw-r--r-- | extra/Configs/Config.sh | 6 | ||||
-rw-r--r-- | extra/Configs/Config.sparc | 6 | ||||
-rw-r--r-- | extra/Configs/Config.v850e | 6 | ||||
-rwxr-xr-x | extra/Configs/uClibc_config_fix.pl | 7 | ||||
-rw-r--r-- | include/stdlib.h | 16 | ||||
-rw-r--r-- | libc/stdio/scanf.c | 16 | ||||
-rw-r--r-- | libc/stdlib/Makefile | 5 | ||||
-rw-r--r-- | libc/stdlib/drand48-iter.c | 39 | ||||
-rw-r--r-- | libc/stdlib/srand48_r.c | 6 |
21 files changed, 1 insertions, 177 deletions
@@ -158,11 +158,6 @@ uClibc_config: Makefile Config else \ echo "#undef __UCLIBC_HAS_FLOATS__" >> include/bits/uClibc_config.h ; \ fi - @if [ "$(HAS_LONG_LONG)" = "true" ] ; then \ - echo "#define __UCLIBC_HAS_LONG_LONG__ 1" >> include/bits/uClibc_config.h ; \ - else \ - echo "#undef __UCLIBC_HAS_LONG_LONG__" >> include/bits/uClibc_config.h ; \ - fi @if [ "$(HAS_LOCALE)" = "true" ] ; then \ echo "#define __UCLIBC_HAS_LOCALE__ 1" >> include/bits/uClibc_config.h ; \ else \ diff --git a/extra/Configs/Config.alpha b/extra/Configs/Config.alpha index 539093939..ab8e4bfe6 100644 --- a/extra/Configs/Config.alpha +++ b/extra/Configs/Config.alpha @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = true -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = true diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm index 8dfb0a511..1fa94378d 100644 --- a/extra/Configs/Config.arm +++ b/extra/Configs/Config.arm @@ -71,12 +71,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = false - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.cross.arm.uclinux b/extra/Configs/Config.cross.arm.uclinux index ff14d7f3b..4e45030b9 100644 --- a/extra/Configs/Config.cross.arm.uclinux +++ b/extra/Configs/Config.cross.arm.uclinux @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.h8300 b/extra/Configs/Config.h8300 index 14d719e55..8062fe64b 100644 --- a/extra/Configs/Config.h8300 +++ b/extra/Configs/Config.h8300 @@ -73,12 +73,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to `false' if you don't have/need locale support; `true' otherwise. # NOTE: Currently does not affect collation. # You must also generate the locale data and associated .h file. diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 index 8f50ef4e7..13e4916bb 100644 --- a/extra/Configs/Config.i386 +++ b/extra/Configs/Config.i386 @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.i960 b/extra/Configs/Config.i960 index e0ac01b7a..be1a30b66 100644 --- a/extra/Configs/Config.i960 +++ b/extra/Configs/Config.i960 @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = false # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k index b022a8e1c..b204ef56a 100644 --- a/extra/Configs/Config.m68k +++ b/extra/Configs/Config.m68k @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.m68k.coff b/extra/Configs/Config.m68k.coff index 0138a0c57..f5d49ef11 100644 --- a/extra/Configs/Config.m68k.coff +++ b/extra/Configs/Config.m68k.coff @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.mips b/extra/Configs/Config.mips index 4ea3c130e..2103dea7d 100644 --- a/extra/Configs/Config.mips +++ b/extra/Configs/Config.mips @@ -70,12 +70,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.mipsel b/extra/Configs/Config.mipsel index 4e00504e1..2c796fe47 100644 --- a/extra/Configs/Config.mipsel +++ b/extra/Configs/Config.mipsel @@ -70,12 +70,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc index 873f1a91e..1df9c3e05 100644 --- a/extra/Configs/Config.powerpc +++ b/extra/Configs/Config.powerpc @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh index 8ac29bba5..a88f9d601 100644 --- a/extra/Configs/Config.sh +++ b/extra/Configs/Config.sh @@ -95,12 +95,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = false - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.sparc b/extra/Configs/Config.sparc index 9e88ef32f..188cfaf13 100644 --- a/extra/Configs/Config.sparc +++ b/extra/Configs/Config.sparc @@ -67,12 +67,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = true -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to 'false if you don't need shadow password support. HAS_SHADOW = false diff --git a/extra/Configs/Config.v850e b/extra/Configs/Config.v850e index 144c5ab79..8c5646213 100644 --- a/extra/Configs/Config.v850e +++ b/extra/Configs/Config.v850e @@ -72,12 +72,6 @@ HAS_FLOATING_POINT = true # of C99 math library features. Costs an extra 35k or so on x86. DO_C99_MATH = false -# Set this to `false' if you don't have/need "(unsigned) long long int" support. -# Set it to `true' otherwise. -# Affects *printf and *scanf functions. -# Also omits strto(u)ll, and (u)lltostr from the library if `false'. -HAS_LONG_LONG = true - # Set this to `false' if you don't have/need locale support; `true' otherwise. # NOTE: Currently does not affect collation. # You must also generate the locale data and associated .h file. diff --git a/extra/Configs/uClibc_config_fix.pl b/extra/Configs/uClibc_config_fix.pl index 7988dff8b..0ea84dcec 100755 --- a/extra/Configs/uClibc_config_fix.pl +++ b/extra/Configs/uClibc_config_fix.pl @@ -44,7 +44,6 @@ my($mmu) = ""; my($large_file) = ""; my($rpc_support) = ""; my($c99_math) = ""; -my($long_long) = ""; my($float) = ""; my($threads) = ""; my($shadow) = ""; @@ -69,7 +68,6 @@ Getopt::Long::Configure("no_ignore_case", "bundling"); "large_file=s" => \$large_file, "rpc_support=s" => \$rpc_support, "c99_math=s" => \$c99_math, - "long_long=s" => \$long_long, "float=s" => \$float, "threads=s" => \$threads, "shadow=s" => \$shadow, @@ -88,7 +86,6 @@ chomp($mmu); chomp($large_file); chomp($rpc_support); chomp($c99_math); -chomp($long_long); chomp($float); chomp($threads); chomp($shadow); @@ -154,10 +151,6 @@ while($line = <FILE>) { print "DO_C99_MATH=$c99_math\n"; next; } - if ($long_long && $line =~ /^HAS_LONG_LONG.*/) { - print "HAS_LONG_LONG=$long_long\n"; - next; - } if ($float && $line =~ /^HAS_FLOATING_POINT.*/) { print "HAS_FLOATING_POINT=$float\n"; next; diff --git a/include/stdlib.h b/include/stdlib.h index 555d48a55..637bf705c 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -109,7 +109,6 @@ typedef struct # define __ldiv_t_defined 1 #endif -#ifdef __UCLIBC_HAS_LONG_LONG__ #if defined __USE_ISOC99 && !defined __lldiv_t_defined /* Returned by `lldiv'. */ __extension__ typedef struct @@ -119,7 +118,6 @@ __extension__ typedef struct } lldiv_t; # define __lldiv_t_defined 1 #endif -#endif /* __UCLIBC_HAS_LONG_LONG__ */ /* The largest number rand will return (same as INT_MAX). */ @@ -147,13 +145,11 @@ extern int atoi (__const char *__nptr) __THROW __attribute_pure__; /* Convert a string to a long integer. */ extern long int atol (__const char *__nptr) __THROW __attribute_pure__; -#ifdef __UCLIBC_HAS_LONG_LONG__ #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC) /* Convert a string to a long long integer. */ __extension__ extern long long int atoll (__const char *__nptr) __THROW __attribute_pure__; #endif -#endif /* __UCLIBC_HAS_LONG_LONG__ */ #ifdef __UCLIBC_HAS_FLOATS__ /* Convert a string to a floating-point number. */ @@ -178,7 +174,6 @@ extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; -#ifdef __UCLIBC_HAS_LONG_LONG__ #if defined __GNUC__ && defined __USE_BSD /* Convert a string to a quadword integer. */ __extension__ @@ -204,7 +199,6 @@ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; #endif /* ISO C99 or GCC and use MISC. */ -#endif /* __UCLIBC_HAS_LONG_LONG__ */ #if 0 @@ -284,7 +278,6 @@ extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, int __base, int __group) __THROW; # define __strtoul_internal_defined 1 #endif -#ifdef __UCLIBC_HAS_LONG_LONG__ #if defined __GNUC__ || defined __USE_ISOC99 # ifndef __strtoll_internal_defined __extension__ @@ -303,7 +296,6 @@ extern unsigned long long int __strtoull_internal (__const char * # define __strtoull_internal_defined 1 # endif #endif /* GCC */ -#endif /* __UCLIBC_HAS_LONG_LONG__ */ #ifdef __USE_EXTERN_INLINES /* Define inline functions which call the internal entry points. */ @@ -503,11 +495,7 @@ struct drand48_data unsigned short int __old_x[3]; /* Old state. */ unsigned short int __c; /* Additive const. in congruential formula. */ unsigned short int __init; /* Flag for initializing. */ -#ifdef __UCLIBC_HAS_LONG_LONG__ unsigned long long int __a; /* Factor in congruential formula. */ -#else - unsigned long __a0, __a1; -#endif /* __UCLIBC_HAS_LONG_LONG__ */ }; #ifdef __UCLIBC_HAS_FLOATS__ @@ -729,12 +717,10 @@ extern void qsort (void *__base, size_t __nmemb, size_t __size, /* Return the absolute value of X. */ extern int abs (int __x) __THROW __attribute__ ((__const__)); extern long int labs (long int __x) __THROW __attribute__ ((__const__)); -#ifdef __UCLIBC_HAS_LONG_LONG__ #ifdef __USE_ISOC99 __extension__ extern long long int llabs (long long int __x) __THROW __attribute__ ((__const__)); #endif -#endif /* #ifdef __UCLIBC_HAS_LONG_LONG__ */ /* Return the `div_t', `ldiv_t' or `lldiv_t' representation @@ -744,13 +730,11 @@ extern div_t div (int __numer, int __denom) __THROW __attribute__ ((__const__)); extern ldiv_t ldiv (long int __numer, long int __denom) __THROW __attribute__ ((__const__)); -#ifdef __UCLIBC_HAS_LONG_LONG__ #ifdef __USE_ISOC99 __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __THROW __attribute__ ((__const__)); #endif -#endif /* __UCLIBC_HAS_LONG_LONG__ */ #ifdef __UCLIBC_HAS_FLOATS__ diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index f392fe790..7ebde12ea 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -190,14 +190,9 @@ struct scan_cookie { int app_ungot; }; -#ifdef __UCLIBC_HAS_LONG_LONG__ static const char qual[] = "hl" /* "jtz" */ "Lq"; /* char = -2, short = -1, int = 0, long = 1, long long = 2 */ static const char qsz[] = { -1, 1, 2, 2 }; -#else -static const char qual[] = "hl" /* "jtz" */; -static const char qsz[] = { -1, 1, }; -#endif #ifdef __UCLIBC_HAS_FLOATS__ static int __strtold(long double *ld, struct scan_cookie *sc); @@ -280,17 +275,10 @@ static void kill_scan_cookie(register struct scan_cookie *sc) int vfscanf(FILE *fp, const char *format, va_list ap) { -#ifdef __UCLIBC_HAS_LONG_LONG__ #define STRTO_L_(s,e,b,sf) _stdlib_strto_ll(s,e,b,sf) #define MAX_DIGITS 64 #define UV_TYPE unsigned long long #define V_TYPE long long -#else -#define STRTO_L_(s,e,b,sf) _stdlib_strto_l(s,e,b,sf) -#define MAX_DIGITS 32 -#define UV_TYPE unsigned long -#define V_TYPE long -#endif #ifdef __UCLIBC_HAS_FLOATS__ long double ld; #endif @@ -490,15 +478,12 @@ int vfscanf(FILE *fp, const char *format, va_list ap) vp = va_arg(ap, void *); switch (lval) { case 2: /* If no long long, treat as long . */ -#ifdef __UCLIBC_HAS_LONG_LONG__ *((unsigned long long *)vp) = uv; break; -#endif case 1: #if ULONG_MAX == UINT_MAX case 0: /* int and long int are the same */ #endif -#ifdef __UCLIBC_HAS_LONG_LONG__ if (usflag) { if (uv > ULONG_MAX) { uv = ULONG_MAX; @@ -508,7 +493,6 @@ int vfscanf(FILE *fp, const char *format, va_list ap) } else if (((V_TYPE)uv) < LONG_MIN) { uv = (UV_TYPE) LONG_MIN; } -#endif *((unsigned long *)vp) = (unsigned long)uv; break; #if ULONG_MAX != UINT_MAX diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile index abf0054cc..99a267056 100644 --- a/libc/stdlib/Makefile +++ b/libc/stdlib/Makefile @@ -30,10 +30,7 @@ ALL_SUBDIRS = malloc malloc-930716 malloc-simple MSRC = stdlib.c MOBJ = abs.o labs.o atoi.o atol.o strtol.o strtoul.o _stdlib_strto_l.o \ qsort.o bsearch.o - -ifeq ($(HAS_LONG_LONG),true) - MOBJ += llabs.o atoll.o strtoll.o strtoull.o _stdlib_strto_ll.o -endif +MOBJ += llabs.o atoll.o strtoll.o strtoull.o _stdlib_strto_ll.o ifeq ($(HAS_WCHAR),true) MOBJ += mblen.o mbtowc.o wctomb.o mbstowcs.o wcstombs.o \ diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c index 3247bafbd..858253b5a 100644 --- a/libc/stdlib/drand48-iter.c +++ b/libc/stdlib/drand48-iter.c @@ -27,7 +27,6 @@ struct drand48_data __libc_drand48_data; -#ifdef __UCLIBC_HAS_LONG_LONG__ int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) { @@ -57,41 +56,3 @@ __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) return 0; } -#else -int -__drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) -{ - uint32_t X0, X1; - uint32_t result0, result1; - - /* Initialize buffer, if not yet done. */ - if (unlikely(!buffer->__init)) - { - buffer->__a1 = 0x5; - buffer->__a0 = 0xdeece66d; - buffer->__c = 0xb; - buffer->__init = 1; - } - - /* Do the real work. We choose a data type which contains at least - 48 bits. Because we compute the modulus it does not care how - many bits really are computed. */ - - /* X = X1*base32 + X0 */ - X1 = xsubi[2]; - X0 = xsubi[0] | (uint32_t) xsubi[1] << 16; - - result0 = buffer->__a0 * X0; - result1 = (result0 > -buffer->__c ); /* Carry */ - /* If this overflows, the carry is already in result1 */ - result0 += buffer->__c; - - result1 += buffer->__a1*X0 + buffer->__a0*X1; - - xsubi[0] = result0 & 0xffff; - xsubi[1] = result0 >> 16; - xsubi[2] = result1 & 0xffff; - - return 0; -} -#endif diff --git a/libc/stdlib/srand48_r.c b/libc/stdlib/srand48_r.c index c7c510864..c0fa38e90 100644 --- a/libc/stdlib/srand48_r.c +++ b/libc/stdlib/srand48_r.c @@ -32,13 +32,7 @@ int srand48_r (seedval, buffer) buffer->__x[1] = seedval & 0xffffl; buffer->__x[0] = 0x330e; -#ifdef __UCLIBC_HAS_LONG_LONG__ buffer->__a = 0x5deece66dull; -#else - buffer->__a1 = 0x5; - buffer->__a0 = 0xdeece66d; -#endif - buffer->__c = 0xb; buffer->__init = 1; |