ObjFW  Check-in [e52a53d668]

Overview
Comment:Better way to define OF_ENDIANESS_NATIVE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e52a53d668a77c667137cebff6defd6ca30981a7f5f6bbfebcb0c4e48800496c
User & Date: js on 2011-05-21 18:10:30
Other Links: manifest | tags
Context
2011-05-22
00:44
Add -[firstObject] and -[lastObject] to OFList. check-in: fe0aa66897 user: js tags: trunk
2011-05-21
18:10
Better way to define OF_ENDIANESS_NATIVE. check-in: e52a53d668 user: js tags: trunk
18:05
Make use of isalnum() safe in case isalnum() is a lookup table.
Fixes build with Clang on NetBSD.
check-in: 35fb680226 user: js tags: trunk
Changes

Modified src/macros.h from [d826a851e9] to [d5e29a8d9f].

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#if __BIG_ENDIAN__ || __LITTLE_ENDIAN__
# if __BIG_ENDIAN__ && __LITTLE_ENDIAN__
#  error __BIG_ENDIAN__ and __LITTLE_ENDIAN__ defined!
# endif
# undef OF_BIG_ENDIAN
# if __BIG_ENDIAN__
#  define OF_BIG_ENDIAN
#  define OF_ENDIANESS_NATIVE OF_ENDIANESS_BIG_ENDIAN
# else
#  define OF_ENDIANESS_NATIVE OF_ENDIANESS_LITTLE_ENDIAN
# endif
#else
# ifdef OF_BIG_ENDIAN
#  define OF_ENDIANESS_NATIVE OF_ENDIANESS_BIG_ENDIAN
# else
#  define OF_ENDIANESS_NATIVE OF_ENDIANESS_LITTLE_ENDIAN
# endif
#endif

#ifdef __GNUC__
# if defined(__amd64__) || defined(__x86_64__)
#  define OF_AMD64_ASM
# elif defined(__i386__)
#  define OF_X86_ASM







<
|
<
|
|
|
|
|
|
<







46
47
48
49
50
51
52

53

54
55
56
57
58
59

60
61
62
63
64
65
66
#if __BIG_ENDIAN__ || __LITTLE_ENDIAN__
# if __BIG_ENDIAN__ && __LITTLE_ENDIAN__
#  error __BIG_ENDIAN__ and __LITTLE_ENDIAN__ defined!
# endif
# undef OF_BIG_ENDIAN
# if __BIG_ENDIAN__
#  define OF_BIG_ENDIAN

# endif

#endif

#ifdef OF_BIG_ENDIAN
# define OF_ENDIANESS_NATIVE OF_ENDIANESS_BIG_ENDIAN
#else
# define OF_ENDIANESS_NATIVE OF_ENDIANESS_LITTLE_ENDIAN

#endif

#ifdef __GNUC__
# if defined(__amd64__) || defined(__x86_64__)
#  define OF_AMD64_ASM
# elif defined(__i386__)
#  define OF_X86_ASM