Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gdtoa don't need these and they break the build



details:   https://anonhg.NetBSD.org/src/rev/a026d54b8009
branches:  trunk
changeset: 763440:a026d54b8009
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 19 21:26:02 2011 +0000

description:
don't need these and they break the build

diffstat:

 lib/libc/gdtoa/printf.c  |     8 -
 lib/libc/gdtoa/printf.c0 |  1669 ----------------------------------------------
 lib/libc/gdtoa/stdio1.h  |   103 --
 3 files changed, 0 insertions(+), 1780 deletions(-)

diffs (truncated from 1792 to 300 lines):

diff -r aab5d91885c0 -r a026d54b8009 lib/libc/gdtoa/printf.c
--- a/lib/libc/gdtoa/printf.c   Sat Mar 19 20:05:21 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-#ifdef __sun
-#define Use_GDTOA_Qtype
-#else
-#if defined(__i386) || defined(__x86_64)
-#define Use_GDTOA_for_i386_long_double
-#endif
-#endif
-#include "printf.c0"
diff -r aab5d91885c0 -r a026d54b8009 lib/libc/gdtoa/printf.c0
--- a/lib/libc/gdtoa/printf.c0  Sat Mar 19 20:05:21 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,1669 +0,0 @@
-/****************************************************************
-Copyright (C) 1997, 1999, 2001 Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-****************************************************************/
-
-/* This implements most of ANSI C's printf, fprintf, and sprintf,
- * omitting L, with %.0g and %.0G giving the shortest decimal string
- * that rounds to the number being converted, and with negative
- * precisions allowed for %f.
- */
-
-#ifdef KR_headers
-#include "varargs.h"
-#else
-#include "stddef.h"
-#include "stdarg.h"
-#include "stdlib.h"
-#endif
-
-#ifdef Use_GDTOA_for_i386_long_double /*{{*/
-#include "gdtoa.h"
-#else /*}{*/
-#ifndef NO_PRINTF_A_FMT /*{*/
-#include "gdtoa.h"
-#endif /*}*/
-#endif /*}}*/
-
-#ifdef __i386
-#define NO_GDTOA_i386_Quad
-#endif
-
-#ifdef Use_GDTOA_for_i386_long_double /*{*/
-#ifndef NO_GDTOA_i386_Quad /*{*/
-#define GDTOA_both
-#define Use_GDTOA_Qtype
-#ifdef __ICC__ /* or __INTEL_COMPILER__ or __INTEL_COMPILER ?? */
-#define GDTOA_Qtype _Quad
-#else
-#define GDTOA_Qtype __float128
-#endif
-#endif /*} NO_GDTOA_i386_Quad */
-#endif /*} Use_GDTOA_for_i386_long_double */
-
-#ifdef Use_GDTOA_Qtype /*{*/
-#ifndef GDTOA_H_INCLUDED
-#include "gdtoa.h"
-#endif
-#ifndef GDTOA_Qtype
-#define GDTOA_Qtype long double
-#endif
-#endif /*}*/
-
-#ifndef GDTOA_H_INCLUDED /*{*/
-
- enum {        /* return values from strtodg */
-       STRTOG_Zero     = 0,
-       STRTOG_Normal   = 1,
-       STRTOG_Denormal = 2,
-       STRTOG_Infinite = 3,
-       STRTOG_NaN      = 4,
-       STRTOG_NaNbits  = 5,
-       STRTOG_NoNumber = 6,
-       STRTOG_Retmask  = 7};
-
- typedef struct
-FPI {
-       int nbits;
-       int emin;
-       int emax;
-       int rounding;
-       int sudden_underflow;
-       } FPI;
-
-enum { /* FPI.rounding values: same as FLT_ROUNDS */
-       FPI_Round_zero = 0,
-       FPI_Round_near = 1,
-       FPI_Round_up = 2,
-       FPI_Round_down = 3
-       };
-#endif /*}*/
-
-#ifdef NO_PRINTF_A_FMT /*{{*/
-#define WANT_A_FMT(x) /*nothing*/
-#else /*}{*/
-#define WANT_A_FMT(x) x
-#endif /*}}*/
-
-#include "stdio1.h"
-#include "string.h"
-#include "errno.h"
-
- typedef struct
-Finfo {
-       union { FILE *cf; char *sf; } u;
-       char *ob0, *obe1;
-       size_t lastlen;
-       } Finfo;
-
- typedef char *(*pgdtoa) ANSI((FPI*, int be, ULong *bits, int *kind, int mode, int ndigits, int *decpt, char **rve));
-
- typedef struct
-FPBits {
-       ULong bits[4];  /* sufficient for quad; modify if considering wider types */
-       FPI *fpi;
-       pgdtoa gdtoa;
-       int sign;
-       int ex; /* exponent */
-       int kind;
-       } FPBits;
-
- typedef union U
-{
-       double d;
-       long double ld;
-#ifdef GDTOA_Qtype
-       GDTOA_Qtype Qd;
-#endif
-       unsigned int ui[4];
-       unsigned short us[5];
-       } U;
-
- typedef char *(*Putfunc) ANSI((Finfo*, int*));
- typedef void (*Fpbits) ANSI((U*, FPBits*));
-
-/* Would have preferred typedef void (*Fpbits)(va_list*, FPBits*)
- * but gcc is buggy in this regard.
- */
-
-#ifdef Use_GDTOA_for_i386_long_double /*{*/
-
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#define _2 2
-#define _3 3
-#define _4 4
-#endif
-#ifdef IEEE_8087
-#define _0 4
-#define _1 3
-#define _2 2
-#define _3 1
-#define _4 0
-#endif
-
- static void
-xfpbits(U *u, FPBits *b)
-{
-       ULong *bits;
-       int ex, i;
-       static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
-
-       b->fpi = &fpi0;
-       b->gdtoa = gdtoa;
-       b->sign = u->us[_0] & 0x8000;
-       bits = b->bits;
-       bits[1] = (u->us[_1] << 16) | u->us[_2];
-       bits[0] = (u->us[_3] << 16) | u->us[_4];
-       if ( (ex = u->us[_0] & 0x7fff) !=0) {
-               i = STRTOG_Normal;
-               if (ex == 0x7fff)
-                       /* Infinity or NaN */
-                       i = bits[0] | bits[1] ? STRTOG_NaN : STRTOG_Infinite;
-               }
-       else if (bits[0] | bits[1]) {
-               i = STRTOG_Denormal;
-               ex = 1;
-               }
-       else
-               i = STRTOG_Zero;
-       b->kind = i;
-       b->ex = ex - (0x3fff + 63);
-       }
-
-#undef _0
-#undef _1
-#undef _2
-#undef _3
-#undef _4
-#define GDTOA_LD_fpbits xfpbits
-#endif /*} Use_GDTOA_for_i386_long_double */
-
-#ifdef Use_GDTOA_Qtype /*{*/
-#include "gdtoa.h"
-#ifndef GDTOA_Qtype
-#define GDTOA_Qtype long double
-#endif
-#ifdef GDTOA_LD_fpbits
-#define GDTOA_Q_fpbits Qfpbits
-#else
-#define GDTOA_LD_fpbits Qfpbits
-#endif
-
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#define _2 2
-#define _3 3
-#endif
-#ifdef IEEE_8087
-#define _0 3
-#define _1 2
-#define _2 1
-#define _3 0
-#endif
-
- static void
-Qfpbits(U *u, FPBits *b)
-{
-       ULong *bits;
-       int ex, i;
-       static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
-
-       b->fpi = &fpi0;
-       b->gdtoa = gdtoa;
-       b->sign = u->ui[_0] & 0x80000000L;
-       bits = b->bits;
-       bits[3] = u->ui[_0] & 0xffff;
-       bits[2] = u->ui[_1];
-       bits[1] = u->ui[_2];
-       bits[0] = u->ui[_3];
-       if ( (ex = (u->ui[_0] & 0x7fff0000L) >> 16) !=0) {
-               if (ex == 0x7fff) {
-                       /* Infinity or NaN */
-                       i = bits[0] | bits[1] | bits[2] | bits[3]
-                               ? STRTOG_NaN : STRTOG_Infinite;
-                       }
-               else {
-                       i = STRTOG_Normal;
-                       bits[3] |= 0x10000;
-                       }
-               }
-       else if (bits[0] | bits[1] | bits[2] | bits[3]) {
-               i = STRTOG_Denormal;
-               ex = 1;
-               }
-       else
-               i = STRTOG_Zero;
-       b->kind = i;
-       b->ex = ex - (0x3fff + 112);
-       }
-
-#undef _0
-#undef _1
-#undef _2
-#undef _3
-#endif /*} GDTOA_Qtype */
-
-#ifdef KR_headers
-#define Const /* const */
-#define Voidptr char*
-#ifndef size_t__
-#define size_t int
-#define size_t__
-#endif
-
-#else
-
-#define Const const
-#define Voidptr void*
-
-#endif
-
-#undef MESS
-#ifndef Stderr



Home | Main Index | Thread Index | Old Index