Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Gregory_Brail@transarc.com
Subject: Re: PROBLEMS with DCE RPC on AIX
Date: Fri, 17 Mar 1995 00:23:27 -0500	[thread overview]
Message-ID: <YjOFnDSSMV1bEosSgX@transarc.com> (raw)
In-Reply-To: <1995Mar16.112111.26682@informatik.uni-ulm.de>

> There are some solutions of this problem but none is really
> satisfying:
> -       flag -qlanglvl=extended; loosing the strong type checking of
>        ANSI C 
> -       using unsigned char or idl_char instead of char in the formal
>        parameter's  definition

I don't think this second solution is all that unsatisfying. Your
compiler never sees the .idl file, only the .h file. The .h file,
which specifies the prototype for the functions you're going to
implement on your server, says "idl_char". So, when you write those
functions, use "idl_char" in the declaration. Similarly, IDL defines
"long" to be 32 its and "short" to be 16 bits. Now, if your machine
defines "long" to be 64 bits, you could get in trouble. Using
"idl_long_int" could avoid this problem.

Nonetheless, it'd be nice if IDL translated "char" into "char" instead
of "unsigned char." Lots of C++ programmers (including myself) learned
of this behavior the hard way when their programs didn't link. If I
were smart, I would have used "idl_char" in my function declarations,
but instead I have used "unsigned char".

Another poster mentioned that DCE 1.1 changes this, and the new
behavior sounds like the right one. But unless all the C++ DCE
programmers are using "idl_char" in their function declarations
instead of "unsigned char", there are lots of C++ programs out there
that won't link when DCE 1.1 comes along.

				greg


  parent reply	other threads:[~1995-03-17  5:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-16 11:21 PROBLEMS with DCE RPC on AIX Thomas Beuter
1995-03-16 20:31 ` Tom Jordahl
1995-03-17  5:23 ` Gregory_Brail [this message]
1995-03-17 22:27 ` Trey Thompson
1995-03-21  2:56 ` Bill Janssen
1995-03-21 15:17   ` Rich Salz
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox