Insert some kludge for PTR stuff on systems with fake C99 compatible headers.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37419 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rmottola 2013-11-29 17:42:44 +00:00
parent e4c8d18e60
commit d06efa85b8
3 changed files with 53 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2013-11-29 Riccardo Mottola <rm@gnu.org>
* 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 <rm@gnu.org>
* Headers/GNUstepBase/GSConfig.h.in

View file

@ -43,6 +43,47 @@
#include <limits.h>
#include <float.h>
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
#define PRIuPTR "lu"
#endif
/* IRIX kludge. */
#if defined(__sgi)
/* IRIX 6.5 <inttypes.h> 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 <inttypes.h>, which always has "lld" here, but the
arguments are uint64_t, int64_t, which are unsigned long, long for
64-bit in <sgidefs.h>. */
#if (_MIPS_SZLONG == 64)
#define PRId64 "ld"
#define PRIu64 "lu"
#endif
/* This doesn't match <inttypes.h>, 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.
*/

View file

@ -1,6 +1,12 @@
#ifndef __OBJECTIVEC2_RUNTIME_H_INCLUDED__
#define __OBJECTIVEC2_RUNTIME_H_INCLUDED__
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#include <inttypes.h>
#endif
#include <stddef.h>
#include <sys/types.h>