Compilation errors with mingw build caused by undefined optreset
Hi all,
Since commit 60ff2fd introducing the centralizated getopt-related
things in a global header file, build on Windows with mingw is failing
because of some declarations of HAVE_INT_OPTRESET causing optreset to
become undefined:
postmaster.c: In function 'PostmasterMain':
postmaster.c:853:2: error: 'optreset' undeclared (first use in this function)
postmaster.c:853:2: note: each undeclared identifier is reported only
once for each function it appears in
This failure is new with 9.4, and attached is a patch fixing it...
Regards,
--
Michael
Attachments:
20140508_minwg_getopt_error.patchapplication/octet-stream; name=20140508_minwg_getopt_error.patchDownload
diff --git a/src/include/pg_getopt.h b/src/include/pg_getopt.h
index 6488004..fc900b7 100644
--- a/src/include/pg_getopt.h
+++ b/src/include/pg_getopt.h
@@ -29,12 +29,12 @@ extern int optind;
extern int opterr;
extern int optopt;
+#endif /* HAVE_GETOPT_H */
+
#ifdef HAVE_INT_OPTRESET
extern int optreset;
#endif
-#endif /* HAVE_GETOPT_H */
-
#ifndef HAVE_GETOPT
extern int getopt(int nargc, char *const * nargv, const char *ostr);
#endif
Michael Paquier <michael.paquier@gmail.com> writes:
Since commit 60ff2fd introducing the centralizated getopt-related
things in a global header file, build on Windows with mingw is failing
Hm, buildfarm member narwhal doesn't seem to be having any such problem.
(It's got its own issues, but not this.)
Do you think you could put up a buildfarm critter using whatever version
of mingw you're using? Without buildfarm feedback, things *will* break
regularly; Windows is just too weird to expect otherwise.
because of some declarations of HAVE_INT_OPTRESET causing optreset to
become undefined:
This failure is new with 9.4, and attached is a patch fixing it...
I'm a bit suspicious of this patch because of the comment in pg_getopt.h
saying that cygwin doesn't want those variables to be declared.
We can try it, but the lack of up-to-date cygwin members in the buildfarm
means we won't be real sure whether it breaks cygwin.
Of course, I guess the response to any complaints can be "please put
up a buildfarm member" ...
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 05/08/2014 11:30 AM, Tom Lane wrote:
Michael Paquier <michael.paquier@gmail.com> writes:
Since commit 60ff2fd introducing the centralizated getopt-related
things in a global header file, build on Windows with mingw is failingHm, buildfarm member narwhal doesn't seem to be having any such problem.
(It's got its own issues, but not this.)
jacana and frogmouth are also Mingw animals, and are not having issues.
cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, May 9, 2014 at 12:55 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
On 05/08/2014 11:30 AM, Tom Lane wrote:
Michael Paquier <michael.paquier@gmail.com> writes:
Since commit 60ff2fd introducing the centralizated getopt-related
things in a global header file, build on Windows with mingw is failingHm, buildfarm member narwhal doesn't seem to be having any such problem.
(It's got its own issues, but not this.)jacana and frogmouth are also Mingw animals, and are not having issues.
Seems like the version I am using, which is the one actually specified
on the wiki here (
http://www.postgresql.org/docs/devel/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW)
is able to reproduce that...
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, May 9, 2014 at 12:30 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Michael Paquier <michael.paquier@gmail.com> writes:
Since commit 60ff2fd introducing the centralizated getopt-related
things in a global header file, build on Windows with mingw is failingHm, buildfarm member narwhal doesn't seem to be having any such problem.
(It's got its own issues, but not this.)Do you think you could put up a buildfarm critter using whatever version
of mingw you're using? Without buildfarm feedback, things *will* break
regularly; Windows is just too weird to expect otherwise.
Yeah, after sleeping on this I had the same thought. I'll try to get
one working properly.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers