stage4/generate_c/generate_c.cc
changeset 902 38dca2e264b6
parent 896 c1cf7259160d
parent 894 39086e324665
child 906 b225af94405f
--- a/stage4/generate_c/generate_c.cc	Sat Jul 05 13:57:39 2014 +0100
+++ b/stage4/generate_c/generate_c.cc	Sat Jul 05 14:10:28 2014 +0100
@@ -170,11 +170,12 @@
 /***********************************************************************/
 /***********************************************************************/
 
+
+static int generate_line_directives__ = 0;
+
+#ifdef __unix__
 /* Parse command line options passed from main.c !! */
 #include <stdlib.h> // for getsybopt()
-
-static int generate_line_directives__ = 0;
-
 int  stage4_parse_options(char *options) {
   enum {                    LINE_OPT = 0             /*, SOME_OTHER_OPT, YET_ANOTHER_OPT */};
   char *const token[] = { /*[LINE_OPT]=*/(char *)"l" /*, SOME_OTHER_OPT, ...             */, NULL };
@@ -198,7 +199,12 @@
   printf("          (options must be separated by commas. Example: 'l,w,x')\n"); 
   printf("      l : insert '#line' directives in generated C code.\n"); 
 }
-
+#else /* not __unix__ */
+/* getsubopt isn't supported with mingw, 
+ *  then stage4 options aren't available on windows*/
+void stage4_print_options(void) {}
+int  stage4_parse_options(char *options) {}
+#endif 
 
 /***********************************************************************/
 /***********************************************************************/