Unbreak libdecnumber/decContext.h
Gerald Pfeifer
gerald@pfeifer.com
Wed Nov 30 00:22:00 GMT 2005
On Tue, 29 Nov 2005, Gerald Pfeifer wrote:
> your new code breaks the bootstrap on i386-unknown-freebsd4.10 which
> does not have stdint.h yet:
>
> /sw/test/gcc/trunk/libdecnumber/decNumber.c
> In file included from /sw/test/gcc/trunk/libdecnumber/decNumber.h:30,
> from /sw/test/gcc/trunk/libdecnumber/decNumber.c:156:
> /sw/test/gcc/trunk/libdecnumber/decContext.h:43:60: stdint.h: No such file or directory
> gmake[1]: *** [decNumber.o] Error 1
> gmake[1]: Leaving directory `/files/pfeifer/OBJ-1129-1020/libdecnumber'
> gmake: *** [all-libdecnumber] Error 2
>
> The following patch addresses this, and allows me to proceed the bootstrap
> beyond that point:
>
> 2005-11-29 Gerald Pfeifer <gerald@pfeifer.com>
>
> * decContext.h: Properly guard inclusion of stdint.h
Alas, libdecnumber has further problems, which did not show up
on i386-unknown-freebsd4.10, but trigger with the fix above on
i386-unknown-freebsd5.3 (and I assume GNU/Linux as well): config.h
is nicely created, but never used. :-(
The following passes bootstrap on i386-unknown-freebsd4.10 and a
build of the library on i386-unknown-freebsd5.3.
Gerald
2005-11-29 Gerald Pfeifer <gerald@pfeifer.com>
* decContext.h: Properly guard inclusion of stdint.h
* decContext.c: Include config.h
* decLibrary.c: Ditto.
* decNumber.c: Ditto.
* decRound.c: Ditto.
* decUtility.c: Ditto.
* decimal32.c: Ditto.
* decimal64.c: Ditto.
* decimal128.c: Ditto.
Index: decContext.h
===================================================================
--- decContext.h (revision 107680)
+++ decContext.h (working copy)
@@ -40,7 +40,9 @@
#define DECCFULLNAME "Decimal Context Descriptor" /* Verbose name */
#define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */
+#ifdef HAVE_STDINT_H
#include <stdint.h> /* C99 standard integers */
+#endif
#include <signal.h> /* for traps */
Index: decContext.c
===================================================================
--- decContext.c (revision 107680)
+++ decContext.c (working copy)
@@ -23,6 +23,7 @@
context structures. */
#include <string.h> /* for strcmp */
+#include "config.h"
#include "decContext.h" /* context and base types */
#include "decNumberLocal.h" /* decNumber local types, etc. */
Index: decRound.c
===================================================================
--- decRound.c (revision 107680)
+++ decRound.c (working copy)
@@ -18,6 +18,7 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "config.h"
#include "decContext.h"
#define FE_DEC_DOWNWARD 0
Index: decimal32.c
===================================================================
--- decimal32.c (revision 107680)
+++ decimal32.c (working copy)
@@ -31,6 +31,7 @@
#include <stdio.h> /* [for printf] */
#define DECNUMDIGITS 7 /* we need decNumbers with space for 7 */
+#include "config.h"
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decimal32.h" /* our primary include */
Index: decNumber.c
===================================================================
--- decNumber.c (revision 107680)
+++ decNumber.c (working copy)
@@ -153,6 +153,7 @@
#include <stdio.h> /* for printf [if needed] */
#include <string.h> /* for strcpy */
#include <ctype.h> /* for lower */
+#include "config.h"
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
Index: decimal64.c
===================================================================
--- decimal64.c (revision 107680)
+++ decimal64.c (working copy)
@@ -31,6 +31,7 @@
#include <stdio.h> /* [for printf] */
#define DECNUMDIGITS 16 /* we need decNumbers with space for 16 */
+#include "config.h"
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decimal64.h" /* our primary include */
Index: decUtility.c
===================================================================
--- decUtility.c (revision 107680)
+++ decUtility.c (working copy)
@@ -19,6 +19,7 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#include "config.h"
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decUtility.h" /* utility routines */
Index: decLibrary.c
===================================================================
--- decLibrary.c (revision 107680)
+++ decLibrary.c (working copy)
@@ -18,6 +18,7 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "config.h"
#include "decContext.h"
#include "decimal128.h"
#include "decimal64.h"
Index: decimal128.c
===================================================================
--- decimal128.c (revision 107680)
+++ decimal128.c (working copy)
@@ -31,6 +31,7 @@
#include <stdio.h> /* [for printf] */
#define DECNUMDIGITS 34 /* we need decNumbers with space for 34 */
+#include "config.h"
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decimal128.h" /* our primary include */
More information about the Gcc-patches
mailing list