Build fix for getopt.h on Apple. (Thanks to Adam Vandenberg for the fix)

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@978 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2013-11-28 11:11:26 +00:00
parent 752555ed88
commit c2388105c4

View File

@@ -5,23 +5,26 @@
#include <OpenMesh/Core/System/OpenMeshDLLMacros.hh> #include <OpenMesh/Core/System/OpenMeshDLLMacros.hh>
#if defined(WIN32) #if defined(WIN32)
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
extern OPENMESHDLLEXPORT int opterr; extern OPENMESHDLLEXPORT int opterr;
extern OPENMESHDLLEXPORT int optind; extern OPENMESHDLLEXPORT int optind;
extern OPENMESHDLLEXPORT int optopt; extern OPENMESHDLLEXPORT int optopt;
extern OPENMESHDLLEXPORT int optreset; extern OPENMESHDLLEXPORT int optreset;
extern OPENMESHDLLEXPORT char *optarg; extern OPENMESHDLLEXPORT char *optarg;
OPENMESHDLLEXPORT extern int getopt(int nargc, char * const *nargv, const char *ostr); OPENMESHDLLEXPORT extern int getopt(int nargc, char * const *nargv, const char *ostr);
} }
# endif #endif
#elif defined __APPLE__
#include <unistd.h>
#else #else
# include <getopt.h> #include <getopt.h>
#endif #endif
#endif /* _GETOPT_H_ */ #endif /* _GETOPT_H_ */