Fix MinGW-Bug [2445962]; (reported by Keishi Suenaga).

This commit is contained in:
Keith Marshall
2009-01-04 17:35:36 +00:00
parent 952783ba77
commit f1170e02f2
3 changed files with 51 additions and 2 deletions

View File

@ -45,6 +45,17 @@ extern char *optarg; /* pointer to argument of current option */
extern int getopt( int, char * const [], const char * );
#ifdef _BSD_SOURCE
/*
* BSD adds the non-standard `optreset' feature, for reinitialisation
* of `getopt' parsing. We support this feature, for applications which
* proclaim their BSD heritage, before including this header; however,
* to maintain portability, developers are advised to avoid it.
*/
# define optreset __mingw_optreset
extern int optreset;
#endif
#ifdef __cplusplus
}
#endif