#define GETOPT_LONG_H_ 1
#ifdef GETOPT_LONG_INCLUDE_LIBC
+ #include <stdarg.h>
+ #include <stdio.h>
#include <stdlib.h>
#include <string.h>
- #include <stdarg.h>
#endif
#ifndef HAVE_GETOPT_LONG
i_warnx_(const char *fmt, ...)
{
va_list args;
-
+
+ /* Linux "program_invocation_short_name" is a GNU extension, so we don't use it */
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define I_GET_PROG_NAME_() getprogname()
- #elif defined(__linux__)
- #include <errno.h>
- #define I_GET_PROG_NAME_() program_invocation_short_name
#else
#define I_GET_PROG_NAME_() "warnx"
#endif