Browse Source

Kill the HAS_LONG_LONG option. It really did not make a lot of
sense to exclude it, gcc always supports long long, and we never
fully excluded long long anyways (off64_t for example).
-Erik

Eric Andersen 22 years ago
parent
commit
9a1eb39a60

+ 0 - 5
Makefile

@@ -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 \

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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.

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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
 

+ 0 - 6
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.

+ 0 - 7
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;

+ 0 - 16
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__

+ 0 - 16
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

+ 1 - 4
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 \

+ 0 - 39
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

+ 0 - 6
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;