1 #ifndef NCBICONF_UNIVERSAL_H 2 #define NCBICONF_UNIVERSAL_H 3 4 /* $Id: ncbiconf_universal.h 554121 2017-12-28 16:18:54Z ucko $ 5 * =========================================================================== 6 * 7 * PUBLIC DOMAIN NOTICE 8 * National Center for Biotechnology Information 9 * 10 * This software/database is a "United States Government Work" under the 11 * terms of the United States Copyright Act. It was written as part of 12 * the author's official duties as a United States Government employee and 13 * thus cannot be copyrighted. This software/database is freely available 14 * to the public for use. The National Library of Medicine and the U.S. 15 * Government have not placed any restriction on its use or reproduction. 16 * 17 * Although all reasonable efforts have been taken to ensure the accuracy 18 * and reliability of the software and data, the NLM and the U.S. 19 * Government do not and cannot warrant the performance or results that 20 * may be obtained by using this software or data. The NLM and the U.S. 21 * Government disclaim all warranties, express or implied, including 22 * warranties of performance, merchantability or fitness for any particular 23 * purpose. 24 * 25 * Please cite the author in any work or product based on this material. 26 * 27 * =========================================================================== 28 * 29 * Authors: Denis Vakatov, Aaron Ucko 30 * 31 */ 32 33 /** @file ncbiconf_universal.h 34 ** Architecture-specific settings for Xcode builds 35 ** (and, historically, universal builds). 36 **/ 37 38 #ifdef NCBI_OS_DARWIN 39 # include <machine/limits.h> 40 # include <sys/cdefs.h> 41 # ifndef LONG_BIT /* <machine/limits.h>'s definition is conditional */ 42 # ifdef __LP64__ 43 # define LONG_BIT 64 44 # else 45 # define LONG_BIT 32 46 # endif 47 # endif 48 # define NCBI_PLATFORM_BITS LONG_BIT 49 # define SIZEOF_CHAR 1 50 # define SIZEOF_DOUBLE 8 51 # define SIZEOF_FLOAT 4 52 # define SIZEOF_INT 4 53 # if __DARWIN_LONG_DOUBLE_IS_DOUBLE 54 # define SIZEOF_LONG_DOUBLE 8 55 # else 56 # define SIZEOF_LONG_DOUBLE 16 57 # endif 58 # define SIZEOF_LONG_LONG 8 59 # define SIZEOF_SHORT 2 60 # define SIZEOF_WCHAR_T 4 61 /* Define these macros to literal constants rather than calculating them, 62 * to avoid redefinition warnings when using some third-party libraries. */ 63 # if LONG_BIT == 64 64 # define SIZEOF_LONG 8 65 # define SIZEOF_SIZE_T 8 66 # define SIZEOF_VOIDP 8 67 # else 68 # define HAVE_SQLROWOFFSET 1 69 # define HAVE_SQLROWSETSIZE 1 70 # define SIZEOF_LONG 4 71 # define SIZEOF_SIZE_T 4 72 # define SIZEOF_VOIDP 4 73 # endif 74 # define SIZEOF___INT64 0 /* no such type */ 75 # ifdef __BIG_ENDIAN__ 76 # define WORDS_BIGENDIAN 1 77 # endif 78 /* __CHAR_UNSIGNED__: N/A -- Darwin uses signed characters regardless 79 * of CPU type, and GCC would define the macro itself if appropriate. */ 80 #else 81 # error No universal-binary configuration settings defined for your OS. 82 #endif 83 84 #endif /* NCBICONF_UNIVERSAL_H */ 85