1--- getopt-core.h	2017-05-15 19:05:30.377063268 +0200
2+++ getopt-core.h.new	2017-05-15 19:10:17.203267905 +0200
3@@ -20,6 +20,14 @@
4 #ifndef _GETOPT_CORE_H
5 #define _GETOPT_CORE_H 1
6
7+/* Ensure that DLL_VARIABLE is defined.  Since on OSF/1 4.0 and Irix 6.5
8+   <stdlib.h> includes <getopt.h>, and <config.h> is not a prerequisite for
9+   using <stdlib.h>, this file can be included without a prior
10+   "#include <config.h>".  */
11+#ifdef HAVE_CONFIG_H
12+# include <config.h>
13+#endif
14+
15 /* This header should not be used directly; include getopt.h or
16    unistd.h instead.  Unlike most bits headers, it does not have
17    a protective #error, because the guard macro for getopt.h in
18@@ -33,7 +41,7 @@
19    Also, when 'ordering' is RETURN_IN_ORDER,
20    each non-option ARGV-element is returned here.  */
21
22-extern char *optarg;
23+extern DLL_VARIABLE char *optarg;
24
25 /* Index in ARGV of the next element to be scanned.
26    This is used for communication to and from the caller
27@@ -47,16 +55,16 @@
28    Otherwise, 'optind' communicates from one call to the next
29    how much of ARGV has been scanned so far.  */
30
31-extern int optind;
32+extern DLL_VARIABLE int optind;
33
34 /* Callers store zero here to inhibit the error message 'getopt' prints
35    for unrecognized options.  */
36
37-extern int opterr;
38+extern DLL_VARIABLE int opterr;
39
40 /* Set to an option character which was unrecognized.  */
41
42-extern int optopt;
43+extern DLL_VARIABLE int optopt;
44
45 /* Get definitions and prototypes for functions to process the
46    arguments in ARGV (ARGC of them, minus the program name) for
47