From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9ba4,6b9b6f7cbef2069d,start X-Google-Attributes: gidf9ba4,public X-Google-Thread: 111308,6b9b6f7cbef2069d,start X-Google-Attributes: gid111308,public X-Google-Thread: f678f,6b9b6f7cbef2069d,start X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1995-03-17 03:52:01 PST Newsgroups: comp.soft-sys.dce,comp.client-server,comp.unix.osf.misc Path: bga.com!news.sprintlink.net!cs.utexas.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!scsing.switch.ch!news.dfn.de!news.belwue.de!hermes!cocoon.informatik.uni-ulm.de!beuter From: beuter@cocoon.informatik.uni-ulm.de (Thomas Beuter) Subject: PROBLEMS with DCE RPC on AIX (revised) Message-ID: <1995Mar17.105005.14110@informatik.uni-ulm.de> Keywords: DCE RPC ANSI-C AIX Sender: usenet@informatik.uni-ulm.de (Name for nntp-posting) Nntp-Posting-Host: cocoon.informatik.uni-ulm.de Organization: University of Ulm, Department of Computer Science Date: Fri, 17 Mar 95 10:50:05 GMT Xref: bga.com comp.soft-sys.dce:583 comp.client-server:6901 comp.unix.osf.misc:1628 Hello world, We want to develop distributed applications for RS 6000 machines based on DCE RPC and ANSI-C. Believing the IDL compiler description (version 01.03.00.00) the IDL compiler produces ANSI-C code (header file and stub files). But in spite of the -qlanglvl=ansi flag the xlc compiler (version 01.03.00.33) produces an error message "Function cannot be redeclared". The reason is that data types are interpreted differently. example: error_status_t rpc_call([in] long num, [out, string] char txt[20]); The IDL compiler interprets char as unsigned char (macro idl_char -> ndr_char -> unsigned char). Whereas the xlc compiler interprets it as signed char. Therefore the function's declaration in the header file (produced by idl compiler) isn`t compliant to the function`s definition. 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; but some library functions (e.g. gets) need parameter of type char. Calling such a function with a parameter defined as unsigned char or idl_char logically leads to an compiler error. Then I need explicit casting; -> circumstantially If someone knows a better solution, please contact: beuter@informatik.uni-ulm.de Thanks Thomas -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> Thomas Beuter D-89069 Universitaet Ulm e-mail: beuter@informatik.uni-ulm.de Fakultaet fuer Informatik phone: +49 731 502 4127 Datenbanken & Informationssysteme fax: +49 731 502 4134