This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: syntax error before 'cid_t'


On Wednesday January 25 2006 9:23 am, Olivier Fourdan wrote:
> > $ cat s.c
> > #include <sys/ipc.h>
> >
> > $ gcc -c s.c
> > In file included from s.c:1:
> > /usr/include/sys/ipc.h:51: error: syntax error before
> > 'cid_t' /usr/include/sys/ipc.h:56: error: syntax error
> > before '}' token
>
> Works here. gcc 3.3; HP-UX 11.11 on PA-RISC 2.0.

Yeah, it works on our earlier 11.23 releases, but not latest:

$  gcc -DXOPEN_SOURCE -c s.c
In file included from s.c:1:
/usr/include/sys/ipc.h:51: error: syntax error before 'cid_t'
/usr/include/sys/ipc.h:56: error: syntax error before '}' token

That header file has changed radically between those 11.23
releases, and cid_t is new in this release.

 $cat -n /usr/include/sys/ipc.h | head -70
     1  /* @(#) ipc.h $Date: 2004/08/05 11:40:57 $Revision: i380/5 PATCH_11.23 (PHKL_31500) */
     2  /* 
     3   * (C) Copyright 1996-2004 Hewlett-Packard Development Company, LP
     4   */
     5  
     6  /*
     7    * @(#)
     8    * Common interprocess communication (IPC) access structure definition,
     9    * used by the three IPC mechanisms: messages, semaphores and shared
    10    * memory.
    11    */
    12  
    13  #ifndef _SYS_IPC_INCLUDED
    14  #define _SYS_IPC_INCLUDED
    15  
    16  #include <sys/stdsyms.h>
    17  #include <sys/types.h>
    18  
    19  #ifdef _INCLUDE_XOPEN_SOURCE
    20  
    21    /* Needed types and structures */
    22  
    23     /* Common IPC Access Structure */
    24     struct ipc_perm {
    25  #    ifdef _CLASSIC_ID_TYPES
    26          unsigned short  filler_uid;
    27          unsigned short  uid;    /* owner's user id */
    28          unsigned short  filler_gid;
    29          unsigned short  gid;    /* owner's group id */
    30          unsigned short  filler_cuid;
    31          unsigned short  cuid;   /* creator's user id */
    32          unsigned short  filler_cgid;
    33          unsigned short  cgid;   /* creator's group id */
    34  #    else
    35          uid_t           uid;    /* owner's user id */
    36          gid_t           gid;    /* owner's group id */
    37          uid_t           cuid;   /* creator's user id */
    38          gid_t           cgid;   /* creator's group id */
    39  #    endif /* not _CLASSIC_ID_TYPES */
    40  
    41          mode_t          mode;   /* access modes */
    42          unsigned short  __seq16;/* OLD slot usage sequence number */
    43          key_t           key;    /* key */
    44  
    45          unsigned short  __ndx;  /* NOT USED; was ndx of proc who has lock */
    46          unsigned short  __wait; /* waits, wanted, lock bits; reserved for 
    47                                     specific ipc facilities */
    48  
    49          unsigned int    seq;    /* slot usage sequence number */
    50  #ifdef _INCLUDE_HPUX_SOURCE
    51          cid_t           cid;    /* Compartment ID */
    52  #else
    53          int             __cpad; /* pad for non-hp code */
    54  #endif /* _INCLUDE_HPUX_SOURCE */
    55          char            pad[12];/* room for future expansion */
    56     };
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]