This is the mail archive of the
mailing list for the newlib project.
Re: Path to fix MIPS build problem
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: <newlib at sourceware dot org>
- Date: Thu, 18 Apr 2013 11:08:10 -0700
- Subject: Re: Path to fix MIPS build problem
- References: <2132ef80-ff52-461e-8013-f7cae240b258 at BAMAIL02 dot ba dot imgtec dot org> <20130418072422 dot GD25188 at calimero dot vinschen dot de>
On Thu, 2013-04-18 at 09:24 +0200, Corinna Vinschen wrote:
> On Apr 17 13:34, Steve Ellcey wrote:
> In theory, yes. I'm just a bit puzzled. intptr_t and uintptr_t are
> defined in stdint.h, too. Wouldn't it make sense to remove their
> definitions now in cfe_api.h as well?
Yes, it would. I didn't do that in my first patch because I didn't see
any warnings about them. I think I didn't get any warning because the
typedefs in cfe_api.h show up before the typedefs in stdint.h and I
believe GCC suppresses warnings in system header files. I took out the
definitions of intptr_t and uintptr_t and also the includes that were
only there to define the values used for int64_t, uint64_t, intptr_t,
and uintptr_t and everything still builds.
Here is a new ChangeLog and diff:
2013-04-18 Steve Ellcey <firstname.lastname@example.org>
* mips/cfe_api.h (int64_t): Remove define.
(uint64_t): Remove define.
(intptr_t): Remove define.
(uintptr_t): Remove define.
(sys/types.h): Remove include.
(_ansi.h): Remove include.
diff --git a/libgloss/mips/cfe_api.h b/libgloss/mips/cfe_api.h
index afe4683..b17f929 100644
@@ -59,13 +59,6 @@
* CFE_API_* can be defined here as desired.
/* Begin customization. */
-#include <sys/types.h> /* for __uint64_t and __int64_t. */
-#define int64_t __int64_t
-#define uint64_t __int64_t
-#include <_ansi.h> /* for _POINTER_INT. */
-typedef _POINTER_INT intptr_t;
-typedef unsigned _POINTER_INT uintptr_t;
#define cfe_strlen(s) strlen(s)