From: Paul Eggert Date: Fri, 29 Apr 2011 08:51:24 +0000 (-0700) Subject: * lisp.h: Prefer 64-bit EMACS_INT if available. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~92^2~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7fd47d5ce2020a22f8db9776e8d1f47891b966dc;p=emacs.git * lisp.h: Prefer 64-bit EMACS_INT if available. (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit on 32-bit hosts that have 64-bit int, so that they can access large files. --- diff --git a/src/ChangeLog b/src/ChangeLog index a1e048b1390..a9fc541b481 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-04-29 Paul Eggert + * lisp.h: Prefer 64-bit EMACS_INT if available. + (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit + on 32-bit hosts that have 64-bit int, so that they can access + large files. + * lread.c, process.c: Do not include ; lisp.h does it now. Prefer intptr_t/uintptr_t for integers the same widths as pointers. diff --git a/src/lisp.h b/src/lisp.h index a8cf38f6669..3b9778ddc64 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -44,7 +44,16 @@ extern void check_cons_list (void); #ifndef EMACS_UINT #define EMACS_UINT unsigned long #endif -#else /* not _LP64 */ +#elif /* !_LP64 && */ BITS_PER_LONG < BITS_PER_LONG_LONG +#ifndef EMACS_INT +#define EMACS_INT long long +#define BITS_PER_EMACS_INT BITS_PER_LONG_LONG +#define pI "ll" +#endif +#ifndef EMACS_UINT +#define EMACS_UINT unsigned long long +#endif +#else /* ! (_LP64 || BITS_PER_LONG < BITS_PER_LONG_LONG) */ #ifndef EMACS_INT #define EMACS_INT int #define BITS_PER_EMACS_INT BITS_PER_INT