From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9ba4,54717784b9205253 X-Google-Attributes: gidf9ba4,public X-Google-Thread: 115614,54717784b9205253 X-Google-Attributes: gid115614,public X-Google-Thread: 111308,54717784b9205253 X-Google-Attributes: gid111308,public X-Google-Thread: f678f,54717784b9205253 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1995-03-16 21:37:14 PST Path: bga.com!news.sprintlink.net!cs.utexas.edu!swrinde!sgiblab!uhog.mit.edu!nntp.club.cc.cmu.edu!cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!andrew.cmu.edu!postman+ From: Gregory_Brail@transarc.com Newsgroups: comp.soft-sys.dce,comp.client-server,comp.unix.osf.misc,comp.unix.aix Subject: Re: PROBLEMS with DCE RPC on AIX Date: Fri, 17 Mar 1995 00:23:27 -0500 Organization: Carnegie Mellon, Pittsburgh, PA Message-ID: References: <1995Mar16.112111.26682@informatik.uni-ulm.de> NNTP-Posting-Host: po8.andrew.cmu.edu In-Reply-To: <1995Mar16.112111.26682@informatik.uni-ulm.de> Xref: bga.com comp.soft-sys.dce:582 comp.client-server:6896 comp.unix.osf.misc:1626 comp.unix.aix:26632 > 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