Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When I look in my Xcode 4.3.X installation, I find the "<code>byte_order.h</code>" file located in a few places:</p> <pre><code>[/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform]:;!fi find . -name byte_order.h -print ./Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/architecture/byte_order.h ./Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/byte_order.h ./Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/byte_order.h ./Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/byte_order.h ./Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/ppc/byte_order.h ./Developer/SDKs/MacOSX10.6.sdk/usr/include/machine/byte_order.h ./Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/architecture/byte_order.h ./Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/byte_order.h ./Developer/SDKs/MacOSX10.7.sdk/usr/include/architecture/byte_order.h ./Developer/SDKs/MacOSX10.7.sdk/usr/include/architecture/i386/byte_order.h ./Developer/SDKs/MacOSX10.7.sdk/usr/include/machine/byte_order.h </code></pre> <p>You'd probably want to do a "<code>#include &lt;architecture/byte_order.h&gt;</code>" in your .c file in order to pick up the byte_order macros.</p> <p>For the actual "<code>BYTE_ORDER</code>" 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:</p> <pre><code>#define __DARWIN_BYTE_ORDER __DARWIN_LITTLE_ENDIAN #define BYTE_ORDER __DARWIN_BYTE_ORDER ./Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/i386/endian.h </code></pre> <p>is meant only for Kernel Extensions (drivers).</p> <p>And this define:</p> <pre><code># define BYTE_ORDER LITTLE_ENDIAN # define BYTE_ORDER BIG_ENDIAN # endif /* BYTE_ORDER */ # define X_BYTE_ORDER BYTE_ORDER ./Developer/SDKs/MacOSX10.7.sdk/usr/X11/include/X11/Xarch.h </code></pre> <p>is meant for X11 stuff (ewww).</p> <p>I'd say the best thing to do is use the "<code>NXHostByteOrder</code>" inline function in the "<code>byte_order.h</code>" file, and this will give you the byte order of the current host.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload