#include <WOKTools_BasicMap.ixx>
#include <TCollection.hxx>
#include <WOKTools_BasicMapIterator.hxx>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#ifdef WNT
#include <windows.h>
#else
-#include <unistd.h>
-#include <memory.h>
+# include <memory.h>
#endif
-#include <malloc.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
-#ifdef LIN
+#ifdef HAVE_MALLOC_H
+# include <malloc.h>
+#endif
+
+#ifdef HAVE_IOMANIP_H
# include <iomanip.h>
-#endif // LIN
+#endif
//=======================================================================
//function : WOKTools_BasicMap
// Author: Jean GAUTIER
// <jga@cobrax>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
#include <string.h>
#include <stdlib.h>
-
#include <WOKTools_Options.ixx>
#include <WOKTools_Define.hxx>
#include <TCollection_AsciiString.hxx>
-#if defined( LIN )
+#if defined(HAVE_GETOPT_H) && !defined(HAVE_UNISTD_H)
# include <getopt.h>
#elif !defined( WNT )
extern char *optarg;
#else
extern "C" Standard_IMPORT char *optarg;
extern "C" Standard_IMPORT int optind;
-extern "C" Standard_IMPORT int getopt ( int, char**, char* );
+extern "C" Standard_IMPORT int getopt( int, char**, char* );
#endif // WNT
//=======================================================================
mydefines = new WOKTools_HSequenceOfDefine;
myargs = new TColStd_HSequenceOfHAsciiString;
myerrflg = Standard_False;
-#if !defined( WNT ) && !defined( LIN )
+#if !defined( WNT ) && !defined( __GNUC__ )
optind = 1;
#else
optind = 0;