ObjFW  Diff

Differences From Artifact [4a09bf3501]:

To Artifact [abc861d5c4]:

  • File src/macros.h — part of check-in [8602025532] at 2013-12-05 21:26:32 on branch trunk — Check for iOS in configure instead of macros.h.

    The initial reason to do this in macros.h was that it would be
    theoretically possible to do a universal build targeting OS X and iOS,
    but in practice, they are too different as they use a different SDK,
    therefore this does not make much sense. (user: js, size: 9431) [annotate] [blame] [check-ins using]


329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
329
330
331
332
333
334
335








336
337
338
339
340
341
342







-
-
-
-
-
-
-
-







#else
# define OF_BSWAP_FLOAT_IF_BE(i) (i)
# define OF_BSWAP_DOUBLE_IF_BE(i) (i)
# define OF_BSWAP_FLOAT_IF_LE(i) OF_BSWAP_FLOAT(i)
# define OF_BSWAP_DOUBLE_IF_LE(i) OF_BSWAP_DOUBLE(i)
#endif

/*
 * We define it here and not in objfw-defs.h, as it would be theoretically
 * possible to build a universal binary for Mac OS X and iOS.
 */
#if defined(__APPLE__) && defined(__arm__)
# define OF_IOS
#endif

#define OF_ROL(value, bits)						   \
	(((value) << ((bits) % (sizeof(value) * 8))) |			   \
	((value) >> (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))))
#define OF_ROR(value, bits)						   \
	(((value) >> ((bits) % (sizeof(value) * 8))) |			   \
	((value) << (sizeof(value) * 8 - ((bits) % (sizeof(value) * 8)))))