Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* 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

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