Commit b00cdd96 authored by Paul Eggert's avatar Paul Eggert
Browse files

* lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.

This is a cleaner way to fix the MinGW-w64 porting problem.
Check for INTPTR_MAX misconfiguration.
parent c10e9ece
2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
This is a cleaner way to fix the MinGW-w64 porting problem.
Check for INTPTR_MAX misconfiguration.
2014-01-01 Eli Zaretskii <eliz@gnu.org>
* search.c (newline_cache_on_off, find_newline): In indirect
......
......@@ -63,21 +63,25 @@ INLINE_HEADER_BEGIN
pI - printf length modifier for EMACS_INT
EMACS_UINT - unsigned variant of EMACS_INT */
#ifndef EMACS_INT_MAX
# if LONG_MAX < LLONG_MAX && (defined(WIDE_EMACS_INT) || defined(_WIN64))
typedef long long int EMACS_INT;
typedef unsigned long long int EMACS_UINT;
# define EMACS_INT_MAX LLONG_MAX
# define pI "ll"
# elif INT_MAX < LONG_MAX
# if INTPTR_MAX <= 0
# error "INTPTR_MAX misconfigured"
# elif INTPTR_MAX <= INT_MAX && !defined WIDE_EMACS_INT
typedef int EMACS_INT;
typedef unsigned int EMACS_UINT;
# define EMACS_INT_MAX INT_MAX
# define pI ""
# elif INTPTR_MAX <= LONG_MAX && !defined WIDE_EMACS_INT
typedef long int EMACS_INT;
typedef unsigned long EMACS_UINT;
# define EMACS_INT_MAX LONG_MAX
# define pI "l"
# elif INTPTR_MAX <= LLONG_MAX
typedef long long int EMACS_INT;
typedef unsigned long long int EMACS_UINT;
# define EMACS_INT_MAX LLONG_MAX
# define pI "ll"
# else
typedef int EMACS_INT;
typedef unsigned int EMACS_UINT;
# define EMACS_INT_MAX INT_MAX
# define pI ""
# error "INTPTR_MAX too large"
# endif
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment