OpenVMS Glib diffs



These are all the changes I had to make to the Glib code, in order to
get it build/run on OpenVMS. I can explain the reason for each change if
needed.

Colin.


diff -u -r -x*.OBJ -x*.EXE [gtk.glib-1_2_7]GMAIN.C [gtk.glib]GMAIN.C
--- [gtk.glib-1_2_7]GMAIN.C	Wed Feb 16 11:00:59 2000
+++ [gtk.glib]GMAIN.C	Fri May 19 08:44:12 2000
@@ -33,6 +33,11 @@
 
 #include "config.h"
 
+#ifdef __VMS
+#  include <stdlib.h>
+#  include <starlet.h>
+#endif
+
 /* uncomment the next line to get poll() debugging info */
 /* #define G_MAIN_POLL_DEBUG */
 
@@ -188,6 +193,9 @@
 #  if defined (sun) && !defined (__SVR4)
 extern gint poll (GPollFD *ufds, guint nfsd, gint timeout);
 #  endif  /* !sun */
+#if defined(__VMS)
+#include <poll.h>
+#endif
 static GPollFunc poll_func = (GPollFunc) poll;
 #else	/* !HAVE_POLL */
 #ifdef NATIVE_WIN32
@@ -977,11 +985,16 @@
 #ifndef NATIVE_WIN32
   if (wake_up_pipe[0] < 0)
     {
+#ifdef __VMS
+      wake_up_pipe[0] = VMS_EF_GMAIN_WAKEUP;
+      wake_up_rec.fd = -wake_up_pipe[0];
+#else
       if (pipe (wake_up_pipe) < 0)
 	g_error ("Cannot create pipe main loop wake-up: %s\n",
 		 g_strerror (errno));
 
       wake_up_rec.fd = wake_up_pipe[0];
+#endif
       wake_up_rec.events = G_IO_IN;
       g_main_add_poll_unlocked (0, &wake_up_rec);
     }
@@ -1074,7 +1087,11 @@
 #ifdef G_THREADS_ENABLED
   if (!poll_waiting)
     {
-#ifndef NATIVE_WIN32
+#ifdef __VMS
+      sys$clref(wake_up_pipe[0]);
+#elif NATIVE_WIN32
+      /* Do nothing */
+#else
       gchar c;
       read (wake_up_pipe[0], &c, 1);
 #endif
@@ -1222,10 +1239,12 @@
   if (poll_waiting)
     {
       poll_waiting = FALSE;
-#ifndef NATIVE_WIN32
-      write (wake_up_pipe[1], "A", 1);
-#else
+#ifdef NATIVE_WIN32
       ReleaseSemaphore (wake_up_semaphore, 1, NULL);
+#elif __VMS
+      sys$setef(wake_up_pipe[0]);
+#else
+      write (wake_up_pipe[1], "A", 1);
 #endif
     }
 #endif





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