summaryrefslogtreecommitdiff
path: root/misc/vfu/patches/patch-al
blob: 515ab1270dac969ea4d6793061a9fa72a89c42d4 (plain)
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
$NetBSD: patch-al,v 1.2 2014/06/29 19:43:54 dholland Exp $

- use extern "C" around the stuff here (why?)
- sprinkle const to make more modern C++ compilers happier

--- vslib/getopt2.h.orig	2001-10-28 13:53:02.000000000 +0000
+++ vslib/getopt2.h
@@ -15,7 +15,7 @@
 /* next line added by <cade@biscom.net> see getopt2.cpp for changes */
 #define GETOPT(opts) while((optc = getopt2(argc, argv, opts)) != -1)
 
-
+extern "C" {
 extern char *optarg;
 extern int optind;
 extern int opterr;
@@ -30,6 +30,8 @@ extern int opterr_report;
 
 /* name changed to getopt2 to avoid library function mismatch */
 
-int getopt2(int argc, char *argv[], char *optstring);
+int getopt2(int argc, char *argv[], const char *optstring);
+
+}
 
 #endif