ORBit2 r2067 - in trunk: . src/orb src/orb/poa src/orb/util
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: ORBit2 r2067 - in trunk: . src/orb src/orb/poa src/orb/util
- Date: Sun, 25 May 2008 10:46:54 +0000 (UTC)
Author: tml
Date: Sun May 25 10:46:54 2008
New Revision: 2067
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2067&view=rev
Log:
2008-05-25 Tor Lillqvist <tml novell com>
* src/orb/poa/poa.c: Include <config.h> before checking HAVE_UNISTD_H.
* src/orb/orbit-init.c
* src/orb/poa/poa.c
* src/orb/util/genrand.c: Windows does have a getpid() in its C
library. It's just declared in <process.h> and not <unistd.h>
(which doesn't even exist with MSVC), so include <process.h> on
Windows instead of using a #define getpid() GetCurrentProcessId().
Modified:
trunk/ChangeLog
trunk/src/orb/orbit-init.c
trunk/src/orb/poa/poa.c
trunk/src/orb/util/genrand.c
Modified: trunk/src/orb/orbit-init.c
==============================================================================
--- trunk/src/orb/orbit-init.c (original)
+++ trunk/src/orb/orbit-init.c Sun May 25 10:46:54 2008
@@ -7,6 +7,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef _WIN32
+# include <process.h>
+#endif
#include <orbit/orbit.h>
#include "orbit-init.h"
@@ -15,7 +18,6 @@
#ifdef G_OS_WIN32
# define getuid() 0
-# define getpid() GetCurrentProcessId ()
#endif
void
Modified: trunk/src/orb/poa/poa.c
==============================================================================
--- trunk/src/orb/poa/poa.c (original)
+++ trunk/src/orb/poa/poa.c Sun May 25 10:46:54 2008
@@ -1,8 +1,12 @@
+#include <config.h>
#include <string.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef _WIN32
+# include <process.h>
+#endif
#include <stdarg.h>
#include <orbit/orbit.h>
@@ -17,10 +21,6 @@
#include "poa-private.h"
#include "orbit-poa.h"
-#ifdef G_OS_WIN32
-# define getpid() ((int) GetCurrentProcessId())
-#endif
-
#ifdef DEBUG_LOCKS
# define LOCK_DEBUG(a) g_printerr("%p: %6s file %s: line %d (%s)\n", \
poa, a, __FILE__, __LINE__, __PRETTY_FUNCTION__);
Modified: trunk/src/orb/util/genrand.c
==============================================================================
--- trunk/src/orb/util/genrand.c (original)
+++ trunk/src/orb/util/genrand.c Sun May 25 10:46:54 2008
@@ -6,6 +6,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef _WIN32
+# include <process.h>
+#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -18,7 +21,6 @@
#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]