[Serdev] CVS:commitlog: sip_router endianness.c endianness.h sip_router/test endian_test.c

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Jun 13 22:50:30 CEST 2008


On Jun 13, 2008 at 22:37, Martin Hoffmann <hn at nvnc.de> wrote:
> Andrei Pelinescu-Onciul wrote:
> > andrei      2008/06/13 22:09:55 CEST
> > 
> >   SER CVS Repository
> > 
> >   Added files:
> >     .                    endianness.c endianness.h 
> >     test                 endian_test.c 
> >   Log:
> >   - an attempt at portable endianness macros: __IS_LITTLE_ENDIAN,
> >    __IS_BIG_ENDIAN and runtime check/sanity functions
> 
> I seem to remember that you are not allowed to define macros starting
> with double underscores. At least in C++ they are reserved keywords.
> Haven't had a look at the C standard, though.

Well, we use plenty of them already (e.g. __CPU_x86).
> 
> In any case, Posix' conversion function like ntohl are not enough?

Not for real agressive optimizations :-)

Andrei


More information about the Serdev mailing list