#define _WAPI_PROCESS_CURRENT (gpointer)0xFFFFFFFF
/* This marks a system process that we don't have a handle on */
+/* FIXME: Cope with PIDs > sizeof guint */
#define _WAPI_PROCESS_UNHANDLED (1 << (8*sizeof(pid_t)-1))
#define _WAPI_PROCESS_UNHANDLED_PID_MASK (-1 & ~_WAPI_PROCESS_UNHANDLED)
count = proclength / sizeof(struct kinfo_proc);
#endif
fit = len / sizeof(guint32);
- for (i = 0, j = 0; j < fit && i < count; i++) {
+ for (i = 0, j = 0; j< fit && i < count; i++) {
#if defined(__OpenBSD__)
pids [j++] = result [i].p_pid;
#else
#else
FILE *fp;
gchar *filename = NULL;
- gchar buf[256];
#endif
+ gchar buf[256];
gchar *ret = NULL;
#if defined(PLATFORM_SOLARIS)
}
g_free (filename);
#elif defined(PLATFORM_MACOSX)
-#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) && !defined(__arm__)
- /* No proc name on OSX < 10.5 nor iOS */
+#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) && !defined (__mono_ppc__) && !defined(__arm__)
+ /* No proc name on OSX < 10.5 nor ppc nor iOS */
memset (buf, '\0', sizeof(buf));
proc_name (pid, buf, sizeof(buf));
if (strlen (buf) > 0)