Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nspr_cpucfg___ |
michael@0 | 7 | #define nspr_cpucfg___ |
michael@0 | 8 | |
michael@0 | 9 | #ifndef XP_UNIX |
michael@0 | 10 | #define XP_UNIX |
michael@0 | 11 | #endif |
michael@0 | 12 | |
michael@0 | 13 | #ifndef QNX |
michael@0 | 14 | #define QNX |
michael@0 | 15 | #endif |
michael@0 | 16 | |
michael@0 | 17 | #define IS_LITTLE_ENDIAN 1 |
michael@0 | 18 | #undef IS_BIG_ENDIAN |
michael@0 | 19 | #undef HAVE_LONG_LONG |
michael@0 | 20 | #undef HAVE_ALIGNED_DOUBLES |
michael@0 | 21 | #undef HAVE_ALIGNED_LONGLONGS |
michael@0 | 22 | |
michael@0 | 23 | #define PR_BYTES_PER_BYTE 1 |
michael@0 | 24 | #define PR_BYTES_PER_SHORT 2 |
michael@0 | 25 | #define PR_BYTES_PER_INT 4 |
michael@0 | 26 | #define PR_BYTES_PER_INT64 8 |
michael@0 | 27 | #define PR_BYTES_PER_LONG 4 |
michael@0 | 28 | #define PR_BYTES_PER_FLOAT 4 |
michael@0 | 29 | #define PR_BYTES_PER_DOUBLE 8 |
michael@0 | 30 | #define PR_BYTES_PER_WORD 4 |
michael@0 | 31 | #define PR_BYTES_PER_DWORD 8 |
michael@0 | 32 | |
michael@0 | 33 | #define PR_BITS_PER_BYTE 8 |
michael@0 | 34 | #define PR_BITS_PER_SHORT 16 |
michael@0 | 35 | #define PR_BITS_PER_INT 32 |
michael@0 | 36 | #define PR_BITS_PER_INT64 64 |
michael@0 | 37 | #define PR_BITS_PER_LONG 32 |
michael@0 | 38 | #define PR_BITS_PER_FLOAT 32 |
michael@0 | 39 | #define PR_BITS_PER_DOUBLE 64 |
michael@0 | 40 | #define PR_BITS_PER_WORD 32 |
michael@0 | 41 | |
michael@0 | 42 | #define PR_BITS_PER_BYTE_LOG2 3 |
michael@0 | 43 | #define PR_BITS_PER_SHORT_LOG2 4 |
michael@0 | 44 | #define PR_BITS_PER_INT_LOG2 5 |
michael@0 | 45 | #define PR_BITS_PER_INT64_LOG2 6 |
michael@0 | 46 | #define PR_BITS_PER_LONG_LOG2 5 |
michael@0 | 47 | #define PR_BITS_PER_FLOAT_LOG2 5 |
michael@0 | 48 | #define PR_BITS_PER_DOUBLE_LOG2 6 |
michael@0 | 49 | #define PR_BITS_PER_WORD_LOG2 5 |
michael@0 | 50 | |
michael@0 | 51 | #define PR_ALIGN_OF_SHORT 1 |
michael@0 | 52 | #define PR_ALIGN_OF_INT 1 |
michael@0 | 53 | #define PR_ALIGN_OF_LONG 1 |
michael@0 | 54 | #define PR_ALIGN_OF_INT64 1 |
michael@0 | 55 | #define PR_ALIGN_OF_FLOAT 1 |
michael@0 | 56 | #define PR_ALIGN_OF_DOUBLE 1 |
michael@0 | 57 | #define PR_ALIGN_OF_POINTER 1 |
michael@0 | 58 | #define PR_ALIGN_OF_WORD 1 |
michael@0 | 59 | |
michael@0 | 60 | #define PR_BYTES_PER_WORD_LOG2 2 |
michael@0 | 61 | #define PR_BYTES_PER_DWORD_LOG2 3 |
michael@0 | 62 | #define PR_WORDS_PER_DWORD_LOG2 1 |
michael@0 | 63 | |
michael@0 | 64 | #endif /* nspr_cpucfg___ */ |