This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix libffi.call/cls_align_pointer.c on Solaris < 10


Eric Botcazou <ebotcazou@adacore.com> writes:

> libffi.call/cls_align_pointer.c fails to compile on Solaris < 10 because 
> PRIuPTR is not defined.  Hence the attached kludge.
>
> Tested on SPARC/Solaris 9 and SPARC/Solaris 10, OK for mainline?
>
>
> 2009-12-11  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	* testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
[...]
> +/* Solaris < 10 kludge.  */
> +#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
> +#if defined(__arch64__) || defined (__x86_64__)
> +#define PRIuPTR "lu"
> +#else
> +#define PRIuPTR "u"
> +#endif
> +#endif

The same problem exists on other platforms as well, e.g. Tru64 UNIX
V4.0F (which even lacks %lld/%llu support in libc, but has 64-bit long)
and V5.1B (which has %lld/%llu, but lacks the C99 PRI* macros).  Cf. PR
libffi/40701.

This seems to call for a more general solution than this hack, probably
along the lines of intl/loadmsgcat.c.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]