|
发表于 2003-1-12 22:02:38
|
显示全部楼层
- diff -Naur glibc-2.2.5/login/Makefile glibc-2.2.5-2/login/Makefile
- --- glibc-2.2.5/login/Makefile Thu Jul 5 21:55:34 2001
- +++ glibc-2.2.5-2/login/Makefile Tue May 28 17:58:59 2002
- @@ -52,10 +52,10 @@
- $(resolvobjdir)/libresolv.a $(common-objpfx)libc.a
- endif
-
- -# pt_chown needs to be setuid root.
- +# pt_chown needs to be setuid 0.
- $(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
- $(make-target-directory)
- - -$(INSTALL_PROGRAM) -m 4755 -o root $< $@
- + -$(INSTALL_PROGRAM) -m 4755 -o 0 $< $@
-
- # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
- # This ensures they will load libc.so for needed symbols if loaded by
- diff -Naur glibc-2.2.5/malloc/Makefile glibc-2.2.5-2/malloc/Makefile
- --- glibc-2.2.5/malloc/Makefile Wed Aug 29 15:45:25 2001
- +++ glibc-2.2.5-2/malloc/Makefile Tue May 28 17:58:59 2002
- @@ -56,7 +56,7 @@
- include ../Makeconfig
-
- # The Perl script to analyze the output of the mtrace functions.
- -ifneq ($(PERL),no)
- +ifneq (/usr/bin/perl,no)
- install-bin-script = mtrace
- generated = mtrace
-
- @@ -100,7 +100,7 @@
-
- ifeq (no,$(cross-compiling))
- ifeq (yes,$(build-shared))
- -ifneq ($(PERL),no)
- +ifneq (/usr/bin/perl,no)
- tests: $(objpfx)tst-mtrace.out
- $(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
- $(SHELL) -e $< $(common-objpfx)
- @@ -113,7 +113,7 @@
-
- $(objpfx)mtrace: mtrace.pl
- rm -f $@.new
- - sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \
- + sed -e 's|@PERL@|/usr/bin/perl|' -e 's|@XXX@|$(address-width)|' \
- -e 's|@VERSION@|$(version)|' $^ > $@.new \
- && rm -f $@ && mv $@.new $@ && chmod +x $@
-
- diff -uNr glibc-2.2.5.orig/iconv/skeleton.c glibc-2.2.5/iconv/skeleton.c
- --- glibc-2.2.5.orig/iconv/skeleton.c 2001-07-06 14:54:47.000000000 +1000
- +++ glibc-2.2.5/iconv/skeleton.c 2002-08-10 09:24:57.000000000 +1000
- @@ -193,15 +193,20 @@
- character set we can define RESET_INPUT_BUFFER in a very fast way. */
- #if !defined RESET_INPUT_BUFFER && !defined SAVE_RESET_STATE
- # if MIN_NEEDED_FROM == MAX_NEEDED_FROM && MIN_NEEDED_TO == MAX_NEEDED_TO
- -/* We have to use these `if's here since the compiler cannot know that
- - (outbuf - outerr) is always divisible by MIN_NEEDED_TO. */
- -# define RESET_INPUT_BUFFER \
- - if (MIN_NEEDED_FROM % MIN_NEEDED_TO == 0) \
- - *inptrp -= (outbuf - outerr) * (MIN_NEEDED_FROM / MIN_NEEDED_TO); \
- - else if (MIN_NEEDED_TO % MIN_NEEDED_FROM == 0) \
- - *inptrp -= (outbuf - outerr) / (MIN_NEEDED_TO / MIN_NEEDED_FROM); \
- - else \
- - *inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM
- +/* We have to use these `#if's here since the compiler cannot know that
- + (outbuf - outerr) is always divisible by MIN_NEEDED_TO. We have to
- + use preprocessor arithmetic and no C code because gcc 3.2 complains
- + about division by zero even in obviously dead code. */
- +# if MIN_NEEDED_FROM % MIN_NEEDED_TO == 0
- +# define RESET_INPUT_BUFFER \
- + *inptrp -= (outbuf - outerr) * (MIN_NEEDED_FROM / MIN_NEEDED_TO)
- +# elif MIN_NEEDED_TO % MIN_NEEDED_FROM == 0
- +# define RESET_INPUT_BUFFER \
- + *inptrp -= (outbuf - outerr) / (MIN_NEEDED_TO / MIN_NEEDED_FROM)
- +# else
- +# define RESET_INPUT_BUFFER \
- + *inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM
- +# endif
- # endif
- #endif
-
- diff -uNr glibc-2.2.5.orig/linuxthreads/signals.c glibc-2.2.5/linuxthreads/signals.c
- --- glibc-2.2.5.orig/linuxthreads/signals.c 2002-01-21 14:21:16.000000000 +1100
- +++ glibc-2.2.5/linuxthreads/signals.c 2002-08-10 09:24:57.000000000 +1000
- @@ -198,7 +198,7 @@
- s != __pthread_sig_cancel &&
- s != __pthread_sig_debug) {
- sigdelset(&mask, s);
- - if (sighandler[s].old == NULL ||
- + if (sighandler[s].old == (arch_sighandler_t) SIG_ERR ||
- sighandler[s].old == (arch_sighandler_t) SIG_DFL ||
- sighandler[s].old == (arch_sighandler_t) SIG_IGN) {
- sa.sa_handler = pthread_null_sighandler;
- diff -uNr glibc-2.2.5.orig/malloc/malloc.c glibc-2.2.5/malloc/malloc.c
- --- glibc-2.2.5.orig/malloc/malloc.c 2001-09-19 13:23:27.000000000 +1000
- +++ glibc-2.2.5/malloc/malloc.c 2002-08-10 09:24:57.000000000 +1000
- @@ -3795,14 +3795,26 @@
- {
- arena *ar_ptr;
- mchunkptr p, oldtop;
- - INTERNAL_SIZE_T sz, csz, oldtopsize;
- + INTERNAL_SIZE_T bytes, sz, csz, oldtopsize;
- Void_t* mem;
-
- #if defined _LIBC || defined MALLOC_HOOKS
- __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) =
- __malloc_hook;
- +
- + /* size_t is unsigned so the behavior on overflow is defined. */
- + bytes = n * elem_size;
- +#define HALF_INTERNAL_SIZE_T \
- + (((INTERNAL_SIZE_T) 1) << (8 * sizeof (INTERNAL_SIZE_T) / 2))
- + if (__builtin_expect ((n | elem_size) >= HALF_INTERNAL_SIZE_T, 0)) {
- + if (elem_size != 0 && bytes / elem_size != n) {
- + __set_errno (ENOMEM);
- + return 0;
- + }
- + }
- +
- if (hook != NULL) {
- - sz = n * elem_size;
- + sz = bytes;
- #if defined __GNUC__ && __GNUC__ >= 2
- mem = (*hook)(sz, RETURN_ADDRESS (0));
- #else
- @@ -3819,7 +3831,7 @@
- }
- #endif
-
- - if(request2size(n * elem_size, sz))
- + if(request2size(bytes, sz))
- return 0;
- arena_get(ar_ptr, sz);
- if(!ar_ptr)
- @@ -3862,7 +3874,7 @@
- }
- if (p == 0) return 0;
- }
- - mem = BOUNDED_N(chunk2mem(p), n * elem_size);
- + mem = BOUNDED_N(chunk2mem(p), bytes);
-
- /* Two optional cases in which clearing not necessary */
-
- diff -uNr glibc-2.2.5.orig/posix/regex.h glibc-2.2.5/posix/regex.h
- --- glibc-2.2.5.orig/posix/regex.h 2001-07-06 14:55:38.000000000 +1000
- +++ glibc-2.2.5/posix/regex.h 2002-08-10 09:24:57.000000000 +1000
- @@ -529,10 +529,14 @@
- # endif
- # endif
- #endif
- -/* For now unconditionally define __restrict_arr to expand to nothing.
- - Ideally we would have a test for the compiler which allows defining
- - it to restrict. */
- -#define __restrict_arr
- +/* gcc 3.1 and up support the [restrict] syntax. */
- +#ifndef __restrict_arr
- +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
- +# define __restrict_arr __restrict
- +# else
- +# define __restrict_arr
- +# endif
- +#endif
-
- /* POSIX compatibility. */
- extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
- diff -uNr glibc-2.2.5.orig/resolv/nss_dns/dns-network.c glibc-2.2.5/resolv/nss_dns/dns-network.c
- --- glibc-2.2.5.orig/resolv/nss_dns/dns-network.c 2001-07-06 14:55:39.000000000 +1000
- +++ glibc-2.2.5/resolv/nss_dns/dns-network.c 2002-08-10 09:24:57.000000000 +1000
- @@ -328,7 +328,9 @@
- }
- cp += n;
- *alias_pointer++ = bp;
- - bp += strlen (bp) + 1;
- + n = strlen (bp) + 1;
- + bp += n;
- + linebuflen -= n;
- result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
- ++have_answer;
- }
- diff -uNr glibc-2.2.5.orig/sunrpc/xdr_array.c glibc-2.2.5/sunrpc/xdr_array.c
- --- glibc-2.2.5.orig/sunrpc/xdr_array.c 2001-08-17 14:48:31.000000000 +1000
- +++ glibc-2.2.5/sunrpc/xdr_array.c 2002-08-10 09:24:57.000000000 +1000
- @@ -45,6 +45,7 @@
- #include <rpc/types.h>
- #include <rpc/xdr.h>
- #include <libintl.h>
- +#include <limits.h>
-
- #ifdef USE_IN_LIBIO
- # include <wchar.h>
- @@ -81,7 +82,11 @@
- return FALSE;
- }
- c = *sizep;
- - if ((c > maxsize) && (xdrs->x_op != XDR_FREE))
- + /*
- + * XXX: Let the overflow possibly happen with XDR_FREE because mem_free()
- + * doesn't actually use its second argument anyway.
- + */
- + if ((c > maxsize || c > UINT_MAX / elsize) && (xdrs->x_op != XDR_FREE))
- {
- return FALSE;
- }
- diff -uNr glibc-2.2.5.orig/sysdeps/i386/Makefile glibc-2.2.5/sysdeps/i386/Makefile
- --- glibc-2.2.5.orig/sysdeps/i386/Makefile 1999-09-18 02:59:13.000000000 +1000
- +++ glibc-2.2.5/sysdeps/i386/Makefile 2002-08-10 09:24:57.000000000 +1000
- @@ -9,6 +9,12 @@
- # On i686 we must avoid generating the trampoline functions generated
- # to get the GOT pointer.
- CFLAGS-initfini.s += -march=i386 -mcpu=i386
- +
- +ifeq (yes,$(build-shared))
- +# Compatibility
- +sysdep_routines += divdi3
- +shared-only-routines += divdi3
- +endif
- endif
-
- ifeq ($(subdir),db2)
- diff -uNr glibc-2.2.5.orig/sysdeps/i386/fpu/libm-test-ulps glibc-2.2.5/sysdeps/i386/fpu/libm-test-ulps
- --- glibc-2.2.5.orig/sysdeps/i386/fpu/libm-test-ulps 2001-08-27 23:55:13.000000000 +1000
- +++ glibc-2.2.5/sysdeps/i386/fpu/libm-test-ulps 2002-08-10 09:24:57.000000000 +1000
- @@ -96,9 +96,9 @@
- # cacosh
- Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
- double: 1
- -float: 4
- +float: 9
- idouble: 1
- -ifloat: 4
- +ifloat: 9
- ildouble: 6
- ldouble: 6
- Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
- @@ -1234,9 +1234,9 @@
-
- Function: Real part of "cacosh":
- double: 1
- -float: 4
- +float: 9
- idouble: 1
- -ifloat: 4
- +ifloat: 9
- ildouble: 328
- ldouble: 328
-
- diff -uNr glibc-2.2.5.orig/sysdeps/m68k/Makefile glibc-2.2.5/sysdeps/m68k/Makefile
- --- glibc-2.2.5.orig/sysdeps/m68k/Makefile 2001-07-06 14:55:55.000000000 +1000
- +++ glibc-2.2.5/sysdeps/m68k/Makefile 2002-08-10 09:24:57.000000000 +1000
- @@ -33,6 +33,14 @@
- # The 68k `long double' is a distinct type we support.
- long-double-fcts = yes
-
- +ifeq ($(subdir),csu)
- +ifeq (yes,$(build-shared))
- +# Compatibility
- +sysdep_routines += divdi3
- +shared-only-routines += divdi3
- +endif
- +endif
- +
- ifeq ($(subdir),elf)
- CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
- endif
- diff -uNr glibc-2.2.5.orig/sysdeps/s390/s390-32/Makefile glibc-2.2.5/sysdeps/s390/s390-32/Makefile
- --- glibc-2.2.5.orig/sysdeps/s390/s390-32/Makefile 2001-03-16 19:59:44.000000000 +1100
- +++ glibc-2.2.5/sysdeps/s390/s390-32/Makefile 2002-08-10 09:24:57.000000000 +1000
- @@ -1,5 +1,13 @@
- pic-ccflag = -fpic
-
- +ifeq ($(subdir),csu)
- +ifeq (yes,$(build-shared))
- +# Compatibility
- +sysdep_routines += divdi3
- +shared-only-routines += divdi3
- +endif
- +endif
- +
- ifeq ($(subdir),gmon)
- sysdep_routines += s390-mcount
- endif
- diff -uNr glibc-2.2.5.orig/sysdeps/unix/sysv/linux/errlist.c glibc-2.2.5/sysdeps/unix/sysv/linux/errlist.c
- --- glibc-2.2.5.orig/sysdeps/unix/sysv/linux/errlist.c 2001-07-06 14:56:12.000000000 +1000
- +++ glibc-2.2.5/sysdeps/unix/sysv/linux/errlist.c 2002-08-10 09:24:57.000000000 +1000
- @@ -38,10 +38,9 @@
- const int __old_sys_nerr = OLD_ERRLIST_SIZE;
-
- strong_alias (__old_sys_nerr, _old_sys_nerr);
- -weak_alias (__old_sys_nerr, _old_sys_nerr)
- compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
- compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
- -weak_alias (__old_sys_errlist, _old_sys_errlist);
- +strong_alias (__old_sys_errlist, _old_sys_errlist);
- compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
- compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
- #endif
- diff -uNr glibc-2.2.5.orig/sysdeps/wordsize-32/divdi3.c glibc-2.2.5/sysdeps/wordsize-32/divdi3.c
- --- glibc-2.2.5.orig/sysdeps/wordsize-32/divdi3.c 1970-01-01 10:00:00.000000000 +1000
- +++ glibc-2.2.5/sysdeps/wordsize-32/divdi3.c 2002-08-10 09:24:57.000000000 +1000
- @@ -0,0 +1,324 @@
- +/* 64-bit multiplication and division
- + Copyright (C) 1989, 1992-1999, 2000, 2001, 2002
- + Free Software Foundation, Inc.
- + This file is part of the GNU C Library.
- +
- + The GNU C Library is free software; you can redistribute it and/or
- + modify it under the terms of the GNU Lesser General Public
- + License as published by the Free Software Foundation; either
- + version 2.1 of the License, or (at your option) any later version.
- +
- + The GNU C Library is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + Lesser General Public License for more details.
- +
- + You should have received a copy of the GNU Lesser General Public
- + License along with the GNU C Library; if not, write to the Free
- + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- + 02111-1307 USA. */
- +
- +#include <endian.h>
- +#include <stdlib.h>
- +#include <bits/wordsize.h>
- +
- +#if __WORDSIZE != 32
- +#error This is for 32-bit targets only
- +#endif
- +
- +typedef unsigned int UQItype __attribute__ ((mode (QI)));
- +typedef int SItype __attribute__ ((mode (SI)));
- +typedef unsigned int USItype __attribute__ ((mode (SI)));
- +typedef int DItype __attribute__ ((mode (DI)));
- +typedef unsigned int UDItype __attribute__ ((mode (DI)));
- +#define Wtype SItype
- +#define HWtype SItype
- +#define DWtype DItype
- +#define UWtype USItype
- +#define UHWtype USItype
- +#define UDWtype UDItype
- +#define W_TYPE_SIZE 32
- +
- +#include <stdlib/longlong.h>
- +
- +#if __BYTE_ORDER == __BIG_ENDIAN
- +struct DWstruct { Wtype high, low;};
- +#elif __BYTE_ORDER == __LITTLE_ENDIAN
- +struct DWstruct { Wtype low, high;};
- +#else
- +#error Unhandled endianity
- +#endif
- +typedef union { struct DWstruct s; DWtype ll; } DWunion;
- +
- +static UDWtype
- +__udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
- +{
- + DWunion ww;
- + DWunion nn, dd;
- + DWunion rr;
- + UWtype d0, d1, n0, n1, n2;
- + UWtype q0, q1;
- + UWtype b, bm;
- +
- + nn.ll = n;
- + dd.ll = d;
- +
- + d0 = dd.s.low;
- + d1 = dd.s.high;
- + n0 = nn.s.low;
- + n1 = nn.s.high;
- +
- +#if !UDIV_NEEDS_NORMALIZATION
- + if (d1 == 0)
- + {
- + if (d0 > n1)
- + {
- + /* 0q = nn / 0D */
- +
- + udiv_qrnnd (q0, n0, n1, n0, d0);
- + q1 = 0;
- +
- + /* Remainder in n0. */
- + }
- + else
- + {
- + /* qq = NN / 0d */
- +
- + if (d0 == 0)
- + d0 = 1 / d0; /* Divide intentionally by zero. */
- +
- + udiv_qrnnd (q1, n1, 0, n1, d0);
- + udiv_qrnnd (q0, n0, n1, n0, d0);
- +
- + /* Remainder in n0. */
- + }
- +
- + if (rp != 0)
- + {
- + rr.s.low = n0;
- + rr.s.high = 0;
- + *rp = rr.ll;
- + }
- + }
- +
- +#else /* UDIV_NEEDS_NORMALIZATION */
- +
- + if (d1 == 0)
- + {
- + if (d0 > n1)
- + {
- + /* 0q = nn / 0D */
- +
- + count_leading_zeros (bm, d0);
- +
- + if (bm != 0)
- + {
- + /* Normalize, i.e. make the most significant bit of the
- + denominator set. */
- +
- + d0 = d0 << bm;
- + n1 = (n1 << bm) | (n0 >> (W_TYPE_SIZE - bm));
- + n0 = n0 << bm;
- + }
- +
- + udiv_qrnnd (q0, n0, n1, n0, d0);
- + q1 = 0;
- +
- + /* Remainder in n0 >> bm. */
- + }
- + else
- + {
- + /* qq = NN / 0d */
- +
- + if (d0 == 0)
- + d0 = 1 / d0; /* Divide intentionally by zero. */
- +
- + count_leading_zeros (bm, d0);
- +
- + if (bm == 0)
- + {
- + /* From (n1 >= d0) /\ (the most significant bit of d0 is set),
- + conclude (the most significant bit of n1 is set) /\ (the
- + leading quotient digit q1 = 1).
- +
- + This special case is necessary, not an optimization.
- + (Shifts counts of W_TYPE_SIZE are undefined.) */
- +
- + n1 -= d0;
- + q1 = 1;
- + }
- + else
- + {
- + /* Normalize. */
- +
- + b = W_TYPE_SIZE - bm;
- +
- + d0 = d0 << bm;
- + n2 = n1 >> b;
- + n1 = (n1 << bm) | (n0 >> b);
- + n0 = n0 << bm;
- +
- + udiv_qrnnd (q1, n1, n2, n1, d0);
- + }
- +
- + /* n1 != d0... */
- +
- + udiv_qrnnd (q0, n0, n1, n0, d0);
- +
- + /* Remainder in n0 >> bm. */
- + }
- +
- + if (rp != 0)
- + {
- + rr.s.low = n0 >> bm;
- + rr.s.high = 0;
- + *rp = rr.ll;
- + }
- + }
- +#endif /* UDIV_NEEDS_NORMALIZATION */
- +
- + else
- + {
- + if (d1 > n1)
- + {
- + /* 00 = nn / DD */
- +
- + q0 = 0;
- + q1 = 0;
- +
- + /* Remainder in n1n0. */
- + if (rp != 0)
- + {
- + rr.s.low = n0;
- + rr.s.high = n1;
- + *rp = rr.ll;
- + }
- + }
- + else
- + {
- + /* 0q = NN / dd */
- +
- + count_leading_zeros (bm, d1);
- + if (bm == 0)
- + {
- + /* From (n1 >= d1) /\ (the most significant bit of d1 is set),
- + conclude (the most significant bit of n1 is set) /\ (the
- + quotient digit q0 = 0 or 1).
- +
- + This special case is necessary, not an optimization. */
- +
- + /* The condition on the next line takes advantage of that
- + n1 >= d1 (true due to program flow). */
- + if (n1 > d1 || n0 >= d0)
- + {
- + q0 = 1;
- + sub_ddmmss (n1, n0, n1, n0, d1, d0);
- + }
- + else
- + q0 = 0;
- +
- + q1 = 0;
- +
- + if (rp != 0)
- + {
- + rr.s.low = n0;
- + rr.s.high = n1;
- + *rp = rr.ll;
- + }
- + }
- + else
- + {
- + UWtype m1, m0;
- + /* Normalize. */
- +
- + b = W_TYPE_SIZE - bm;
- +
- + d1 = (d1 << bm) | (d0 >> b);
- + d0 = d0 << bm;
- + n2 = n1 >> b;
- + n1 = (n1 << bm) | (n0 >> b);
- + n0 = n0 << bm;
- +
- + udiv_qrnnd (q0, n1, n2, n1, d1);
- + umul_ppmm (m1, m0, q0, d0);
- +
- + if (m1 > n1 || (m1 == n1 && m0 > n0))
- + {
- + q0--;
- + sub_ddmmss (m1, m0, m1, m0, d1, d0);
- + }
- +
- + q1 = 0;
- +
- + /* Remainder in (n1n0 - m1m0) >> bm. */
- + if (rp != 0)
- + {
- + sub_ddmmss (n1, n0, n1, n0, m1, m0);
- + rr.s.low = (n1 << b) | (n0 >> bm);
- + rr.s.high = n1 >> bm;
- + *rp = rr.ll;
- + }
- + }
- + }
- + }
- +
- + ww.s.low = q0;
- + ww.s.high = q1;
- + return ww.ll;
- +}
- +
- +DWtype
- +__divdi3 (DWtype u, DWtype v)
- +{
- + Wtype c = 0;
- + DWtype w;
- +
- + if (u < 0)
- + {
- + c = ~c;
- + u = -u;
- + }
- + if (v < 0)
- + {
- + c = ~c;
- + v = -v;
- + }
- + w = __udivmoddi4 (u, v, NULL);
- + if (c)
- + w = -w;
- + return w;
- +}
- +
- +DWtype
- +__moddi3 (DWtype u, DWtype v)
- +{
- + Wtype c = 0;
- + DWtype w;
- +
- + if (u < 0)
- + {
- + c = ~c;
- + u = -u;
- + }
- + if (v < 0)
- + v = -v;
- + __udivmoddi4 (u, v, &w);
- + if (c)
- + w = -w;
- + return w;
- +}
- +
- +UDWtype
- +__udivdi3 (UDWtype u, UDWtype v)
- +{
- + return __udivmoddi4 (u, v, NULL);
- +}
- +
- +UDWtype
- +__umoddi3 (UDWtype u, UDWtype v)
- +{
- + UDWtype w;
- +
- + __udivmoddi4 (u, v, &w);
- + return w;
- +}
复制代码 |
|