minor hp-ux compile fixes



these changes were needed to get ORBit, oaf, and bonobo to compile on my
hp-ux box.  i looked at gnome bug 5602, and my patches to
bonobo-property-bag.c and bonobo-moniker-util.c are the same (i got the
bonobo-object-io.c one wrong).

they do not fix .sl vs. .so issues, and there's a problem with oaf not
getting -lpopt and -lintl included in some LIBS variable, but i will
look after getting some gnome 2 work done.

(these are all gnome 1 patches)

jacob
-- 
"It drains me, and it shakes me, and hurts like hell everytime I play
it, looking out at thousands of people cheering and smiling, oblivious
to the tragedy of it's meaning, like when you're going to have your
dog put down and it's wagging it's tail on the way there." - Thom Yorke
Index: bonobo/bonobo-exception.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-exception.h,v
retrieving revision 1.8
diff -u -r1.8 bonobo-exception.h
--- bonobo/bonobo-exception.h	2001/07/11 14:25:50	1.8
+++ bonobo/bonobo-exception.h	2001/09/24 16:46:47
@@ -44,6 +44,9 @@
      };	}G_STMT_END
 
 #else /* !G_DISABLE_CHECKS */
+
+#ifdef __GNUC__
+
 #define bonobo_return_if_fail(expr,opt_ev) G_STMT_START{		\
      if (!(expr)) {							\
          if (opt_ev)                                                    \
@@ -73,7 +76,40 @@
 		#expr);							\
          return val;                                                    \
      };	}G_STMT_END
-#endif
+
+#else /* !__GNUC__ */
+
+#define bonobo_return_if_fail(expr,opt_ev) G_STMT_START{		\
+     if (!(expr)) {							\
+         if (opt_ev)                                                    \
+	     CORBA_exception_set (opt_ev, CORBA_USER_EXCEPTION,         \
+				  ex_Bonobo_BadArg, NULL);              \
+	 g_log (G_LOG_DOMAIN,						\
+		G_LOG_LEVEL_CRITICAL,					\
+		"file %s: line %d: assertion `%s' failed.",	        \
+		__FILE__,						\
+		__LINE__,						\
+		#expr);							\
+         return;                                                        \
+     };	}G_STMT_END
+         
+#define bonobo_return_val_if_fail(expr,val,opt_ev) G_STMT_START{	\
+     if (!(expr)) {							\
+         if (opt_ev)                                                    \
+	     CORBA_exception_set (opt_ev, CORBA_USER_EXCEPTION,         \
+				  ex_Bonobo_BadArg, NULL);              \
+	 g_log (G_LOG_DOMAIN,						\
+		G_LOG_LEVEL_CRITICAL,					\
+		"file %s: line %d: assertion `%s' failed.",	        \
+		__FILE__,						\
+		__LINE__,						\
+		#expr);							\
+         return val;                                                    \
+     };	}G_STMT_END
+
+#endif /* __GNUC__ */
+
+#endif /* G_DISABLE_CHECKS */
 
 #define BONOBO_EX(ev)         ((ev) && (ev)->_major != CORBA_NO_EXCEPTION)
 
Index: src/orb/corba_any.c
===================================================================
RCS file: /cvs/gnome/ORBit/src/orb/corba_any.c,v
retrieving revision 1.32.4.4
diff -u -r1.32.4.4 corba_any.c
--- src/orb/corba_any.c	2001/09/11 22:25:38	1.32.4.4
+++ src/orb/corba_any.c	2001/09/24 16:32:44
@@ -190,7 +190,7 @@
 /*	    *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_UNION); */
 
 	    *val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc));
-	    max_size = ORBit_gather_alloc_info(tc) - (*val - newval);
+	    max_size = ORBit_gather_alloc_info(tc) - ((char *)*val - (char *)newval);
 
 	    newval = ((char *)*val) + max_size;
 	    ORBit_marshal_value(buf, val, utc, mi);
Index: test/everything/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit/test/everything/Attic/Makefile.am,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 Makefile.am
--- test/everything/Makefile.am	2001/01/21 00:53:55	1.1.2.2
+++ test/everything/Makefile.am	2001/09/24 16:32:44
@@ -21,11 +21,12 @@
 client_LDFLAGS=-static
 client_LDADD=${LDADDS}
 
+$(client_OBJECTS): everything.h
+
 server_SOURCES=server.c ${EVERYTHING_BUILT} everything.idl constants.h
 server_DEPENDENCES=${EVERYTHING_BUILT}
 server_LDFLAGS=-static
 server_LDADD=${LDADDS}
-
 
 ORBIT_IDL=$(top_builddir)/src/orbit-idl-compiler/orbit-idl
 
Index: liboaf/oaf-mainloop.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-mainloop.c,v
retrieving revision 1.36
diff -u -r1.36 oaf-mainloop.c
--- liboaf/oaf-mainloop.c	2001/09/04 03:46:52	1.36
+++ liboaf/oaf-mainloop.c	2001/09/24 16:39:45
@@ -173,7 +173,7 @@
 oaf_internal_activation_context_get_extended (gboolean           existing_only,
                                                CORBA_Environment *ev)
 {
-	OAFBaseService base_service = {};
+	OAFBaseService base_service = { 0 };
 
 	base_service.name = "IDL:OAF/ActivationContext:1.0";
 	base_service.session_name = oaf_session_name_get ();
@@ -186,7 +186,7 @@
 CORBA_Object
 oaf_activation_context_get (void)
 {
-	OAFBaseService base_service = {};
+	OAFBaseService base_service = { 0 };
 
 	base_service.name = "IDL:OAF/ActivationContext:1.0";
 	base_service.session_name = oaf_session_name_get ();
@@ -200,7 +200,7 @@
                           const char *hostname,
                           const char *domain)
 {
-        OAFBaseService base_service = {};
+        OAFBaseService base_service = { 0 };
 
         base_service.name = "IDL:OAF/ObjectDirectory:1.0";
         base_service.session_name = oaf_session_name_get ();
Index: oafd/oafd-corba-extensions.c
===================================================================
RCS file: /cvs/gnome/oaf/oafd/oafd-corba-extensions.c,v
retrieving revision 1.10
diff -u -r1.10 oafd-corba-extensions.c
--- oafd/oafd-corba-extensions.c	2001/09/04 03:46:53	1.10
+++ oafd/oafd-corba-extensions.c	2001/09/24 16:39:46
@@ -25,6 +25,8 @@
 /* oafd-corba-extensions.c - CORBA utility functions
  */
 
+#include <config.h>
+
 #include "oafd.h"
 #include "oaf-i18n.h"
 #include "liboaf/liboaf.h"
Index: oafd/od-load.c
===================================================================
RCS file: /cvs/gnome/oaf/oafd/od-load.c,v
retrieving revision 1.20
diff -u -r1.20 od-load.c
--- oafd/od-load.c	2001/05/15 19:53:15	1.20
+++ oafd/od-load.c	2001/09/24 16:39:46
@@ -24,6 +24,7 @@
  *
  */
 
+#include <config.h>
 #include "oafd.h"
 #include "oaf-i18n.h"
 #include <stdlib.h>


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