ORBit2 r2059 - in trunk: . src/orb src/orb/GIOP src/orb/orb-core src/orb/poa src/orb/util
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: ORBit2 r2059 - in trunk: . src/orb src/orb/GIOP src/orb/orb-core src/orb/poa src/orb/util
- Date: Mon, 19 May 2008 21:01:57 +0000 (UTC)
Author: tml
Date: Mon May 19 21:01:57 2008
New Revision: 2059
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2059&view=rev
Log:
2008-05-19 Tor Lillqvist <tml novell com>
Bug 524061 - Patch: fix ORBit2 so it compiles with MSVC.
* src/orb/poa/poa.c
* src/orb/poa/orbit-adaptor.c
* src/orb/orbit-init.c
* src/orb/orb-core/orbhttp.c'
* src/orb/orb-core/orbit-small.c
* util/genrand.c
* GIOP/giop-connection.c: Patch by Marcelo Vanzin. Add
HAVE_UNISTD_H and HAVE_SYS_TIME_H ifdefs. Define replacements for
getpid() and pid_t.
Modified:
trunk/ChangeLog
trunk/src/orb/GIOP/giop-connection.c
trunk/src/orb/orb-core/orbhttp.c
trunk/src/orb/orb-core/orbit-small.c
trunk/src/orb/orbit-init.c
trunk/src/orb/poa/orbit-adaptor.c
trunk/src/orb/poa/poa.c
trunk/src/orb/util/genrand.c
Modified: trunk/src/orb/GIOP/giop-connection.c
==============================================================================
--- trunk/src/orb/GIOP/giop-connection.c (original)
+++ trunk/src/orb/GIOP/giop-connection.c Mon May 19 21:01:57 2008
@@ -1,7 +1,9 @@
#include "config.h"
#include <orbit/GIOP/giop.h>
#include <string.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include "giop-private.h"
Modified: trunk/src/orb/orb-core/orbhttp.c
==============================================================================
--- trunk/src/orb/orb-core/orbhttp.c (original)
+++ trunk/src/orb/orb-core/orbhttp.c Mon May 19 21:01:57 2008
@@ -31,6 +31,10 @@
# ifndef _WINSOCKAPI_
# define _WINSOCKAPI_
# endif
+# define read(s, b, l) recv(s, b, l, 0)
+# define write(s, b, l) send(s, b, l, 0)
+# define EINPROGRESS WSAEINPROGRESS
+# define close closesocket
#else /* !HAVE_WINSOCK2_H */
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
@@ -53,6 +57,9 @@
# include <sys/select.h>
#endif
+#if !defined(strncasecmp)
+# define strncasecmp _strnicmp
+#endif
#define CHECK_URI(str) \
(!strncmp(str, "IOR:", strlen("IOR:")) \
Modified: trunk/src/orb/orb-core/orbit-small.c
==============================================================================
--- trunk/src/orb/orb-core/orbit-small.c (original)
+++ trunk/src/orb/orb-core/orbit-small.c Mon May 19 21:01:57 2008
@@ -22,7 +22,9 @@
#include <config.h>
#include <sys/types.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <stdio.h>
#include <string.h>
Modified: trunk/src/orb/orbit-init.c
==============================================================================
--- trunk/src/orb/orbit-init.c (original)
+++ trunk/src/orb/orbit-init.c Mon May 19 21:01:57 2008
@@ -1,7 +1,9 @@
#include "config.h"
#include <stdlib.h>
#include <sys/types.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -13,6 +15,7 @@
#ifdef G_OS_WIN32
# define getuid() 0
+# define getpid() GetCurrentProcessId ()
#endif
void
Modified: trunk/src/orb/poa/orbit-adaptor.c
==============================================================================
--- trunk/src/orb/poa/orbit-adaptor.c (original)
+++ trunk/src/orb/poa/orbit-adaptor.c Mon May 19 21:01:57 2008
@@ -1,6 +1,8 @@
#include <config.h>
#include <string.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <orbit/orbit.h>
#include <orbit/poa/orbit-adaptor.h>
Modified: trunk/src/orb/poa/poa.c
==============================================================================
--- trunk/src/orb/poa/poa.c (original)
+++ trunk/src/orb/poa/poa.c Mon May 19 21:01:57 2008
@@ -1,6 +1,8 @@
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <stdarg.h>
#include <orbit/orbit.h>
Modified: trunk/src/orb/util/genrand.c
==============================================================================
--- trunk/src/orb/util/genrand.c (original)
+++ trunk/src/orb/util/genrand.c Mon May 19 21:01:57 2008
@@ -3,8 +3,12 @@
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#include <errno.h>
#include <glib.h>
@@ -14,6 +18,8 @@
#include "orbit-purify.h"
#ifdef G_OS_WIN32
+# define getpid() GetCurrentProcessId ()
+# define pid_t DWORD
#include <wincrypt.h>
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]