[PATCH v2] Harmonize stdint.h and _default_types.h

Sebastian Huber sebastian.huber@embedded-brains.de
Wed Dec 4 18:12:00 GMT 2013


On 2013-12-04 18:29, Steve Ellcey wrote:
> On Tue, 2013-12-03 at 15:52 +0100, Sebastian Huber wrote:
>> v2: Fix INT(8|16|32|64)_C() definitions.
>
> I think this patch broke the newlib build for MIPS.  My build is dying
> in libgloss:
>
> mips-mti-elf-gcc
> -B/local/home/sellcey/nightly/obj-mips-mti-elf/newlib/mips-mti-elf/newlib/ -isystem /local/home/sellcey/nightly/obj-mips-mti-elf/newlib/mips-mti-elf/newlib/targ-include -isystem /local/home/sellcey/nightly/src/newlib/newlib/libc/include -B/local/home/sellcey/nightly/obj-mips-mti-elf/newlib/mips-mti-elf/libgloss/mips -L/local/home/sellcey/nightly/obj-mips-mti-elf/newlib/mips-mti-elf/libgloss/libnosys -L/local/home/sellcey/nightly/src/newlib/libgloss/mips    -c -g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt -g -O2 -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt /local/home/sellcey/nightly/src/newlib/libgloss/mips/cfe_mem.c -o cfe_mem.o
> In file included
> from /local/home/sellcey/nightly/src/newlib/libgloss/mips/cfe_api.c:49:0:
> /local/home/sellcey/nightly/src/newlib/libgloss/mips/cfe_api.h:147:5:
> error: unknown type name int64_t
>       int64_t fwi_version;  /* major, minor, eco version */
>
> I am guessing that maybe I need to include some new header or add some
> new define?  Is anyone else having this problem?

What about this fix:

diff --git a/libgloss/mips/cfe_api.h b/libgloss/mips/cfe_api.h
index b17f929..b79b0a0 100644
--- a/libgloss/mips/cfe_api.h
+++ b/libgloss/mips/cfe_api.h
@@ -59,6 +59,7 @@
   * CFE_API_* can be defined here as desired.
   */
  /* Begin customization. */
+#include <stdint.h>
  #include <string.h>
  #define cfe_strlen(s)  strlen(s)

This header file uses C99 types, so it should include <stdint.h>.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Newlib mailing list