Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c15a52

Browse files
committed
Allow for platforms that have optreset but not <getopt.h>.
Reportedly, some versions of mingw are like that, and it seems plausiblein general that older platforms might be that way. However, we'ddetermined experimentally that just doing "extern int" conflicts withthe way Cygwin declares these variables, so explicitly exclude Cygwin.Michael Paquier, tweaked by me to hopefully not break Cygwin
1 parent4f7bb4b commit0c15a52

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/include/pg_getopt.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ extern intoptind;
2929
externintopterr;
3030
externintoptopt;
3131

32-
#ifdefHAVE_INT_OPTRESET
32+
#endif/* HAVE_GETOPT_H */
33+
34+
/*
35+
* Some platforms have optreset but not <getopt.h>. Cygwin, however,
36+
* doesn't like this either.
37+
*/
38+
#if defined(HAVE_INT_OPTRESET)&& !defined(__CYGWIN__)
3339
externintoptreset;
3440
#endif
3541

36-
#endif/* HAVE_GETOPT_H */
37-
3842
#ifndefHAVE_GETOPT
3943
externintgetopt(intnargc,char*const*nargv,constchar*ostr);
4044
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp