windows compilation fixes, part 2
parent
d4d34dfd0f
commit
d41876fc4f
|
@ -23,6 +23,14 @@
|
||||||
# define _GETOPT_H 1
|
# define _GETOPT_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MTS_EXPORT_CORE)
|
||||||
|
#if MTS_BUILD_MODULE == MTS_MODULE_CORE
|
||||||
|
#define MTS_EXPORT_CORE __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define MTS_EXPORT_CORE __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,7 +41,7 @@ extern "C" {
|
||||||
Also, when `ordering' is RETURN_IN_ORDER,
|
Also, when `ordering' is RETURN_IN_ORDER,
|
||||||
each non-option ARGV-element is returned here. */
|
each non-option ARGV-element is returned here. */
|
||||||
|
|
||||||
extern char *optarg;
|
extern MTS_EXPORT_CORE char *optarg;
|
||||||
|
|
||||||
/* Index in ARGV of the next element to be scanned.
|
/* Index in ARGV of the next element to be scanned.
|
||||||
This is used for communication to and from the caller
|
This is used for communication to and from the caller
|
||||||
|
@ -47,16 +55,16 @@ extern char *optarg;
|
||||||
Otherwise, `optind' communicates from one call to the next
|
Otherwise, `optind' communicates from one call to the next
|
||||||
how much of ARGV has been scanned so far. */
|
how much of ARGV has been scanned so far. */
|
||||||
|
|
||||||
extern int optind;
|
extern MTS_EXPORT_CORE int optind;
|
||||||
|
|
||||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||||
for unrecognized options. */
|
for unrecognized options. */
|
||||||
|
|
||||||
extern int opterr;
|
extern MTS_EXPORT_CORE int opterr;
|
||||||
|
|
||||||
/* Set to an option character which was unrecognized. */
|
/* Set to an option character which was unrecognized. */
|
||||||
|
|
||||||
extern int optopt;
|
extern MTS_EXPORT_CORE int optopt;
|
||||||
|
|
||||||
#ifndef __need_getopt
|
#ifndef __need_getopt
|
||||||
/* Describe the long-named options requested by the application.
|
/* Describe the long-named options requested by the application.
|
||||||
|
@ -125,17 +133,17 @@ struct option
|
||||||
/* Many other libraries have conflicting prototypes for getopt, with
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
differences in the consts, in stdlib.h. To avoid compilation
|
differences in the consts, in stdlib.h. To avoid compilation
|
||||||
errors, only prototype getopt for the GNU C library. */
|
errors, only prototype getopt for the GNU C library. */
|
||||||
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
|
extern MTS_EXPORT_CORE int getopt (int __argc, char *const *__argv, const char *__shortopts);
|
||||||
|
|
||||||
# ifndef __need_getopt
|
# ifndef __need_getopt
|
||||||
extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
|
extern MTS_EXPORT_CORE int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
|
||||||
const struct option *__longopts, int *__longind);
|
const struct option *__longopts, int *__longind);
|
||||||
extern int getopt_long_only (int __argc, char *const *__argv,
|
extern MTS_EXPORT_CORE int getopt_long_only (int __argc, char *const *__argv,
|
||||||
const char *__shortopts,
|
const char *__shortopts,
|
||||||
const struct option *__longopts, int *__longind);
|
const struct option *__longopts, int *__longind);
|
||||||
|
|
||||||
/* Internal only. Users should not call this directly. */
|
/* Internal only. Users should not call this directly. */
|
||||||
extern int _getopt_internal (int __argc, char *const *__argv,
|
extern MTS_EXPORT_CORE int _getopt_internal (int __argc, char *const *__argv,
|
||||||
const char *__shortopts,
|
const char *__shortopts,
|
||||||
const struct option *__longopts, int *__longind,
|
const struct option *__longopts, int *__longind,
|
||||||
int __long_only);
|
int __long_only);
|
||||||
|
|
Loading…
Reference in New Issue