📄 glibc-2.1.3-fix-gcc3-llabs.patch
字号:
Retrieved with wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/generic/inttypes.h.diff?r1=1.5&r2=1.7&cvsroot=glibc'and then rediffed against vanilla glibc-2.1.3.Fixes errorgcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h: In function `intmax_t imaxabs(long long int)':gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h:421: error: call of overloaded `llabs(intmax_t&)' is ambiguousgcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h:411: error: candidates are: long long int llabs(long long int)gcc-3.3.3-glibc-2.1.3/include/c++/3.3.3/cstdlib:152: error: long long int __gnu_cxx::llabs(long long int)gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h: In function `imaxdiv_t imaxdiv(long long int, long long int)':gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h:428: error: call of overloaded `lldiv(intmax_t&, intmax_t&)' is ambiguousgcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/sys-include/inttypes.h:414: error: candidates are: lldiv_t lldiv(long long int, long long int)gcc-3.3.3-glibc-2.1.3/include/c++/3.3.3/cstdlib:161: error: lldiv_t __gnu_cxx::lldiv(long long int, long long int)See e.g. http://www.wakkanet.fi/~kaiv/ecasound/ecasound-list/2001/09/0048.html for an example of another user realizing this is a glibc-2.1.3 bug exposed by gcc-3.x's libstdc++.but breaks bootstrap :-(Revision 1.7, Fri Sep 1 06:34:37 2000 UTC (3 years, 9 months ago) by drepperCVS Tags: pre-lgplv2_1, libc-2_1_95, libc-2_1_94, glibc-2_2_3, glibc-2_2_2, glibc-2_2_1, glibc-2_2, glibc-2_1_97, glibc-2_1_96Add back imaxdiv_t definitions.Revision 1.6, Fri Sep 1 04:49:32 2000 UTC (3 years, 9 months ago) by drepperRemove unnecessary imaxabs and imaxdiv optimizations.--- glibc-2.1.3/sysdeps/generic/inttypes.h.old 1999-05-19 08:26:29.000000000 -0700+++ glibc-2.1.3/sysdeps/generic/inttypes.h 2004-06-09 17:21:17.000000000 -0700@@ -1,4 +1,4 @@-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.+/* Copyright (C) 1997, 1998, 1999, 2000 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@@ -262,34 +262,20 @@ #if __WORDSIZE == 64 /* We have to define the `uintmax_t' type using `ldiv_t'. */-# ifndef __ldiv_t_defined-/* Returned by `ldiv'. */ typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */- } ldiv_t;-# define __ldiv_t_defined 1-# endif--/* Returned by `imaxdiv'. */-typedef ldiv_t imaxdiv_t;+ } imaxdiv_t; #else /* We have to define the `uintmax_t' type using `lldiv_t'. */-# ifndef __lldiv_t_defined-/* Returned by `lldiv'. */-__extension__ typedef struct+typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */- } lldiv_t;-# define __lldiv_t_defined 1-# endif--/* Returned by `imaxdiv'. */-typedef lldiv_t imaxdiv_t;+ } imaxdiv_t; #endif @@ -321,28 +307,6 @@ # if __WORDSIZE == 64 -/* We ant to use the appropriate functions from <stdlib.h> but cannot- assume the header is read already. */-__extension__ extern long int labs __P ((long int __x))- __attribute__ ((__const__));-__extension__ extern ldiv_t ldiv __P ((long int __numer, long int __denom))- __attribute__ ((__const__));---/* Compute absolute value of N. */-extern __inline intmax_t-imaxabs (intmax_t __n) __THROW-{- return labs (__n);-}--/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */-extern __inline imaxdiv_t-imaxdiv (intmax_t __numer, intmax_t __denom) __THROW-{- return ldiv (__numer, __denom);-}- /* Like `strtol' but convert to `intmax_t'. */ # ifndef __strtol_internal_defined extern long int __strtol_internal __P ((__const char *__restrict __nptr,@@ -405,29 +369,6 @@ # else /* __WORDSIZE == 32 */ -/* We ant to use the appropriate functions from <stdlib.h> but cannot- assume the header is read already. */-__extension__ extern long long int llabs __P ((long long int __x))- __attribute__ ((__const__));-__extension__ extern lldiv_t lldiv __P ((long long int __numer,- long long int __denom))- __attribute__ ((__const__));---/* Compute absolute value of N. */-extern __inline intmax_t-imaxabs (intmax_t __n) __THROW-{- return llabs (__n);-}--/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */-extern __inline imaxdiv_t-imaxdiv (intmax_t __numer, intmax_t __denom) __THROW-{- return lldiv (__numer, __denom);-}- /* Like `strtol' but convert to `intmax_t'. */ # ifndef __strtoll_internal_defined __extension__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -