> Subject: Re: [dpdk-dev] [PATCH 2/4] eal: set byteorder in Windows to little
> endian
> 
> 01/06/2020 11:38, tal...@mellanox.com:
> > From: Tal Shnaiderman <tal...@mellanox.com>
> >
> > Set the endianness in Windows to RTE_LITTLE_ENDIAN as support for
> > Windows is limited to x86 architecture for now.
> >
> > Signed-off-by: Tal Shnaiderman <tal...@mellanox.com>
> > ---
> > --- a/lib/librte_eal/include/generic/rte_byteorder.h
> > +++ b/lib/librte_eal/include/generic/rte_byteorder.h
> >  #ifdef RTE_EXEC_ENV_FREEBSD
> >  #include <sys/endian.h>
> > -#else
> > +#elif defined RTE_EXEC_ENV_LINUX
> >  #include <endian.h>
> > +#elif defined RTE_EXEC_ENV_WINDOWS && !defined RTE_BYTE_ORDER
> 
> Why "&& !defined RTE_BYTE_ORDER" ?
> How can it be defined earlier?
> 

You're right, it's unneeded since it is defined later on.

The entire "#elif defined RTE_EXEC_ENV_WINDOWS" section could be removed 
actually, 
looks like both clang and MinGW contain the predefined __BYTE_ORDER__ macro and 
detect the right endianness on compile time.

> > +#define RTE_BYTE_ORDER RTE_LITTLE_ENDIAN
> >  #endif
> 
> 
> 

Reply via email to