ObjFW  Check-in [b0b3a22b9a]

Overview
Comment:Fix a possible warning in macros.h.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b0b3a22b9ad43c3106683dfe0a76f47b54abadcea7ab3ab0658374fea824cfbf
User & Date: js on 2011-06-25 20:47:06
Other Links: manifest | tags
Context
2011-06-26
00:30
Don't use _NSGetEnviron or environ on iOS. check-in: 932c2eb049 user: js tags: trunk
2011-06-25
20:47
Fix a possible warning in macros.h. check-in: b0b3a22b9a user: js tags: trunk
2011-06-20
19:26
Let -[writeNBytes:fromBuffer:] return void. check-in: 2a2d5c4c47 user: js tags: trunk
Changes

Modified src/macros.h from [d83f16de45] to [fb95ceb8de].

184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
	    "bswap	%%eax\n\t"
	    "bswap	%%edx\n\t"
	    "xchgl	%%eax, %%edx"
	    : "=A"(i)
	    : "0"(i)
	);
#else
	i = (uint64_t)of_bswap32_nonconst(i & 0xFFFFFFFF) << 32 |
	    of_bswap32_nonconst(i >> 32);
#endif
	return i;
}

#ifdef __GNUC__
# define of_bswap16(i) \
	(__builtin_constant_p(i) ? of_bswap16_const(i) : of_bswap16_nonconst(i))







|
|







184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
	    "bswap	%%eax\n\t"
	    "bswap	%%edx\n\t"
	    "xchgl	%%eax, %%edx"
	    : "=A"(i)
	    : "0"(i)
	);
#else
	i = (uint64_t)of_bswap32_nonconst((uint32_t)(i & 0xFFFFFFFF)) << 32 |
	    of_bswap32_nonconst((uint32_t)(i >> 32));
#endif
	return i;
}

#ifdef __GNUC__
# define of_bswap16(i) \
	(__builtin_constant_p(i) ? of_bswap16_const(i) : of_bswap16_nonconst(i))