#include <stdlib.h>
#include <string.h>
-#include "unlocked-io.h"
-
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
-#if HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#if ! HAVE_UINTPTR_T
+#include <stdint.h>
+
+#ifndef UINTPTR_MAX
/* This isn't perfect, but it's good enough for Bison, which needs
only to hash pointers. */
typedef size_t uintptr_t;
#endif
-#include <assert.h>
-
-#include <verify.h>
-#include <xalloc.h>
-
-/*---------------------.
-| Missing prototypes. |
-`---------------------*/
+/*---------.
+| Gnulib. |
+`---------*/
#include <stpcpy.h>
-
-/* From lib/basename.c. */
-char *base_name (char const *name);
+#include <unlocked-io.h>
+#include <verify.h>
+#include <xalloc.h>
/*-----------------.
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
-# if !defined (__GNUC__) || __GNUC__ < 2 || \
-(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
# define __attribute__(Spec) /* empty */
# endif
#endif
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
+#define FUNCTION_PRINT() fprintf (stderr, "%s: ", __func__)
+
/*------.
| NLS. |
`------*/
} while (0)
+/* Assertions. <assert.h>'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). |
`---------------------------------------------*/