Back to index

lightning-sunbird  0.9+nobinonly
prcpucfg.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Netscape Portable Runtime (NSPR).
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998-2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef nspr_cpucfg___
00039 #define nspr_cpucfg___
00040 
00041 #ifndef XP_MAC
00042 #define XP_MAC
00043 #endif
00044 
00045 #undef  IS_LITTLE_ENDIAN
00046 #define IS_BIG_ENDIAN 1
00047 
00048 #define       HAVE_LONG_LONG
00049 
00050 #define PR_AF_INET6 30  /* same as AF_INET6 */
00051 
00052 #define PR_BYTES_PER_BYTE   1L
00053 #define PR_BYTES_PER_SHORT  2L
00054 #define PR_BYTES_PER_INT    4L
00055 #define PR_BYTES_PER_INT64  8L
00056 #define PR_BYTES_PER_LONG   4L
00057 #define PR_BYTES_PER_FLOAT  4L
00058 #define PR_BYTES_PER_DOUBLE 8L
00059 #define PR_BYTES_PER_WORD   4L
00060 #define PR_BYTES_PER_DWORD  8L
00061 
00062 #define PR_BITS_PER_BYTE    8L
00063 #define PR_BITS_PER_SHORT   16L
00064 #define PR_BITS_PER_INT     32L
00065 #define PR_BITS_PER_INT64   64L
00066 #define PR_BITS_PER_LONG    32L
00067 #define PR_BITS_PER_FLOAT   32L
00068 #define PR_BITS_PER_DOUBLE  64L
00069 #define PR_BITS_PER_WORD    32L
00070 
00071 #define PR_BITS_PER_BYTE_LOG2   3L
00072 #define PR_BITS_PER_SHORT_LOG2  4L
00073 #define PR_BITS_PER_INT_LOG2    5L
00074 #define PR_BITS_PER_INT64_LOG2  6L
00075 #define PR_BITS_PER_LONG_LOG2   5L
00076 #define PR_BITS_PER_FLOAT_LOG2  5L
00077 #define PR_BITS_PER_DOUBLE_LOG2 6L
00078 #define PR_BITS_PER_WORD_LOG2   5L
00079 
00080 #define PR_ALIGN_OF_SHORT   2L
00081 #define PR_ALIGN_OF_INT     4L
00082 #define PR_ALIGN_OF_LONG    4L
00083 #define PR_ALIGN_OF_INT64   2L
00084 #define PR_ALIGN_OF_FLOAT   4L
00085 #define PR_ALIGN_OF_DOUBLE  4L
00086 #define PR_ALIGN_OF_POINTER 4L
00087 #define PR_ALIGN_OF_WORD    4L
00088 
00089 #define PR_BYTES_PER_WORD_LOG2   2L
00090 #define PR_BYTES_PER_DWORD_LOG2  3L
00091 #define PR_WORDS_PER_DWORD_LOG2  1L
00092 
00093 #ifndef NO_NSPR_10_SUPPORT
00094 #define BYTES_PER_BYTE             PR_BYTES_PER_BYTE
00095 #define BYTES_PER_SHORT     PR_BYTES_PER_SHORT
00096 #define BYTES_PER_INT              PR_BYTES_PER_INT
00097 #define BYTES_PER_INT64            PR_BYTES_PER_INT64
00098 #define BYTES_PER_LONG             PR_BYTES_PER_LONG
00099 #define BYTES_PER_FLOAT            PR_BYTES_PER_FLOAT
00100 #define BYTES_PER_DOUBLE    PR_BYTES_PER_DOUBLE
00101 #define BYTES_PER_WORD             PR_BYTES_PER_WORD
00102 #define BYTES_PER_DWORD            PR_BYTES_PER_DWORD
00103 
00104 #define BITS_PER_BYTE              PR_BITS_PER_BYTE
00105 #define BITS_PER_SHORT             PR_BITS_PER_SHORT
00106 #define BITS_PER_INT        PR_BITS_PER_INT
00107 #define BITS_PER_INT64             PR_BITS_PER_INT64
00108 #define BITS_PER_LONG              PR_BITS_PER_LONG
00109 #define BITS_PER_FLOAT             PR_BITS_PER_FLOAT
00110 #define BITS_PER_DOUBLE            PR_BITS_PER_DOUBLE
00111 #define BITS_PER_WORD              PR_BITS_PER_WORD
00112 
00113 #define BITS_PER_BYTE_LOG2  PR_BITS_PER_BYTE_LOG2
00114 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
00115 #define BITS_PER_INT_LOG2   PR_BITS_PER_INT_LOG2
00116 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
00117 #define BITS_PER_LONG_LOG2  PR_BITS_PER_LONG_LOG2
00118 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
00119 #define BITS_PER_DOUBLE_LOG2       PR_BITS_PER_DOUBLE_LOG2
00120 #define BITS_PER_WORD_LOG2         PR_BITS_PER_WORD_LOG2
00121 
00122 #define ALIGN_OF_SHORT             PR_ALIGN_OF_SHORT
00123 #define ALIGN_OF_INT        PR_ALIGN_OF_INT
00124 #define ALIGN_OF_LONG              PR_ALIGN_OF_LONG
00125 #define ALIGN_OF_INT64             PR_ALIGN_OF_INT64
00126 #define ALIGN_OF_FLOAT             PR_ALIGN_OF_FLOAT
00127 #define ALIGN_OF_DOUBLE            PR_ALIGN_OF_DOUBLE
00128 #define ALIGN_OF_POINTER    PR_ALIGN_OF_POINTER
00129 #define ALIGN_OF_WORD              PR_ALIGN_OF_WORD
00130 
00131 #define BYTES_PER_WORD_LOG2        PR_BYTES_PER_WORD_LOG2
00132 #define BYTES_PER_DWORD_LOG2       PR_BYTES_PER_DWORD_LOG2
00133 #define WORDS_PER_DWORD_LOG2       PR_WORDS_PER_DWORD_LOG2
00134 #endif /* NO_NSPR_10_SUPPORT */
00135 
00136 #endif /* nspr_cpucfg___ */