[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 64-bit compilation and printfs
From: |
Dan Nicolaescu |
Subject: |
Re: 64-bit compilation and printfs |
Date: |
Wed, 14 Oct 2009 09:40:06 -0700 (PDT) |
Adrian Robert <address@hidden> writes:
> In the course of getting the NS port compiling in 64-bit mode, some
> other developers and myself discovered some format - arg mismatches in
> printfs. XINT and XUINT return EMACS_INT which can be a long under
> LP64. I'd like to replace places that use %d in the code with %ld,
> and cast the argument to (long) to avoid issues in 32-bit mode. This
> has been checked in for the NS port; the patch attached here does this
> in common code. Does anyone think this should be done differently?
It looks like this the 64-bit mode uses the 32-bit configuration file.
>From configure.in:
## Apple Darwin / Mac OS X
*-apple-darwin* )
case "${canonical}" in
i[3456]86-* ) machine=intel386 ;;
powerpc-* ) machine=macppc ;;
* ) unported=yes ;;
esac
there should be an:
x86_64-* ) machine=amdx86-64 ;;
in that "case".
that will allow to remove this from emacs/src/s/intel386.h:
#if defined (DARWIN_OS)
#ifdef _LP64
/* For Intel Mac, with CC='gcc -arch x86_64'. */
#define NO_ARG_ARRAY
#endif
#endif
there shouldn't be any _LP64 checks in that file.