getopt.h 646 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3 4
#ifndef _GETOPT_H_
#define _GETOPT_H_

#include <OpenMesh/Core/System/compiler.hh>
Mike Kremer's avatar
Mike Kremer committed
5
#include <OpenMesh/Core/System/OpenMeshDLLMacros.hh>
Jan Möbius's avatar
Jan Möbius committed
6

Jan Möbius's avatar
Jan Möbius committed
7
#if defined(_MSC_VER)
8 9 10 11 12 13 14 15 16
 #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;
Jan Möbius's avatar
Jan Möbius committed
17

18
   OPENMESHDLLEXPORT extern int getopt(int nargc, char * const *nargv, const char *ostr);
Jan Möbius's avatar
Jan Möbius committed
19

20
  }
Jan Möbius's avatar
Jan Möbius committed
21

22
  #endif
Jan Möbius's avatar
Jan Möbius committed
23

Jan Möbius's avatar
Jan Möbius committed
24
#elif defined __APPLE__ || defined(__FreeBSD__)
25
 #include <unistd.h>
Jan Möbius's avatar
Jan Möbius committed
26
#else
27
 #include <getopt.h>
Jan Möbius's avatar
Jan Möbius committed
28 29 30
#endif

#endif /* _GETOPT_H_ */