radarlib  1.4.4
byteorder.h
Go to the documentation of this file.
1 /*
2  * Radar Library
3  *
4  * Copyright (C) 2009-2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  *
20  * Author: Guido Billi <guidobilli@gmail.com>
21  */
22 
27 #ifndef __RADAR_BYTEORDER_H__
28 #define __RADAR_BYTEORDER_H__
29 
30 /*===========================================================================*/
31 /* DETECT SYSTEM BYTE ORDER */
32 /*===========================================================================*/
33 
34 #ifndef WORDS_BIGENDIAN
35 
36  #if defined(__i386__) || defined(__ia64__) || defined(WIN32) || \
37  (defined(__alpha__) || defined(__alpha)) || \
38  defined(__arm__) || \
39  (defined(__mips__) && defined(__MIPSEL__)) || \
40  defined(__SYMBIAN32__) || \
41  defined(__x86_64__) || \
42  defined(__LITTLE_ENDIAN__)
43  /* little endian */
44  #else
45  #define WORDS_BIGENDIAN 1
46  #endif
47 
48 #endif
49 
50 /*===========================================================================*/
51 
52 #endif