diff options
| author | Paul Eggert | 2014-05-30 13:19:29 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-30 13:19:29 -0700 |
| commit | 1915d8d63cb4de3b7fcadf059f1fe7f20fc5f8bf (patch) | |
| tree | b91c84b78c5610a2f218b00036843cf9f52a6248 | |
| parent | ff66db795045b919717b16288ac083f6eafbdcb0 (diff) | |
| download | emacs-1915d8d63cb4de3b7fcadf059f1fe7f20fc5f8bf.tar.gz emacs-1915d8d63cb4de3b7fcadf059f1fe7f20fc5f8bf.zip | |
Fix port to 32-bit AIX with xlc.
This doesn't fix Bug#17598, but it does fix a regression since Emacs
built with xlc until recently, and perhaps it'll help us fix Bug#17598.
* configure.ac (GC_SETJMP_WORKS): Define for AIX, too.
Merge from gnulib, incorporating:
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/ftoastr.c: Update from gnulib.
* src/alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
* src/lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
to work around a compiler bug in IBM xlc 12.1.
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | lib/ftoastr.h | 17 | ||||
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/alloc.c | 1 | ||||
| -rw-r--r-- | src/conf_post.h | 5 | ||||
| -rw-r--r-- | src/lisp.h | 2 |
7 files changed, 32 insertions, 13 deletions
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-05-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix port to 32-bit AIX with xlc (Bug#17598). | ||
| 4 | This doesn't fix Bug#17598, but it does fix a regression since Emacs | ||
| 5 | built with xlc until recently, and perhaps it'll help us fix Bug#17598. | ||
| 6 | * configure.ac (GC_SETJMP_WORKS): Define for AIX, too. | ||
| 7 | Merge from gnulib, incorporating: | ||
| 8 | 2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1 | ||
| 9 | * lib/ftoastr.c: Update from gnulib. | ||
| 10 | |||
| 1 | 2014-05-22 Paul Eggert <eggert@cs.ucla.edu> | 11 | 2014-05-22 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 12 | ||
| 3 | Fix port to 32-bit AIX (Bug#17540). | 13 | Fix port to 32-bit AIX (Bug#17540). |
diff --git a/configure.ac b/configure.ac index 0f4351fcd5d..3de3cb97c04 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -4380,7 +4380,7 @@ if test x$GCC = xyes; then | |||
| 4380 | else | 4380 | else |
| 4381 | case $opsys in | 4381 | case $opsys in |
| 4382 | dnl irix: Tested on Irix 6.5. SCM worked on earlier versions. | 4382 | dnl irix: Tested on Irix 6.5. SCM worked on earlier versions. |
| 4383 | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) | 4383 | aix* | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) |
| 4384 | AC_DEFINE(GC_SETJMP_WORKS, 1) | 4384 | AC_DEFINE(GC_SETJMP_WORKS, 1) |
| 4385 | ;; | 4385 | ;; |
| 4386 | esac | 4386 | esac |
diff --git a/lib/ftoastr.h b/lib/ftoastr.h index 6236292d9d9..26cad7369ce 100644 --- a/lib/ftoastr.h +++ b/lib/ftoastr.h | |||
| @@ -72,12 +72,13 @@ enum | |||
| 72 | 72 | ||
| 73 | /* _GL_FLT_PREC_BOUND is an upper bound on the precision needed to | 73 | /* _GL_FLT_PREC_BOUND is an upper bound on the precision needed to |
| 74 | represent a float value without losing information. Likewise for | 74 | represent a float value without losing information. Likewise for |
| 75 | _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double. */ | 75 | _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double. |
| 76 | These are macros, not enums, to work around a bug in IBM xlc 12.1. */ | ||
| 76 | 77 | ||
| 77 | #if FLT_RADIX == 10 /* decimal floating point */ | 78 | #if FLT_RADIX == 10 /* decimal floating point */ |
| 78 | enum { _GL_FLT_PREC_BOUND = FLT_MANT_DIG }; | 79 | # define _GL_FLT_PREC_BOUND FLT_MANT_DIG |
| 79 | enum { _GL_DBL_PREC_BOUND = DBL_MANT_DIG }; | 80 | # define _GL_DBL_PREC_BOUND DBL_MANT_DIG |
| 80 | enum { _GL_LDBL_PREC_BOUND = LDBL_MANT_DIG }; | 81 | # define _GL_LDBL_PREC_BOUND LDBL_MANT_DIG |
| 81 | #else | 82 | #else |
| 82 | 83 | ||
| 83 | /* An upper bound on the number of bits needed to represent a single | 84 | /* An upper bound on the number of bits needed to represent a single |
| @@ -95,13 +96,13 @@ enum | |||
| 95 | DIG digits. For why the "+ 1" is needed, see "Binary to Decimal | 96 | DIG digits. For why the "+ 1" is needed, see "Binary to Decimal |
| 96 | Conversion" in David Goldberg's paper "What Every Computer | 97 | Conversion" in David Goldberg's paper "What Every Computer |
| 97 | Scientist Should Know About Floating-Point Arithmetic" | 98 | Scientist Should Know About Floating-Point Arithmetic" |
| 98 | <http://docs.sun.com/source/806-3568/ncg_goldberg.html>. */ | 99 | <http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html>. */ |
| 99 | # define _GL_FLOAT_PREC_BOUND(dig) \ | 100 | # define _GL_FLOAT_PREC_BOUND(dig) \ |
| 100 | (INT_BITS_STRLEN_BOUND ((dig) * _GL_FLOAT_DIG_BITS_BOUND) + 1) | 101 | (INT_BITS_STRLEN_BOUND ((dig) * _GL_FLOAT_DIG_BITS_BOUND) + 1) |
| 101 | 102 | ||
| 102 | enum { _GL_FLT_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG) }; | 103 | # define _GL_FLT_PREC_BOUND _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG) |
| 103 | enum { _GL_DBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG) }; | 104 | # define _GL_DBL_PREC_BOUND _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG) |
| 104 | enum { _GL_LDBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG) }; | 105 | # define _GL_LDBL_PREC_BOUND _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG) |
| 105 | #endif | 106 | #endif |
| 106 | 107 | ||
| 107 | 108 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index a07daee1669..522f1ad965a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2014-05-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix port to 32-bit AIX with xlc (Bug#17598). | ||
| 4 | * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE. | ||
| 5 | * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty. | ||
| 6 | * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum, | ||
| 7 | to work around a compiler bug in IBM xlc 12.1. | ||
| 8 | |||
| 1 | 2014-05-29 Eli Zaretskii <eliz@gnu.org> | 9 | 2014-05-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * xterm.c (x_update_window_end): Don't invalidate the entire | 11 | * xterm.c (x_update_window_end): Don't invalidate the entire |
diff --git a/src/alloc.c b/src/alloc.c index ccb955a547b..12b3d4ba165 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -7003,7 +7003,6 @@ union | |||
| 7003 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; | 7003 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; |
| 7004 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; | 7004 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; |
| 7005 | enum enum_USE_LSB_TAG enum_USE_LSB_TAG; | 7005 | enum enum_USE_LSB_TAG enum_USE_LSB_TAG; |
| 7006 | enum FLOAT_TO_STRING_BUFSIZE FLOAT_TO_STRING_BUFSIZE; | ||
| 7007 | enum Lisp_Bits Lisp_Bits; | 7006 | enum Lisp_Bits Lisp_Bits; |
| 7008 | enum Lisp_Compiled Lisp_Compiled; | 7007 | enum Lisp_Compiled Lisp_Compiled; |
| 7009 | enum maxargs maxargs; | 7008 | enum maxargs maxargs; |
diff --git a/src/conf_post.h b/src/conf_post.h index 312f2389415..446c8275613 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -297,8 +297,9 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 297 | 297 | ||
| 298 | /* To use the struct hack with N elements, declare the struct like this: | 298 | /* To use the struct hack with N elements, declare the struct like this: |
| 299 | struct s { ...; t name[FLEXIBLE_ARRAY_MEMBER]; }; | 299 | struct s { ...; t name[FLEXIBLE_ARRAY_MEMBER]; }; |
| 300 | and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. */ | 300 | and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. |
| 301 | #if 199901 <= __STDC_VERSION__ | 301 | IBM xlc 12.1 claims to do C99 but mishandles flexible array members. */ |
| 302 | #if 199901 <= __STDC_VERSION__ && !defined __IBMC__ | ||
| 302 | # define FLEXIBLE_ARRAY_MEMBER | 303 | # define FLEXIBLE_ARRAY_MEMBER |
| 303 | #elif __GNUC__ && !defined __STRICT_ANSI__ | 304 | #elif __GNUC__ && !defined __STRICT_ANSI__ |
| 304 | # define FLEXIBLE_ARRAY_MEMBER 0 | 305 | # define FLEXIBLE_ARRAY_MEMBER 0 |
diff --git a/src/lisp.h b/src/lisp.h index af54887a51a..a92d7694a3b 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3815,7 +3815,7 @@ extern void print_error_message (Lisp_Object, Lisp_Object, const char *, | |||
| 3815 | Lisp_Object); | 3815 | Lisp_Object); |
| 3816 | extern Lisp_Object internal_with_output_to_temp_buffer | 3816 | extern Lisp_Object internal_with_output_to_temp_buffer |
| 3817 | (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); | 3817 | (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); |
| 3818 | enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; | 3818 | #define FLOAT_TO_STRING_BUFSIZE 350 |
| 3819 | extern int float_to_string (char *, double); | 3819 | extern int float_to_string (char *, double); |
| 3820 | extern void init_print_once (void); | 3820 | extern void init_print_once (void); |
| 3821 | extern void syms_of_print (void); | 3821 | extern void syms_of_print (void); |