* Pro*C and DU 4.0B incompatible due to types.h?
@ 1997-08-18 4:00 Mike Dusseault
1997-08-18 4:00 ` Tony Quan
0 siblings, 1 reply; 2+ messages in thread
From: Mike Dusseault @ 1997-08-18 4:00 UTC (permalink / raw)
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,
<mike@bulwark1.ic.gc.ca> | doesn't go away."
Disclaimer: "Wasn't me, dude." | - Phillip K. Dick
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Pro*C and DU 4.0B incompatible due to types.h?
1997-08-18 4:00 Pro*C and DU 4.0B incompatible due to types.h? Mike Dusseault
@ 1997-08-18 4:00 ` Tony Quan
0 siblings, 0 replies; 2+ messages in thread
From: Tony Quan @ 1997-08-18 4:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-08-18 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-18 4:00 Pro*C and DU 4.0B incompatible due to types.h? Mike Dusseault
1997-08-18 4:00 ` Tony Quan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox