From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1587cdcf215b7466 X-Google-Attributes: gidfee84,public From: tquan@ibm.net (Tony Quan) Subject: Re: Pro*C and DU 4.0B incompatible due to types.h? Date: 1997/08/18 Message-ID: #1/1 X-Deja-AN: 267837691 References: <5t9mc9$aob@crc-news.doc.ca> Newsgroups: comp.unix.osf.osf1 In article <5t9mc9$aob@crc-news.doc.ca>, mike@bulwark1.ic.gc.ca (Mike Dusseault) wrote: >Anybody know what the problem is with Oracle and DEC Unix 4.0B? >It would seem that Pro*C is incompatible with the header files in >4.0B. The error I get looks like: > >Parser error at line 293, column 19, file /usr/include/sys/types.h: > long _Pfield(valid); >................................1 >(1) PCC-F-02209, Macro invocation has incorrect number of arguments > >Syntax error at line 293, column 11, file /usr/include/sys/types.h: > long _Pfield(valid); >........................1 >(1) PCC-S-02201, Encountered the symbol ")" when expecting one of >the following: ( * an identifier, > >I am fairly sure that this is Pro*C and not the header file itself >since it hits the error when running Pro*C, not cc. I've hit at >least one area where Pro*C is unable to read properly written C due >to incompatibilities with normal ANSI C... Could this be one of them? > >The header file section in question is in types.h: > >/* typedefs for POSIX 1003.1c */ >#if _POSIX_C_SOURCE >= 199506L > ># if defined (_PTHREAD_CORE_BUILD_) || defined (_CMA_CORE_BUILD_) || defined(_TIS_CORE_BUILD_) ># define _Pfield(_arg_) _arg_ ># else ># if defined (__STDC__) || defined (__cplusplus) ># define _Pfield(_arg_) __##_arg_ ># else ># define _Pfield(_arg_) __/**/_arg_ ># endif ># endif > >typedef struct __pthread_attr_t { > long _Pfield(valid); > char* _Pfield(name); > unsigned long _Pfield(arg); > unsigned long _Pfield(reserved)[19]; > } pthread_attr_t; > >I hacked it until things started compiling by removing all the >defines and only defining #define _Pfield(_arg_) _arg_. This >seems to make it work. Defining the one with __/**/_arg_ brings >on the error. > >Anybody know what the problem is exactly? > This is a known problem with versions of Pro*C up to and including the one that shipped in RDBMS 7.3.2. I believe it was fixed in 7.3.3. I'm not sure if a fix/workaround is available for older Pro*C's, to find out you probably need to contact Oracle support. The problem does have to do with the use of the empty comment /**/. Pro*C really doesn't like this, and unfortunately Digital UNIX 4.0X started using it in its system headers. --Tony tquan@ibm.net