Building cross, gcc reports error I don't see.

Charles Krug charles@pentek.com
Tue Aug 10 09:19:00 GMT 1999


Hello List:

I'm building gcc on sparc-solaris for m68k-wrs-vxworks targets.

I get the error:

m68k-wrs-vxworks/sys-include/sys/stat.h:43 parse error before
ULONG

I don't see any error here.  Here's the section of stat.h in
question.  I've pasted the whole preamble after this in case
anyone's a glutton for punishment or if there's something in that
bit I've missed.

What incredibly obvious thing have I overlooked here?

Thanx


Charles
-------------------------------------------------------------------------

(opening bits of stat.h snipped)

struct stat
    {

->>    ULONG st_dev;  /* device ID number */ <<- Line 43

    ULONG st_ino;  /* file serial number */
    USHORT st_mode; /* file mode (see below) */
    short st_nlink; /* number of links to file */
    short st_uid;  /* user ID of file's owner */
    short st_gid;  /* group ID of file's group */
    ULONG st_rdev; /* device ID, only if special file */
    ULONG st_size; /* size of file, in bytes */
    TIME st_atime; /* time of last access */
    TIME st_mtime; /* time of last modification */
    TIME st_ctime; /* time of last change of file status */
    long st_blksize;
    long st_blocks;
    UINT8 st_attrib; /* file attribute byte (dosFs only) */
    int  reserved1; /* reserved for future use */
    int  reserved2; /* reserved for future use */
    int  reserved3; /* reserved for future use */
    int  reserved4; /* reserved for future use */
    int  reserved5; /* reserved for future use */
    int  reserved6; /* reserved for future use */
    };

Here's the whole preamble, in case I've overlooked something.
-----------------------------------------------------------------------------------

/* stat.h - POSIX definitions for obtaining file characteristics
*/

/* Copyright 1984-1995 Wind River Systems, Inc. */
/*
modification history
--------------------
01l,28mar95,kdl  removed obsolete date/time fields from stat
structure.
01k,19apr94,jmm  added support for file system stat ({f}statfs())

01j,22sep92,rrr  added support for c++
01i,18sep92,smb  added mkdir prototype
01h,26may92,rrr  the tree shuffle
01g,04oct91,rrr  passed through the ansification filter
    -fixed #else and #endif
    -changed TINY and UTINY to INT8 and UINT8
    -changed copyright notice
01f,10jun91.del  added pragma for gnu960 alignment.
01e,05oct90,dnw  added fstat() and stat() declarations.
01d,05oct90,shl  added copyright notice.
                 made #endif ANSI style.
01c,03oct90,kdl  changed comments.
01b,05may90,llk  added st_blksize and st_blocks fields so that
net directory
     can use stat structure.  Coincided with removal of
     h/net/stat.h.
01a,30apr90,kdl  written.
*/

#ifndef __INCstath
#define __INCstath

#ifdef __cplusplus
extern "C" {
#endif

#if ((CPU_FAMILY==I960) && (defined __GNUC__))
#pragma align 1   /* tell gcc960 not to optimize alignments */
#endif /* CPU_FAMILY==I960 */

#define TIME unsigned long  /* type for file time fields */


struct stat
    {
    ULONG st_dev;  /* device ID number */
    ULONG st_ino;  /* file serial number */
    USHORT st_mode; /* file mode (see below) */
    short st_nlink; /* number of links to file */
    short st_uid;  /* user ID of file's owner */
    short st_gid;  /* group ID of file's group */
    ULONG st_rdev; /* device ID, only if special file */
    ULONG st_size; /* size of file, in bytes */
    TIME st_atime; /* time of last access */
    TIME st_mtime; /* time of last modification */
    TIME st_ctime; /* time of last change of file status */
    long st_blksize;
    long st_blocks;
    UINT8 st_attrib; /* file attribute byte (dosFs only) */
    int  reserved1; /* reserved for future use */
    int  reserved2; /* reserved for future use */
    int  reserved3; /* reserved for future use */
    int  reserved4; /* reserved for future use */
    int  reserved5; /* reserved for future use */
    int  reserved6; /* reserved for future use */
    };



--
Charles Krug, Jr.
Application Engineer
Pentek Corp
1 Park Way
Upper Saddle River, NJ 07458




More information about the Gcc mailing list