diff --git a/src/OpenMesh/Tools/Utils/getopt.h b/src/OpenMesh/Tools/Utils/getopt.h index df0d7e01..a156402e 100644 --- a/src/OpenMesh/Tools/Utils/getopt.h +++ b/src/OpenMesh/Tools/Utils/getopt.h @@ -5,23 +5,26 @@ #include #if defined(WIN32) -#if defined(__cplusplus) + #if defined(__cplusplus) + + extern "C" { + + extern OPENMESHDLLEXPORT int opterr; + extern OPENMESHDLLEXPORT int optind; + extern OPENMESHDLLEXPORT int optopt; + extern OPENMESHDLLEXPORT int optreset; + extern OPENMESHDLLEXPORT char *optarg; -extern "C" { + OPENMESHDLLEXPORT extern int getopt(int nargc, char * const *nargv, const char *ostr); -extern OPENMESHDLLEXPORT int opterr; -extern OPENMESHDLLEXPORT int optind; -extern OPENMESHDLLEXPORT int optopt; -extern OPENMESHDLLEXPORT int optreset; -extern OPENMESHDLLEXPORT char *optarg; + } -OPENMESHDLLEXPORT extern int getopt(int nargc, char * const *nargv, const char *ostr); + #endif -} - -# endif +#elif defined __APPLE__ + #include #else -# include + #include #endif #endif /* _GETOPT_H_ */