I want use “BYTE_ORDER” macro in my Xcode project but i can’t because i don’t know in which header it’s defined.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When I look in my Xcode 4.3.X installation, I find the “
byte_order.h” file located in a few places:You’d probably want to do a “
#include <architecture/byte_order.h>” in your .c file in order to pick up the byte_order macros.For the actual “
BYTE_ORDER” define itself, well that’s defined in a few specific places but the way it’s defined seems meant for very specific purposes. For example, this define:is meant only for Kernel Extensions (drivers).
And this define:
is meant for X11 stuff (ewww).
I’d say the best thing to do is use the “
NXHostByteOrder” inline function in the “byte_order.h” file, and this will give you the byte order of the current host.