ORBit2 r2060 - in trunk: . src/idl-compiler



Author: tml
Date: Mon May 19 21:11:07 2008
New Revision: 2060
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2060&view=rev

Log:
2008-05-20  Tor Lillqvist  <tml novell com>

	Bug 524058 - Patch: fix ORBit2 idl-compiler so it compiles with MSVC.

	* src/idl-compiler/orbit-idl-c-backend.h
	* src/idl-compiler/orbit-idl-c-skelimpl.c
	* src/idl-compiler/orbit-idl-main.c
	* src/idl-compiler/orbit-idl3-types.h: Remove unnecessary
	inclusions of <unistd.h>. Surround those left with ifdefs.



Modified:
   trunk/ChangeLog
   trunk/src/idl-compiler/orbit-idl-c-backend.h
   trunk/src/idl-compiler/orbit-idl-c-skelimpl.c
   trunk/src/idl-compiler/orbit-idl-main.c
   trunk/src/idl-compiler/orbit-idl3-types.h

Modified: trunk/src/idl-compiler/orbit-idl-c-backend.h
==============================================================================
--- trunk/src/idl-compiler/orbit-idl-c-backend.h	(original)
+++ trunk/src/idl-compiler/orbit-idl-c-backend.h	Mon May 19 21:11:07 2008
@@ -3,8 +3,6 @@
 
 #include "orbit-idl2.h"
 
-#include <unistd.h>
-
 #define OIDL_C_WARNING "/*\n * This file was generated by orbit-idl-2 - DO NOT EDIT!\n */\n\n"
 
 typedef struct {

Modified: trunk/src/idl-compiler/orbit-idl-c-skelimpl.c
==============================================================================
--- trunk/src/idl-compiler/orbit-idl-c-skelimpl.c	(original)
+++ trunk/src/idl-compiler/orbit-idl-c-skelimpl.c	Mon May 19 21:11:07 2008
@@ -13,12 +13,14 @@
 }
 
 #include <ctype.h>
+#include <errno.h>
 #include <glib.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /* Abbreviations used here:
    "cbe" stands for "C backend"

Modified: trunk/src/idl-compiler/orbit-idl-main.c
==============================================================================
--- trunk/src/idl-compiler/orbit-idl-main.c	(original)
+++ trunk/src/idl-compiler/orbit-idl-main.c	Mon May 19 21:11:07 2008
@@ -23,7 +23,6 @@
 ***************************************************************************/
 
 #include "config.h"
-#include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -35,6 +34,10 @@
 
 #include "orbit-idl2.h"
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 /* FIXME: this program doesn't seem to support i18n? */
 #ifndef GETTEXT_PACKAGE
 #define GETTEXT_PACKAGE NULL

Modified: trunk/src/idl-compiler/orbit-idl3-types.h
==============================================================================
--- trunk/src/idl-compiler/orbit-idl3-types.h	(original)
+++ trunk/src/idl-compiler/orbit-idl3-types.h	Mon May 19 21:11:07 2008
@@ -2,7 +2,6 @@
 #define ORBIT_IDL3_TYPES_H 1
 
 #include <errno.h>
-#include <unistd.h>
 #include <stdio.h>
 #include <libIDL/IDL.h>
 #include <orbit/util/orbit-util.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]