summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/proto.h b/proto.h
index 82e5cb7..7d2fe2a 100644
--- a/proto.h
+++ b/proto.h
@@ -23,11 +23,11 @@ typedef long align_t;
#include <stdarg.h>
-/* C 9x specifies a va_copy() macro which should be used for copying
+/* C 9x specifies a __va_copy() macro which should be used for copying
objects of type va_list. Of course, most places don't have this yet,
but where it does exist we need to use it. */
-#ifndef va_copy
-#define va_copy(x,y) (x)=(y)
+#ifndef __va_copy
+#define __va_copy(x,y) (x)=(y)
#endif
#if STDC_HEADERS
@@ -59,6 +59,15 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
#endif /* STDC_HEADERS */
+#if HAVE_STRERROR
+/* Smells like POSIX. */
+#else
+/* Assume BSD-style sys_errlist[]. */
+extern int sys_nerr;
+extern char *sys_errlist[];
+#define strerror(x) ((0 <= (x)) && (errno < (x)) ? sys_errlist[x] : (char *)0)
+#endif
+
#if HAVE_UNISTD_H
#include <unistd.h>
#endif