File: getopt-core.h.diff

package info (click to toggle)
gettext 0.23.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 167,652 kB
  • sloc: ansic: 532,868; sh: 68,216; perl: 28,011; makefile: 9,046; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; awk: 7; php: 7
file content (46 lines) | stat: -rw-r--r-- 1,599 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- getopt-core.h.bak	2020-06-26 21:24:59.890340657 +0200
+++ getopt-core.h	2020-07-28 19:48:27.769014629 +0200
@@ -20,6 +20,14 @@
 #ifndef _GETOPT_CORE_H
 #define _GETOPT_CORE_H 1
 
+/* Ensure that DLL_VARIABLE is defined.  Since on OSF/1 4.0 and Irix 6.5
+   <stdlib.h> includes <getopt.h>, and <config.h> is not a prerequisite for
+   using <stdlib.h>, this file can be included without a prior
+   "#include <config.h>".  */
+#if !defined DLL_VARIABLE && defined HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 /* This header should not be used directly; include getopt.h or
    unistd.h instead.  Unlike most bits headers, it does not have
    a protective #error, because the guard macro for getopt.h in
@@ -33,7 +41,7 @@
    Also, when 'ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
-extern char *optarg;
+extern DLL_VARIABLE char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -47,16 +55,16 @@
    Otherwise, 'optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
-extern int optind;
+extern DLL_VARIABLE int optind;
 
 /* Callers store zero here to inhibit the error message 'getopt' prints
    for unrecognized options.  */
 
-extern int opterr;
+extern DLL_VARIABLE int opterr;
 
 /* Set to an option character which was unrecognized.  */
 
-extern int optopt;
+extern DLL_VARIABLE int optopt;
 
 /* Get definitions and prototypes for functions to process the
    arguments in ARGV (ARGC of them, minus the program name) for