Re: Fixes for 0.5.3 on OSF1



Hello,

> I build ORBit 0.5.1 and then 0.5.3 on a DEC OSF1 V4.0[d|f] (now
> called Tru64 8-}), and I still get the same problems on which the
> compilation stops. (I use to native cc compiler).  [I've just done
> ./configure --prefix and gmake]

May I suggest the following?

    * If you are attempting to build Gnome, I don't suggest you
      continue to use the V4.0 stream of Tru64 UNIX.  I did a partial
      port, but found that the upgrade to V5.0A made the port *much*
      easer.  I am using a full port of Gnome to Tru64 UNIX V5.0A.

    * If you really want to build on V4.0[d|f], start by getting the
      latest compiler from

	http://www.tru64unix.compaq.com/dtk/index.html

    * Use the attached patches and following commands to compile:

	gzip -dc ORBit-0.5.3.tar.gz | tar xf -
	cd ORBit-0.5.3
	patch -p1 < ../ORBit-0.5.1-tru64.patch
	patch -p1 < ../ORBit-0.5.1-hpux.patch
	patch -p1 < ../ORBit-0.5.3-enum.patch
	env CFLAGS='-D__FUNCTION__=__func__ -D__PRETTY_FUNCTION__=__func__ -msg_disable foundcr,extrasemi,ptrmismatch1,trailcomma,ignoreextra' CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
	gmake
	su
	gmake install

On Tue, Sep 05, 2000 at 11:52:26AM +0200, JPR wrote:
> cc: Warning: ../src/orb/corba_typecode.h, line 62: In this declaration,
> the
> enumeration constant "CORBA_tk_recursive" is out of range INT_MIN to
> INT_MAX
> and will be truncated. (enumrange)
>         CORBA_tk_recursive=0xffffffff,
> 
> (as if enum were gint32, and not unsigned int32).
> May be a problem while speaking with ORBit on an other platform ?

It might.  The problem is that the C standard states

    "The expression the defines the value of an enumeration constant
    shall be an integral constant expression that has a value
    representable as an int."

The gcc implementation is a 32-bit unsigned integer.  Compaq C uses a
32-bit signed integer.  ORBit (and many other programs) rely on the
gcc implementation.

The last attached patch should solve the problem for Tru64 UNIX,
however it isn't portable.  I will write an autoconf test for this and
submit a proper patch later.

Elliot, will you apply the other two patches,
"ORBit-0.5.1-tru64.patch" and "ORBit-0.5.1-hpux.patch"?  If there is
any problem please let me know.  I don't understand why they haven't
been applied yet.

Aron

-- 
Aron Griffis                  
Tru64 UNIX Platform & Kernel
Compaq Computer Corporation, ZKO3-3/T30
--- 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 14:02:57 2000
@@ -1,5 +1,5 @@
 #include "config.h"
-#ifndef _XOPEN_SOURCE_EXTENDED
+#if defined (__hpux) && ! defined (_XOPEN_SOURCE_EXTENDED)
 #   define _XOPEN_SOURCE_EXTENDED 1
 #   define WE_DEFINED_XOPEN_SOURCE_EXTENDED 1
 #endif
@@ -17,7 +17,7 @@
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#ifndef _XOPEN_SOURCE_EXTENDED
+#if defined (__hpux) && ! defined (_XOPEN_SOURCE_EXTENDED)
 #   define _XOPEN_SOURCE_EXTENDED 1
 #endif
 #include <arpa/inet.h>
--- 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/corba_any.c	Sat Nov  6 20:12:30 1999
+++ ORBit-0.5.1/src/orb/corba_any.c	Mon Mar 20 16:40:23 2000
@@ -275,19 +275,28 @@
     case CORBA_tk_ulong:
     case CORBA_tk_long:
     case CORBA_tk_enum:
-	retval = *(CORBA_long *)*val;
-	if(update) *val += sizeof(CORBA_long);
+	{
+	    CORBA_long *p = *val;
+	    retval = *p++;
+	    if (update) *val = p;
+	}
 	break;
     case CORBA_tk_ushort:
     case CORBA_tk_short:
-	retval = *(CORBA_short *)*val;
-	if(update) *val += sizeof(CORBA_short);
+	{
+	    CORBA_short *p = *val;
+	    retval = *p++;
+	    if (update) *val = p;
+	}
 	break;
     case CORBA_tk_char:
     case CORBA_tk_boolean:
     case CORBA_tk_octet:
-	retval = *(CORBA_octet *)*val;
-	if(update) *val += sizeof(CORBA_char);
+	{
+	    CORBA_octet *p = *val;
+	    retval = *p++;
+	    if (update) *val = p;
+	}
 	break;
     case CORBA_tk_alias:
 	return ORBit_get_union_switch(tc->subtypes[0], val, update);
--- old/ORBit-0.5.3/src/orb/corba_typecode.h	Mon Oct 11 22:31:53 1999
+++ ORBit-0.5.3/src/orb/corba_typecode.h	Wed Sep  6 15:20:08 2000
@@ -59,7 +59,7 @@
 	CORBA_tk_wchar=26,
 	CORBA_tk_wstring=27,
 	CORBA_tk_fixed=28,
-	CORBA_tk_recursive=0xffffffff,
+	CORBA_tk_recursive=(int)0xffffffff,
 	CORBA_tk_last=29	/* hack for GIOP */
 } CORBA_TCKind;
 


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