From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1587cdcf215b7466,start X-Google-Attributes: gidfee84,public From: mike@bulwark1.ic.gc.ca (Mike Dusseault) Subject: Pro*C and DU 4.0B incompatible due to types.h? Date: 1997/08/18 Message-ID: <5t9mc9$aob@crc-news.doc.ca>#1/1 X-Deja-AN: 265032859 Sender: root@ic.gc.ca Organization: The Communications Research Centre Newsgroups: comp.unix.osf.osf1 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? Thanks, Mike Dusseault -------------------------------------------------------------------- This mailbox is UCE filtered. Junk | "Reality is that which, when automatically sent to /dev/null. | you stop believing in it, | doesn't go away." Disclaimer: "Wasn't me, dude." | - Phillip K. Dick