SHA256
1
0
forked from pool/man
man/man-db-2.4.1-error.dif

54 lines
1.3 KiB
Plaintext

--- lib/error.c
+++ lib/error.c Fri Mar 16 16:48:40 2001
@@ -69,12 +69,15 @@
#define strerror private_strerror
#endif
+#include "lib/error.h"
+
/* Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.
If ERRNUM is nonzero, print its corresponding system error message.
Exit with status STATUS if it is nonzero. */
/* VARARGS */
+#ifndef __GLIBC__ /* glibc exports this function */
void
#if defined(VA_START) && __STDC__
error (int status, int errnum, const char *message, ...)
@@ -117,3 +120,4 @@
if (status)
exit (status);
}
+#endif
--- lib/error.h
+++ lib/error.h Fri Mar 16 16:45:18 2001
@@ -7,10 +7,11 @@
extern int errno;
#endif
+/* Use error() function of glibc */
#if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT)
-void error (int, int, const char *, ...);
+extern void error (int, int, const char *, ...);
#else
-void error ();
+extern void error ();
#endif
#endif
--- lib/xmalloc.c
+++ lib/xmalloc.c Fri Mar 16 16:45:37 2001
@@ -44,9 +44,9 @@
int xmalloc_exit_failure = EXIT_FAILURE;
#if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT)
-void error (int, int, const char *, ...);
+extern void error (int, int, const char *, ...);
#else
-void error ();
+extern void error ();
#endif
#include "manconfig.h"