Unforunately I needed the following snippet for cygwin xapian-1.1 <gnu_getopt.h> (for both, core and omega) problem: In file included from ../scriptindex.cc:55: ../common/gnu_getopt.h:61: warning: 'optarg' redeclared without dllimport attribute: previous dllimport ignored ../common/gnu_getopt.h:62: warning: 'optind' redeclared without dllimport attribute: previous dllimport ignored ../common/gnu_getopt.h:63: warning: 'opterr' redeclared without dllimport attribute: previous dllimport ignored ../common/gnu_getopt.h:64: warning: 'optopt' redeclared without dllimport attribute: previous dllimport ignored gnu_getopt.h: #ifdef __CYGWIN__ extern int __declspec(dllimport) opterr; /* if error message should be printed */ extern int __declspec(dllimport) optind; /* index into parent argv vector */ extern int __declspec(dllimport) optopt; /* character checked for validity */ extern int __declspec(dllimport) optreset; /* reset getopt */ extern char __declspec(dllimport) *optarg; /* argument associated with option */ #else extern char *optarg; extern int optind; extern int opterr; extern int optopt; #endif -- Reini Urban http://phpwiki.org/ http://murbreak.at/
On Wed, Mar 24, 2010 at 11:14:48AM +0100, Reini Urban wrote:> Unforunately I needed the following snippet for cygwin xapian-1.1 > <gnu_getopt.h> (for both, core and omega)I think it would be better to ensure that we are using out own optarg, etc, rather than trying to patch things to work with ones which the C library happens to declare. There's just much less to go wrong that way. Does this patch fix the issue? http://oligarchy.co.uk/xapian/patches/getopt-namespace.patch Cheers, Olly