X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/cb48f1919ce8ccbd8587556c165a8b8b0d78d80f..0049ec8628e5a320d055a0cea8676a58cec60986:/src/system.h diff --git a/src/system.h b/src/system.h index 241a40d7..985bbbee 100644 --- a/src/system.h +++ b/src/system.h @@ -1,6 +1,6 @@ /* System-dependent definitions for Bison. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -45,15 +45,8 @@ # include #endif -#if HAVE_UNISTD_H -# include -#endif - -#if HAVE_INTTYPES_H -# include -#endif - -#include +#include +#include #ifndef UINTPTR_MAX /* This isn't perfect, but it's good enough for Bison, which needs @@ -66,7 +59,6 @@ typedef size_t uintptr_t; | Gnulib. | `---------*/ -#include #include #include #include @@ -120,15 +112,6 @@ typedef size_t uintptr_t; #define N_(Msgid) (Msgid) -/*-------------------------------. -| Fix broken compilation flags. | -`-------------------------------*/ - -#ifndef LOCALEDIR -# define LOCALEDIR "/usr/local/share/locale" -#endif - - /*-----------. | Booleans. | `-----------*/ @@ -136,6 +119,21 @@ typedef size_t uintptr_t; #include + +/*-------------. +| Assertions. | +`-------------*/ + +/* 's assertions are too heavyweight, and can be disabled + too easily, so use aver rather than assert. */ +static inline void +aver (bool assertion) +{ + if (! assertion) + abort (); +} + + /*-----------. | Obstacks. | `-----------*/ @@ -210,11 +208,6 @@ do { \ } while (0) -/* Assertions. 's assertions are too heavyweight, and can - be disabled too easily, so implement it separately here. */ -#define assert(x) ((void) ((x) || (abort (), 0))) - - /*---------------------------------------------. | Debugging memory allocation (must be last). | `---------------------------------------------*/