-int vsnprintf ();
-#endif
-
-/* SunOS brain damage -- for some reason, SunOS header files fail to
- declare the functions below, which causes all kinds of problems
- (compiling errors) with pointer arithmetic and similar.
-
- This used to be only within `#ifdef STDC_HEADERS', but it got
- tripped on other systems (AIX), thus causing havoc. Fortunately,
- SunOS appears to be the only system braindamaged that badly, so I
- added an extra `#ifdef sun' guard. */
-#ifndef STDC_HEADERS
-#ifdef sun
-#ifndef __cplusplus
-char *strstr ();
-char *strchr ();
-char *strrchr ();
-char *strtok ();
-char *strdup ();
-void *memcpy ();
-#endif /* not __cplusplus */
-#endif /* sun */
-#endif /* STDC_HEADERS */
+#include <stdarg.h>
+int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
+#endif
+
+/* Some systems (Linux libc5, "NCR MP-RAS 3.0", and others) don't
+ provide MAP_FAILED, a symbolic constant for the value returned by
+ mmap() when it doesn't work. Usually, this constant should be -1.
+ This only makes sense for files that use mmap() and include
+ sys/mman.h *before* sysdep.h, but doesn't hurt others. */
+
+#ifndef MAP_FAILED
+# define MAP_FAILED ((void *) -1)
+#endif
+
+/* Enable system fnmatch only on systems where fnmatch.h is usable.
+ If the fnmatch on your system is buggy, undef this symbol and a
+ replacement implementation will be used instead. */
+#ifdef HAVE_WORKING_FNMATCH_H
+# define SYSTEM_FNMATCH
+#endif
+
+#ifdef SYSTEM_FNMATCH
+# include <fnmatch.h>
+#else /* not SYSTEM_FNMATCH */
+/* Define fnmatch flags. Undef them first to avoid warnings in case
+ an evil library include chose to include system fnmatch.h. */
+# undef FNM_PATHNAME
+# undef FNM_NOESCAPE
+# undef FNM_PERIOD
+# undef FNM_NOMATCH
+
+# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
+# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
+# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
+# define FNM_NOMATCH 1
+
+int fnmatch (const char *, const char *, int);
+#endif
+
+/* Provide sig_atomic_t if the system doesn't. */
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+#endif
+
+/* Provide uint32_t on the platforms that don't define it. Although
+ most code should be agnostic about integer sizes, some code really
+ does need a 32-bit integral type. Such code should use uint32_t.
+ (The exception is gnu-md5.[ch], which uses its own detection for
+ portability across platforms.) */
+
+#ifndef HAVE_UINT32_T
+# if SIZEOF_INT == 4
+typedef unsigned int uint32_t;
+# else
+# if SIZEOF_LONG == 4
+typedef unsigned long uint32_t;
+# else
+# if SIZEOF_SHORT == 4
+typedef unsigned short uint32_t;
+# else
+ #error "Cannot determine a 32-bit unsigned integer type"
+# endif
+# endif
+# endif
+#endif
+
+/* If uintptr_t isn't defined, simply typedef it to unsigned long. */
+#ifndef HAVE_UINTPTR_T
+typedef unsigned long uintptr_t;
+#endif
+
+/* If intptr_t isn't defined, simply typedef it to long. */
+#ifndef HAVE_INTPTR_T
+typedef long intptr_t;
+#endif