[PATCH] ORBit-0.5.1 on Tru64 UNIX (resend)



[I forgot to attach the patch the first time.]

Hello Elliot,

There are two issues with ORBit-0.5.1 compilation on Tru64 UNIX.

(1) GCCisms abound!  Most of this patch is to fix them.

(2) What is the story with _XOPEN_SOURCE_EXTENDED in
    src/IIOP/connection.c?  The last portion of the patch removes all
    of this hack, because it breaks compilation on Tru64.
    
    If _XOPEN_SOURCE_EXTENDED is required for a particular
    architecture, then it seems that it should be implemented more
    cleanly with an exception for that architecture.  However, there
    is no mention of it in any ChangeLog.

Thanks,
Aron

-- 
Aron Griffis            Compaq Computer Corporation, ZKO3-3/T30
Tru64 Hardware Support  110 Spit Brook Rd, Nashua, NH  03062
603/884-1276            http://bigfoot.com/~agriffis/
--- ORBit-0.5.1.old/src/orb/allocators.c	Fri Feb 18 11:18:09 2000
+++ ORBit-0.5.1/src/orb/allocators.c	Fri Mar 17 10:29:47 2000
@@ -200,7 +200,7 @@
 		    ORBit_free_via_TypeCode(mem, &subtc, free_strings);
 		    /* the end of the body (subtc) may not be the
 		     * same as the end of the union */
-		    retval = mem + sz;
+		    retval = (char *)mem + sz;
 		}
 		break;
 	case CORBA_tk_wstring:
--- ORBit-0.5.1.old/src/orb/orb.c	Mon Feb 21 13:07:41 2000
+++ ORBit-0.5.1/src/orb/orb.c	Fri Mar 17 11:12:13 2000
@@ -694,7 +694,7 @@
 
 	  if (CORBA_Object_is_nil(obj, &myev)) {
 		  g_warning("Bug in %s, created bad IOR `%s'\n",
-			    __FUNCTION__, rc);
+			    "CORBA_ORB_object_to_string", rc);
 		  CORBA_free(rc);
 		  return NULL;
 	  }
--- ORBit-0.5.1.old/src/orb/corba_any.c	Sat Nov  6 20:12:30 1999
+++ ORBit-0.5.1/src/orb/corba_any.c	Fri Mar 17 10:41:47 2000
@@ -276,18 +276,18 @@
     case CORBA_tk_long:
     case CORBA_tk_enum:
 	retval = *(CORBA_long *)*val;
-	if(update) *val += sizeof(CORBA_long);
+	if(update) (char *)*val += sizeof(CORBA_long);
 	break;
     case CORBA_tk_ushort:
     case CORBA_tk_short:
 	retval = *(CORBA_short *)*val;
-	if(update) *val += sizeof(CORBA_short);
+	if(update) (char *)*val += sizeof(CORBA_short);
 	break;
     case CORBA_tk_char:
     case CORBA_tk_boolean:
     case CORBA_tk_octet:
 	retval = *(CORBA_octet *)*val;
-	if(update) *val += sizeof(CORBA_char);
+	if(update) (char *)*val += sizeof(CORBA_char);
 	break;
     case CORBA_tk_alias:
 	return ORBit_get_union_switch(tc->subtypes[0], val, update);
--- ORBit-0.5.1.old/src/IIOP/connection.c	Fri Feb 18 11:18:00 2000
+++ ORBit-0.5.1/src/IIOP/connection.c	Fri Mar 17 10:51:42 2000
@@ -1,12 +1,5 @@
 #include "config.h"
-#ifndef _XOPEN_SOURCE_EXTENDED
-#   define _XOPEN_SOURCE_EXTENDED 1
-#   define WE_DEFINED_XOPEN_SOURCE_EXTENDED 1
-#endif
 #include "iiop-endianP.h"
-#ifdef WE_DEFINED_XOPEN_SOURCE_EXTENDED
-#   undef _XOPEN_SOURCE_EXTENDED
-#endif
 #include "IIOP.h"
 #include "IIOP-private.h"
 #include "giop-msg-buffer.h"
@@ -17,14 +10,8 @@
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#ifndef _XOPEN_SOURCE_EXTENDED
-#   define _XOPEN_SOURCE_EXTENDED 1
-#endif
 #include <arpa/inet.h>
 #include <netdb.h>
-#ifdef WE_DEFINED_XOPEN_SOURCE_EXTENDED
-#   undef _XOPEN_SOURCE_EXTENDED
-#endif
 #include <ctype.h>
 #include <string.h>
 #include <sys/time.h>


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