File: queue_endian.h

package info (click to toggle)
queue 1.30.1-4woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,388 kB
  • ctags: 1,630
  • sloc: ansic: 10,499; cpp: 2,771; sh: 2,640; lex: 104; makefile: 87
file content (46 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* queue_endian.h - sets up BIG/LITTLE endian defines for queue */

/* EJD 8/14/2000 */
/* Determine system endianness for sha/networking
 *
 * This header tries to pick out the little endian systems based
 * on #defines that exist.  It explicitly looks for little-endian
 * defines on various platforms, and if found, it sets the
 * LITTLE_ENDIAN_HOST variable for use in sha1.c and various
 * portions of queue that handle creation of endian-neutral
 * job files.
 *
 * If at the end of the search for little-endian defines, the
 * LITTLE_ENDIAN_HOST is not defined, we assume that the host
 * is big-endian and set the BIG_ENDIAN_HOST define instead.
 *
 * If you add checking for more platforms, please indicate the
 * platform before the check.
 */

#ifndef _QUEUE_ENDIAN_H
#define _QUEUE_ENDIAN_H

/* Linux */
#ifdef BYTE_ORDER
  #if BYTE_ORDER == __LITTLE_ENDIAN
    #define LITTLE_ENDIAN_HOST
  #endif
#endif

/* Solaris */
#ifdef _LITTLE_ENDIAN
  #define LITTLE_ENDIAN_HOST
#endif

/* ---------------------------------------------------- */
/* If no little endian defines found, assume big endian */
/* ---------------------------------------------------- */

#ifndef LITTLE_ENDIAN_HOST
  #define BIG_ENDIAN_HOST
#endif

#endif /* _QUEUE_ENDIAN_H */

/* end of queue_endian.h */