diff --git a/ChangeLog b/ChangeLog index 2d33d3f51..d8131a636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-11-29 Riccardo Mottola + + * Headers/ObjectiveC2/objc/runtime.h + * Headers/Foundation/NSObjCRuntime.h + Insert some kludge for PTR stuff on systems with fake C99 compatible headers. + 2013-11-26 Riccardo Mottola * Headers/GNUstepBase/GSConfig.h.in diff --git a/Headers/Foundation/NSObjCRuntime.h b/Headers/Foundation/NSObjCRuntime.h index a695f50a8..d7d19a7dd 100644 --- a/Headers/Foundation/NSObjCRuntime.h +++ b/Headers/Foundation/NSObjCRuntime.h @@ -43,6 +43,47 @@ #include #include +/* PA HP-UX kludge. */ +#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR) +#define PRIuPTR "lu" +#endif + +/* IRIX kludge. */ +#if defined(__sgi) +/* IRIX 6.5 provides all definitions, but only for C99 + compilations. */ +#define PRId8 "hhd" +#define PRIu8 "hhu" +#if (_MIPS_SZLONG == 32) +#define PRId64 "lld" +#define PRIu64 "llu" +#endif +/* This doesn't match , which always has "lld" here, but the + arguments are uint64_t, int64_t, which are unsigned long, long for + 64-bit in . */ +#if (_MIPS_SZLONG == 64) +#define PRId64 "ld" +#define PRIu64 "lu" +#endif +/* This doesn't match , which has "u" here, but the arguments + are uintptr_t, which is always unsigned long. */ +#define PRIuPTR "lu" +#endif + +/* Solaris < 10 kludge. */ +#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR) +#if defined(__arch64__) || defined (__x86_64__) +#define PRIuPTR "lu" +#define PRIdPTR "ld" +#define PRIxPTR "lx" +#else +#define PRIuPTR "u" +#define PRIdPTR "d" +#define PRIxPTR "x" +#endif +#endif + + /* These typedefs must be in place before GSObjCRuntime.h is imported. */ diff --git a/Headers/ObjectiveC2/objc/runtime.h b/Headers/ObjectiveC2/objc/runtime.h index 8461e6e31..1c7236f43 100644 --- a/Headers/ObjectiveC2/objc/runtime.h +++ b/Headers/ObjectiveC2/objc/runtime.h @@ -1,6 +1,12 @@ #ifndef __OBJECTIVEC2_RUNTIME_H_INCLUDED__ #define __OBJECTIVEC2_RUNTIME_H_INCLUDED__ + +#ifdef HAVE_STDINT_H #include +#else +#include +#endif + #include #include