This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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]

Redboot build with networking for e7t - Strange parse error fail


Hi there,

I'd had successfully built redboot for e7t without networking support
but now while I try building with networking framework package added,
I get the following error:

/opt/ecos/packages/redboot/current/src/net/enet.c: At top level:
/opt/ecos/packages/redboot/current/src/net/enet.c: 233: parse error before '{' 
token
/opt/ecos/packages/redboot/current/src/net/enet.c: 242: parse error before '{' 
token
make[1]: Leaving directory 
`/opt/ecos/redboot-build/e7t-redboot_build/redboot/current'
make[1]: *** [src/net/enet.o.d] Error 1
make: Leaving directory `/opt/ecos/redboot-build'
make: *** [build] Error 2

I checked the source code and could not find any parse errors.
Checked the CVS repository as well for this file and it looks it is the same.
I also checked the mail archives. No such error reported.
I have no idea where this parse error comes from. What is happening?

Here's the code fragment:

#ifdef __LITTLE_ENDIAN__

unsigned long
ntohl(unsigned long x)	// compiler claims there's an error on this line
{
    return (((x & 0x000000FF) << 24) |
            ((x & 0x0000FF00) <<  8) |
            ((x & 0x00FF0000) >>  8) |
            ((x & 0xFF000000) >> 24));
}

unsigned long
ntohs(unsigned short x) // compiler claims there's an error on this line
{
    return (((x & 0x00FF) << 8) |
            ((x & 0xFF00) >> 8));
}

#endif


Thank you
Bahadir

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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