aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-10-03 00:06:52 -0700
committerPaul Eggert2013-10-03 00:06:52 -0700
commit0a858ebfc57a072ae8ab65f509d8a4901a2ec073 (patch)
treedd81bcdf11f3d3efa32ffe00f7cdc90d3c1144d9 /src
parentb52f569dcfc5c2e1b764c89d27ea8699a44228e6 (diff)
downloademacs-0a858ebfc57a072ae8ab65f509d8a4901a2ec073.tar.gz
emacs-0a858ebfc57a072ae8ab65f509d8a4901a2ec073.zip
Merge from gnulib.
* src/conf_post.h (__has_builtin, assume): Remove; gnulib now does these. * src/lisp.h: Include <verify.h>, for 'assume'. This also incorpoprates: 2013-10-02 verify: new macro 'assume' 2013-09-26 dup2, dup3: work around another cygwin crasher 2013-09-26 getdtablesize: work around cygwin issue
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/conf_post.h17
-rw-r--r--src/lisp.h5
3 files changed, 7 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8a0d8863548..8713d493dca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12013-10-03 Paul Eggert <eggert@cs.ucla.edu> 12013-10-03 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Adjust to merge from gnulib.
4 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
5 * lisp.h: Include <verify.h>, for 'assume'.
6
3 * eval.c (clobbered_eassert): New macro. 7 * eval.c (clobbered_eassert): New macro.
4 (internal_catch, internal_condition_case) 8 (internal_catch, internal_condition_case)
5 (internal_condition_case_1, internal_condition_case_2) 9 (internal_condition_case_1, internal_condition_case_2)
diff --git a/src/conf_post.h b/src/conf_post.h
index 0786bdfeb33..786105864f2 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -248,23 +248,6 @@ extern void _DebPrint (const char *fmt, ...);
248# define FLEXIBLE_ARRAY_MEMBER 1 248# define FLEXIBLE_ARRAY_MEMBER 1
249#endif 249#endif
250 250
251#ifndef __has_builtin
252# define __has_builtin(x) 0
253#endif
254
255/* Tell the compiler (and lint) that COND will always hold, and that
256 it should optimize (or check) accordingly. */
257#if (__has_builtin (__builtin_unreachable) \
258 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || __GNUC__ > 4)
259# define assume(cond) ((cond) ? (void) 0 : __builtin_unreachable ())
260#elif defined _MSC_VER
261# define assume(cond) __assume (cond)
262#elif defined lint
263# define assume(cond) ((cond) ? (void) 0 : abort ())
264#else
265# define assume(cond) ((void) (0 && (cond)))
266#endif
267
268/* Use this to suppress gcc's `...may be used before initialized' warnings. */ 251/* Use this to suppress gcc's `...may be used before initialized' warnings. */
269#ifdef lint 252#ifdef lint
270/* Use CODE only if lint checking is in effect. */ 253/* Use CODE only if lint checking is in effect. */
diff --git a/src/lisp.h b/src/lisp.h
index 688c89c1eee..ee83e227db0 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -31,6 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31#include <limits.h> 31#include <limits.h>
32 32
33#include <intprops.h> 33#include <intprops.h>
34#include <verify.h>
34 35
35INLINE_HEADER_BEGIN 36INLINE_HEADER_BEGIN
36 37
@@ -1145,9 +1146,9 @@ struct Lisp_Vector
1145 /* ...but sometimes there is also a pointer internally used in 1146 /* ...but sometimes there is also a pointer internally used in
1146 vector allocation code. Usually you don't want to touch this. */ 1147 vector allocation code. Usually you don't want to touch this. */
1147 struct Lisp_Vector *next; 1148 struct Lisp_Vector *next;
1148 1149
1149 /* We can't use FLEXIBLE_ARRAY_MEMBER here. */ 1150 /* We can't use FLEXIBLE_ARRAY_MEMBER here. */
1150 Lisp_Object contents[1]; 1151 Lisp_Object contents[1];
1151 } u; 1152 } u;
1152 }; 1153 };
1153 1154