summaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd/patches/patch-aa
blob: 5d8cef338bdd432e90b27e690818e0e469455167 (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
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-aa,v 1.5 2005/08/15 02:20:33 rh Exp $

--- tools/config2header.orig	2004-06-23 05:02:31.000000000 +1000
+++ tools/config2header
@@ -77,6 +77,14 @@ while ($#ARGV >= 0) {
 
 my $use_gcc_extension = ($CC and $CC eq 'gcc');
 
+#
+# Skip any CC options such as -pipe
+# The last two parameters are the .c and .h files
+#
+while ($#ARGV > 1) {
+	shift @ARGV;
+}
+
 die "wrong number of arguments" if ($#ARGV != 1);
 my ($cfile, $hfile) = @ARGV;
 
@@ -214,7 +222,6 @@ while (<STDIN>) {
 print HFILE <<EOF
   IMAPOPT_LAST
 };
-extern struct imapopt_s imapopts[];
 
 enum enum_value {
   IMAP_ENUM_ZERO = 0,
@@ -260,6 +267,9 @@ print HFILE "    const struct enum_optio
 
 print HFILE <<EOF
 };
+
+extern struct imapopt_s imapopts[];
+
 #endif /* INCLUDED_IMAPOPTIONS_H */
 EOF
     ;