mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 558313 - Remove ipc/chromium/src/base/third_party/nspr for great justice; r=ted
This commit is contained in:
parent
5f583c504f
commit
aea359ec17
@ -30,7 +30,6 @@ endif # }
|
||||
|
||||
vpath %.cc \
|
||||
$(srcdir)/src/base \
|
||||
$(srcdir)/src/base/third_party/nspr \
|
||||
$(srcdir)/src/chrome/common \
|
||||
$(NULL)
|
||||
|
||||
@ -43,7 +42,6 @@ include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
||||
CPPSRCS += \
|
||||
prtime.cc \
|
||||
at_exit.cc \
|
||||
base_paths.cc \
|
||||
base_switches.cc \
|
||||
|
@ -1,2 +0,0 @@
|
||||
The original code is the Netscape Portable Runtime (NSPR), licensed under
|
||||
the MPL/GPL/LGPL tri-license (http://www.mozilla.org/MPL/).
|
@ -1,45 +0,0 @@
|
||||
// Copyright 2008, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
|
||||
#define BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
|
||||
|
||||
#if defined(WIN32)
|
||||
#include "base/third_party/nspr/prcpucfg_win.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include "base/third_party/nspr/prcpucfg_mac.h"
|
||||
#elif defined(__linux__) || defined(ANDROID)
|
||||
#include "base/third_party/nspr/prcpucfg_linux.h"
|
||||
#elif defined(__OpenBSD__)
|
||||
#include "base/third_party/nspr/prcpucfg_openbsd.h"
|
||||
#else
|
||||
#error Provide a prcpucfg.h appropriate for your platform
|
||||
#endif
|
||||
|
||||
#endif // BASE_THIRD_PARTY_NSPR_PRCPUCFG_H__
|
@ -1,675 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nspr_cpucfg___
|
||||
#define nspr_cpucfg___
|
||||
|
||||
#ifndef XP_UNIX
|
||||
#define XP_UNIX
|
||||
#endif
|
||||
|
||||
#ifndef LINUX
|
||||
#define LINUX
|
||||
#endif
|
||||
|
||||
#define PR_AF_INET6 10 /* same as AF_INET6 */
|
||||
|
||||
#ifdef __powerpc64__
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__alpha)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__ia64__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__x86_64__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__mc68000__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 2
|
||||
#define PR_ALIGN_OF_LONG 2
|
||||
#define PR_ALIGN_OF_INT64 2
|
||||
#define PR_ALIGN_OF_FLOAT 2
|
||||
#define PR_ALIGN_OF_DOUBLE 2
|
||||
#define PR_ALIGN_OF_POINTER 2
|
||||
#define PR_ALIGN_OF_WORD 2
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__sparc__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
#ifdef __MIPSEB__
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#elif defined(__MIPSEL__)
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#else
|
||||
#error "Unknown MIPS endianness."
|
||||
#endif
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__arm__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__hppa__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__s390x__)
|
||||
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__s390__)
|
||||
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else
|
||||
|
||||
#error "Unknown CPU architecture"
|
||||
|
||||
#endif
|
||||
|
||||
#define HAVE_LONG_LONG
|
||||
#if PR_ALIGN_OF_DOUBLE == 8
|
||||
#define HAVE_ALIGNED_DOUBLES
|
||||
#endif
|
||||
#if PR_ALIGN_OF_INT64 == 8
|
||||
#define HAVE_ALIGNED_LONGLONGS
|
||||
#endif
|
||||
|
||||
#ifndef NO_NSPR_10_SUPPORT
|
||||
|
||||
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
|
||||
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
|
||||
#define BYTES_PER_INT PR_BYTES_PER_INT
|
||||
#define BYTES_PER_INT64 PR_BYTES_PER_INT64
|
||||
#define BYTES_PER_LONG PR_BYTES_PER_LONG
|
||||
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
|
||||
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
|
||||
#define BYTES_PER_WORD PR_BYTES_PER_WORD
|
||||
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
|
||||
|
||||
#define BITS_PER_BYTE PR_BITS_PER_BYTE
|
||||
#define BITS_PER_SHORT PR_BITS_PER_SHORT
|
||||
#define BITS_PER_INT PR_BITS_PER_INT
|
||||
#define BITS_PER_INT64 PR_BITS_PER_INT64
|
||||
#define BITS_PER_LONG PR_BITS_PER_LONG
|
||||
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
|
||||
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
|
||||
#define BITS_PER_WORD PR_BITS_PER_WORD
|
||||
|
||||
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
|
||||
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
|
||||
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
|
||||
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
|
||||
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
|
||||
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
|
||||
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
|
||||
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
|
||||
|
||||
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
|
||||
#define ALIGN_OF_INT PR_ALIGN_OF_INT
|
||||
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
|
||||
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
|
||||
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
|
||||
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
|
||||
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
|
||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
||||
|
||||
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
|
||||
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
|
||||
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
|
||||
|
||||
#endif /* NO_NSPR_10_SUPPORT */
|
||||
|
||||
#endif /* nspr_cpucfg___ */
|
@ -1,113 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nspr_cpucfg___
|
||||
#define nspr_cpucfg___
|
||||
|
||||
#ifndef XP_UNIX
|
||||
#define XP_UNIX
|
||||
#endif
|
||||
|
||||
#define PR_AF_INET6 30 /* same as AF_INET6 */
|
||||
|
||||
#if defined(i386)
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#else
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#endif
|
||||
|
||||
#define HAVE_LONG_LONG
|
||||
#undef HAVE_ALIGNED_DOUBLES
|
||||
#define HAVE_ALIGNED_LONGLONGS 1
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
#define PR_BITS_PER_DWORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#ifndef NO_NSPR_10_SUPPORT
|
||||
|
||||
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
|
||||
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
|
||||
#define BYTES_PER_INT PR_BYTES_PER_INT
|
||||
#define BYTES_PER_INT64 PR_BYTES_PER_INT64
|
||||
#define BYTES_PER_LONG PR_BYTES_PER_LONG
|
||||
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
|
||||
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
|
||||
#define BYTES_PER_WORD PR_BYTES_PER_WORD
|
||||
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
|
||||
|
||||
#define BITS_PER_BYTE PR_BITS_PER_BYTE
|
||||
#define BITS_PER_SHORT PR_BITS_PER_SHORT
|
||||
#define BITS_PER_INT PR_BITS_PER_INT
|
||||
#define BITS_PER_INT64 PR_BITS_PER_INT64
|
||||
#define BITS_PER_LONG PR_BITS_PER_LONG
|
||||
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
|
||||
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
|
||||
#define BITS_PER_WORD PR_BITS_PER_WORD
|
||||
|
||||
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
|
||||
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
|
||||
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
|
||||
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
|
||||
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
|
||||
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
|
||||
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
|
||||
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
|
||||
|
||||
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
|
||||
#define ALIGN_OF_INT PR_ALIGN_OF_INT
|
||||
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
|
||||
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
|
||||
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
|
||||
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
|
||||
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
|
||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
||||
|
||||
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
|
||||
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
|
||||
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
|
||||
|
||||
#endif /* NO_NSPR_10_SUPPORT */
|
||||
|
||||
#endif /* nspr_cpucfg___ */
|
||||
|
@ -1,405 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nspr_cpucfg___
|
||||
#define nspr_cpucfg___
|
||||
|
||||
#ifndef XP_UNIX
|
||||
#define XP_UNIX
|
||||
#endif
|
||||
|
||||
#ifndef OPENBSD
|
||||
#define OPENBSD
|
||||
#endif
|
||||
|
||||
#define PR_AF_INET6 24 /* same as AF_INET6 */
|
||||
|
||||
#ifndef HAVE_LONG_LONG
|
||||
#define HAVE_LONG_LONG
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#undef HAVE_ALIGNED_DOUBLES
|
||||
#undef HAVE_ALIGNED_LONGLONGS
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#elif defined(__amd64__)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#define HAVE_ALIGNED_DOUBLES
|
||||
#define HAVE_ALIGNED_LONGLONGS
|
||||
|
||||
#elif defined(__sparc_v9__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#define HAVE_ALIGNED_DOUBLES
|
||||
#define HAVE_ALIGNED_LONGLONGS
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__sparc__) || defined(__hppa__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#define HAVE_ALIGNED_DOUBLES
|
||||
#define HAVE_ALIGNED_LONGLONGS
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#elif defined(__alpha__)
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define HAVE_ALIGNED_DOUBLES
|
||||
#define HAVE_ALIGNED_LONGLONGS
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 6
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 8
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__powerpc__) || defined(__m68k__)
|
||||
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#undef HAVE_ALIGNED_DOUBLES
|
||||
#undef HAVE_ALIGNED_LONGLONGS
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 4
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
#ifdef __MIPSEB__
|
||||
#define IS_BIG_ENDIAN 1
|
||||
#undef IS_LITTLE_ENDIAN
|
||||
#elif defined(__MIPSEL__)
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#else
|
||||
#error "Unknown MIPS endianness."
|
||||
#endif
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 8
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 64
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else
|
||||
|
||||
#error Must define constants for type sizes here.
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_NSPR_10_SUPPORT
|
||||
|
||||
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
|
||||
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
|
||||
#define BYTES_PER_INT PR_BYTES_PER_INT
|
||||
#define BYTES_PER_INT64 PR_BYTES_PER_INT64
|
||||
#define BYTES_PER_LONG PR_BYTES_PER_LONG
|
||||
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
|
||||
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
|
||||
#define BYTES_PER_WORD PR_BYTES_PER_WORD
|
||||
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
|
||||
|
||||
#define BITS_PER_BYTE PR_BITS_PER_BYTE
|
||||
#define BITS_PER_SHORT PR_BITS_PER_SHORT
|
||||
#define BITS_PER_INT PR_BITS_PER_INT
|
||||
#define BITS_PER_INT64 PR_BITS_PER_INT64
|
||||
#define BITS_PER_LONG PR_BITS_PER_LONG
|
||||
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
|
||||
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
|
||||
#define BITS_PER_WORD PR_BITS_PER_WORD
|
||||
|
||||
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
|
||||
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
|
||||
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
|
||||
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
|
||||
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
|
||||
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
|
||||
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
|
||||
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
|
||||
|
||||
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
|
||||
#define ALIGN_OF_INT PR_ALIGN_OF_INT
|
||||
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
|
||||
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
|
||||
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
|
||||
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
|
||||
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
|
||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
||||
|
||||
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
|
||||
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
|
||||
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
|
||||
|
||||
#endif /* NO_NSPR_10_SUPPORT */
|
||||
|
||||
#endif /* nspr_cpucfg___ */
|
@ -1,268 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nspr_cpucfg___
|
||||
#define nspr_cpucfg___
|
||||
|
||||
#ifndef XP_PC
|
||||
#define XP_PC
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#ifndef WIN95
|
||||
#define WIN95
|
||||
#endif
|
||||
|
||||
#define PR_AF_INET6 23 /* same as AF_INET6 */
|
||||
|
||||
#if defined(_M_IX86) || defined(_X86_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_WORD 32
|
||||
#define PR_BITS_PER_DWORD 64
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
#define PR_BITS_PER_DWORD_LOG2 6
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
#define PR_ALIGN_OF_DWORD 8
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 2
|
||||
|
||||
#elif defined(_ALPHA_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#elif defined(_AMD64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_WORD 64
|
||||
#define PR_BITS_PER_DWORD 64
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
#define PR_BITS_PER_DWORD_LOG2 6
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
#define PR_ALIGN_OF_DWORD 8
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_IA64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_64
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_WORD 8
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_WORD 64
|
||||
#define PR_BITS_PER_DWORD 64
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_WORD_LOG2 6
|
||||
#define PR_BITS_PER_DWORD_LOG2 6
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_WORD 8
|
||||
#define PR_ALIGN_OF_DWORD 8
|
||||
#define PR_ALIGN_OF_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 8
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else /* defined(_M_IX86) || defined(_X86_) */
|
||||
|
||||
#error unknown processor architecture
|
||||
|
||||
#endif /* defined(_M_IX86) || defined(_X86_) */
|
||||
|
||||
#ifndef HAVE_LONG_LONG
|
||||
#define HAVE_LONG_LONG
|
||||
#endif
|
||||
|
||||
#ifndef NO_NSPR_10_SUPPORT
|
||||
|
||||
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
|
||||
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
|
||||
#define BYTES_PER_INT PR_BYTES_PER_INT
|
||||
#define BYTES_PER_INT64 PR_BYTES_PER_INT64
|
||||
#define BYTES_PER_LONG PR_BYTES_PER_LONG
|
||||
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
|
||||
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
|
||||
#define BYTES_PER_WORD PR_BYTES_PER_WORD
|
||||
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
|
||||
|
||||
#define BITS_PER_BYTE PR_BITS_PER_BYTE
|
||||
#define BITS_PER_SHORT PR_BITS_PER_SHORT
|
||||
#define BITS_PER_INT PR_BITS_PER_INT
|
||||
#define BITS_PER_INT64 PR_BITS_PER_INT64
|
||||
#define BITS_PER_LONG PR_BITS_PER_LONG
|
||||
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
|
||||
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
|
||||
#define BITS_PER_WORD PR_BITS_PER_WORD
|
||||
|
||||
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
|
||||
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
|
||||
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
|
||||
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
|
||||
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
|
||||
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
|
||||
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
|
||||
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
|
||||
|
||||
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
|
||||
#define ALIGN_OF_INT PR_ALIGN_OF_INT
|
||||
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
|
||||
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
|
||||
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
|
||||
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
|
||||
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
|
||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
||||
|
||||
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
|
||||
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
|
||||
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
|
||||
|
||||
#endif /* NO_NSPR_10_SUPPORT */
|
||||
|
||||
#endif /* nspr_cpucfg___ */
|
1213
ipc/chromium/src/base/third_party/nspr/prtime.cc
vendored
1213
ipc/chromium/src/base/third_party/nspr/prtime.cc
vendored
File diff suppressed because it is too large
Load Diff
206
ipc/chromium/src/base/third_party/nspr/prtime.h
vendored
206
ipc/chromium/src/base/third_party/nspr/prtime.h
vendored
@ -1,206 +0,0 @@
|
||||
/* Portions are Copyright (C) 2007 Google Inc */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* prtime.h --
|
||||
*
|
||||
* NSPR date and time functions
|
||||
* CVS revision 3.10
|
||||
* This file contains definitions of NSPR's basic types required by
|
||||
* prtime.cc. These types have been copied over from the following NSPR
|
||||
* files prtime.h, prtypes.h(CVS revision 3.35), prlong.h(CVS revision 3.13)
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef BASE_PRTIME_H__
|
||||
#define BASE_PRTIME_H__
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/third_party/nspr/prtypes.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
#define LL_I2L(l, i) ((l) = (PRInt64)(i))
|
||||
#define LL_MUL(r, a, b) ((r) = (a) * (b))
|
||||
|
||||
/**********************************************************************/
|
||||
/************************* TYPES AND CONSTANTS ************************/
|
||||
/**********************************************************************/
|
||||
|
||||
#define PR_MSEC_PER_SEC 1000UL
|
||||
#define PR_USEC_PER_SEC 1000000UL
|
||||
#define PR_NSEC_PER_SEC 1000000000UL
|
||||
#define PR_USEC_PER_MSEC 1000UL
|
||||
#define PR_NSEC_PER_MSEC 1000000UL
|
||||
|
||||
/*
|
||||
* PRTime --
|
||||
*
|
||||
* NSPR represents basic time as 64-bit signed integers relative
|
||||
* to midnight (00:00:00), January 1, 1970 Greenwich Mean Time (GMT).
|
||||
* (GMT is also known as Coordinated Universal Time, UTC.)
|
||||
* The units of time are in microseconds. Negative times are allowed
|
||||
* to represent times prior to the January 1970 epoch. Such values are
|
||||
* intended to be exported to other systems or converted to human
|
||||
* readable form.
|
||||
*
|
||||
* Notes on porting: PRTime corresponds to time_t in ANSI C. NSPR 1.0
|
||||
* simply uses PRInt64.
|
||||
*/
|
||||
|
||||
typedef PRInt64 PRTime;
|
||||
|
||||
/*
|
||||
* Time zone and daylight saving time corrections applied to GMT to
|
||||
* obtain the local time of some geographic location
|
||||
*/
|
||||
|
||||
typedef struct PRTimeParameters {
|
||||
PRInt32 tp_gmt_offset; /* the offset from GMT in seconds */
|
||||
PRInt32 tp_dst_offset; /* contribution of DST in seconds */
|
||||
} PRTimeParameters;
|
||||
|
||||
/*
|
||||
* PRExplodedTime --
|
||||
*
|
||||
* Time broken down into human-readable components such as year, month,
|
||||
* day, hour, minute, second, and microsecond. Time zone and daylight
|
||||
* saving time corrections may be applied. If they are applied, the
|
||||
* offsets from the GMT must be saved in the 'tm_params' field so that
|
||||
* all the information is available to reconstruct GMT.
|
||||
*
|
||||
* Notes on porting: PRExplodedTime corrresponds to struct tm in
|
||||
* ANSI C, with the following differences:
|
||||
* - an additional field tm_usec;
|
||||
* - replacing tm_isdst by tm_params;
|
||||
* - the month field is spelled tm_month, not tm_mon;
|
||||
* - we use absolute year, AD, not the year since 1900.
|
||||
* The corresponding type in NSPR 1.0 is called PRTime. Below is
|
||||
* a table of date/time type correspondence in the three APIs:
|
||||
* API time since epoch time in components
|
||||
* ANSI C time_t struct tm
|
||||
* NSPR 1.0 PRInt64 PRTime
|
||||
* NSPR 2.0 PRTime PRExplodedTime
|
||||
*/
|
||||
|
||||
typedef struct PRExplodedTime {
|
||||
PRInt32 tm_usec; /* microseconds past tm_sec (0-99999) */
|
||||
PRInt32 tm_sec; /* seconds past tm_min (0-61, accomodating
|
||||
up to two leap seconds) */
|
||||
PRInt32 tm_min; /* minutes past tm_hour (0-59) */
|
||||
PRInt32 tm_hour; /* hours past tm_day (0-23) */
|
||||
PRInt32 tm_mday; /* days past tm_mon (1-31, note that it
|
||||
starts from 1) */
|
||||
PRInt32 tm_month; /* months past tm_year (0-11, Jan = 0) */
|
||||
PRInt16 tm_year; /* absolute year, AD (note that we do not
|
||||
count from 1900) */
|
||||
|
||||
PRInt8 tm_wday; /* calculated day of the week
|
||||
(0-6, Sun = 0) */
|
||||
PRInt16 tm_yday; /* calculated day of the year
|
||||
(0-365, Jan 1 = 0) */
|
||||
|
||||
PRTimeParameters tm_params; /* time parameters used by conversion */
|
||||
} PRExplodedTime;
|
||||
|
||||
/*
|
||||
* PRTimeParamFn --
|
||||
*
|
||||
* A function of PRTimeParamFn type returns the time zone and
|
||||
* daylight saving time corrections for some geographic location,
|
||||
* given the current time in GMT. The input argument gmt should
|
||||
* point to a PRExplodedTime that is in GMT, i.e., whose
|
||||
* tm_params contains all 0's.
|
||||
*
|
||||
* For any time zone other than GMT, the computation is intended to
|
||||
* consist of two steps:
|
||||
* - Figure out the time zone correction, tp_gmt_offset. This number
|
||||
* usually depends on the geographic location only. But it may
|
||||
* also depend on the current time. For example, all of China
|
||||
* is one time zone right now. But this situation may change
|
||||
* in the future.
|
||||
* - Figure out the daylight saving time correction, tp_dst_offset.
|
||||
* This number depends on both the geographic location and the
|
||||
* current time. Most of the DST rules are expressed in local
|
||||
* current time. If so, one should apply the time zone correction
|
||||
* to GMT before applying the DST rules.
|
||||
*/
|
||||
|
||||
typedef PRTimeParameters (PR_CALLBACK *PRTimeParamFn)(const PRExplodedTime *gmt);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
namespace nspr {
|
||||
|
||||
/**********************************************************************/
|
||||
/****************************** FUNCTIONS *****************************/
|
||||
/**********************************************************************/
|
||||
|
||||
PRTime
|
||||
PR_ImplodeTime(const PRExplodedTime *exploded);
|
||||
|
||||
/*
|
||||
* Adjust exploded time to normalize field overflows after manipulation.
|
||||
* Note that the following fields of PRExplodedTime should not be
|
||||
* manipulated:
|
||||
* - tm_month and tm_year: because the number of days in a month and
|
||||
* number of days in a year are not constant, it is ambiguous to
|
||||
* manipulate the month and year fields, although one may be tempted
|
||||
* to. For example, what does "a month from January 31st" mean?
|
||||
* - tm_wday and tm_yday: these fields are calculated by NSPR. Users
|
||||
* should treat them as "read-only".
|
||||
*/
|
||||
|
||||
void PR_NormalizeTime(PRExplodedTime *exploded, PRTimeParamFn params);
|
||||
|
||||
/**********************************************************************/
|
||||
/*********************** TIME PARAMETER FUNCTIONS *********************/
|
||||
/**********************************************************************/
|
||||
|
||||
/* Time parameters that represent Greenwich Mean Time */
|
||||
PRTimeParameters PR_GMTParameters(const PRExplodedTime *gmt);
|
||||
|
||||
/*
|
||||
* This parses a time/date string into a PRTime
|
||||
* (microseconds after "1-Jan-1970 00:00:00 GMT").
|
||||
* It returns PR_SUCCESS on success, and PR_FAILURE
|
||||
* if the time/date string can't be parsed.
|
||||
*
|
||||
* Many formats are handled, including:
|
||||
*
|
||||
* 14 Apr 89 03:20:12
|
||||
* 14 Apr 89 03:20 GMT
|
||||
* Fri, 17 Mar 89 4:01:33
|
||||
* Fri, 17 Mar 89 4:01 GMT
|
||||
* Mon Jan 16 16:12 PDT 1989
|
||||
* Mon Jan 16 16:12 +0130 1989
|
||||
* 6 May 1992 16:41-JST (Wednesday)
|
||||
* 22-AUG-1993 10:59:12.82
|
||||
* 22-AUG-1993 10:59pm
|
||||
* 22-AUG-1993 12:59am
|
||||
* 22-AUG-1993 12:59 PM
|
||||
* Friday, August 04, 1995 3:54 PM
|
||||
* 06/21/95 04:24:34 PM
|
||||
* 20/06/95 21:07
|
||||
* 95-06-08 19:32:48 EDT
|
||||
*
|
||||
* If the input string doesn't contain a description of the timezone,
|
||||
* we consult the `default_to_gmt' to decide whether the string should
|
||||
* be interpreted relative to the local time zone (PR_FALSE) or GMT (PR_TRUE).
|
||||
* The correct value for this argument depends on what standard specified
|
||||
* the time string which you are parsing.
|
||||
*/
|
||||
|
||||
PRStatus PR_ParseTimeString (
|
||||
const char *string,
|
||||
bool default_to_gmt,
|
||||
PRTime *result);
|
||||
|
||||
} // namespace nspr
|
||||
|
||||
#endif // BASE_PRTIME_H__
|
527
ipc/chromium/src/base/third_party/nspr/prtypes.h
vendored
527
ipc/chromium/src/base/third_party/nspr/prtypes.h
vendored
@ -1,527 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
** File: prtypes.h
|
||||
** Description: Definitions of NSPR's basic types
|
||||
**
|
||||
** Prototypes and macros used to make up for deficiencies that we have found
|
||||
** in ANSI environments.
|
||||
**
|
||||
** Since we do not wrap <stdlib.h> and all the other standard headers, authors
|
||||
** of portable code will not know in general that they need these definitions.
|
||||
** Instead of requiring these authors to find the dependent uses in their code
|
||||
** and take the following steps only in those C files, we take steps once here
|
||||
** for all C files.
|
||||
**/
|
||||
|
||||
#ifndef prtypes_h___
|
||||
#define prtypes_h___
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#ifdef OS_WIN
|
||||
// This files assumes windows.h has been included first since it expects _X86_
|
||||
// or _AMD64_ to be defined.
|
||||
#include <windows.h>
|
||||
#endif // OS_WIN
|
||||
|
||||
#ifdef MDCPUCFG
|
||||
#include MDCPUCFG
|
||||
#else
|
||||
#include "base/third_party/nspr/prcpucfg.h"
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_EXTERN
|
||||
** PR_IMPLEMENT
|
||||
** DESCRIPTION:
|
||||
** These are only for externally visible routines and globals. For
|
||||
** internal routines, just use "extern" for type checking and that
|
||||
** will not export internal cross-file or forward-declared symbols.
|
||||
** Define a macro for declaring procedures return types. We use this to
|
||||
** deal with windoze specific type hackery for DLL definitions. Use
|
||||
** PR_EXTERN when the prototype for the method is declared. Use
|
||||
** PR_IMPLEMENT for the implementation of the method.
|
||||
**
|
||||
** Example:
|
||||
** in dowhim.h
|
||||
** PR_EXTERN( void ) DoWhatIMean( void );
|
||||
** in dowhim.c
|
||||
** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; }
|
||||
**
|
||||
**
|
||||
***********************************************************************/
|
||||
#if defined(WIN32)
|
||||
|
||||
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
|
||||
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPORT(__type) extern __type
|
||||
#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT(__type) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
|
||||
|
||||
#define PR_CALLBACK
|
||||
#define PR_CALLBACK_DECL
|
||||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#elif defined(XP_BEOS)
|
||||
|
||||
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
|
||||
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPORT(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
|
||||
|
||||
#define PR_CALLBACK
|
||||
#define PR_CALLBACK_DECL
|
||||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#elif defined(WIN16)
|
||||
|
||||
#define PR_CALLBACK_DECL __cdecl
|
||||
|
||||
#if defined(_WINDLL)
|
||||
#define PR_EXPORT(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_IMPORT(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_EXPORT_DATA(__type) extern __type _export
|
||||
#define PR_IMPORT_DATA(__type) extern __type _export
|
||||
|
||||
#define PR_EXTERN(__type) extern __type _cdecl _export _loadds
|
||||
#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds
|
||||
#define PR_EXTERN_DATA(__type) extern __type _export
|
||||
#define PR_IMPLEMENT_DATA(__type) __type _export
|
||||
|
||||
#define PR_CALLBACK __cdecl __loadds
|
||||
#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
|
||||
|
||||
#else /* this must be .EXE */
|
||||
#define PR_EXPORT(__type) extern __type _cdecl _export
|
||||
#define PR_IMPORT(__type) extern __type _cdecl _export
|
||||
#define PR_EXPORT_DATA(__type) extern __type _export
|
||||
#define PR_IMPORT_DATA(__type) extern __type _export
|
||||
|
||||
#define PR_EXTERN(__type) extern __type _cdecl _export
|
||||
#define PR_IMPLEMENT(__type) __type _cdecl _export
|
||||
#define PR_EXTERN_DATA(__type) extern __type _export
|
||||
#define PR_IMPLEMENT_DATA(__type) __type _export
|
||||
|
||||
#define PR_CALLBACK __cdecl __loadds
|
||||
#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK
|
||||
#endif /* _WINDLL */
|
||||
|
||||
#elif defined(XP_OS2) && defined(__declspec)
|
||||
|
||||
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
|
||||
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPORT(__type) extern __declspec(dllimport) __type
|
||||
#define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
|
||||
#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
|
||||
|
||||
#define PR_CALLBACK
|
||||
#define PR_CALLBACK_DECL
|
||||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#elif defined(XP_OS2_VACPP)
|
||||
|
||||
#define PR_EXPORT(__type) extern __type
|
||||
#define PR_EXPORT_DATA(__type) extern __type
|
||||
#define PR_IMPORT(__type) extern __type
|
||||
#define PR_IMPORT_DATA(__type) extern __type
|
||||
|
||||
#define PR_EXTERN(__type) extern __type
|
||||
#define PR_IMPLEMENT(__type) __type
|
||||
#define PR_EXTERN_DATA(__type) extern __type
|
||||
#define PR_IMPLEMENT_DATA(__type) __type
|
||||
#define PR_CALLBACK _Optlink
|
||||
#define PR_CALLBACK_DECL
|
||||
#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
|
||||
|
||||
#else /* Unix */
|
||||
|
||||
/* GCC 3.3 and later support the visibility attribute. */
|
||||
#if (__GNUC__ >= 4) || \
|
||||
(__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PR_VISIBILITY_DEFAULT
|
||||
#endif
|
||||
|
||||
#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
|
||||
#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type
|
||||
#define PR_CALLBACK
|
||||
#define PR_CALLBACK_DECL
|
||||
#define PR_STATIC_CALLBACK(__x) static __x
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_NSPR_BUILD_)
|
||||
#define NSPR_API(__type) PR_EXPORT(__type)
|
||||
#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type)
|
||||
#else
|
||||
#define NSPR_API(__type) PR_IMPORT(__type)
|
||||
#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_BEGIN_MACRO
|
||||
** PR_END_MACRO
|
||||
** DESCRIPTION:
|
||||
** Macro body brackets so that macros with compound statement definitions
|
||||
** behave syntactically more like functions when called.
|
||||
***********************************************************************/
|
||||
#define PR_BEGIN_MACRO do {
|
||||
#define PR_END_MACRO } while (0)
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_BEGIN_EXTERN_C
|
||||
** PR_END_EXTERN_C
|
||||
** DESCRIPTION:
|
||||
** Macro shorthands for conditional C++ extern block delimiters.
|
||||
***********************************************************************/
|
||||
#ifdef __cplusplus
|
||||
#define PR_BEGIN_EXTERN_C extern "C" {
|
||||
#define PR_END_EXTERN_C }
|
||||
#else
|
||||
#define PR_BEGIN_EXTERN_C
|
||||
#define PR_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_BIT
|
||||
** PR_BITMASK
|
||||
** DESCRIPTION:
|
||||
** Bit masking macros. XXX n must be <= 31 to be portable
|
||||
***********************************************************************/
|
||||
#define PR_BIT(n) ((PRUint32)1 << (n))
|
||||
#define PR_BITMASK(n) (PR_BIT(n) - 1)
|
||||
|
||||
/***********************************************************************
|
||||
** MACROS: PR_ROUNDUP
|
||||
** PR_MIN
|
||||
** PR_MAX
|
||||
** PR_ABS
|
||||
** DESCRIPTION:
|
||||
** Commonly used macros for operations on compatible types.
|
||||
***********************************************************************/
|
||||
#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
|
||||
#define PR_MIN(x,y) ((x)<(y)?(x):(y))
|
||||
#define PR_MAX(x,y) ((x)>(y)?(x):(y))
|
||||
#define PR_ABS(x) ((x)<0?-(x):(x))
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUint8
|
||||
** PRInt8
|
||||
** DESCRIPTION:
|
||||
** The int8 types are known to be 8 bits each. There is no type that
|
||||
** is equivalent to a plain "char".
|
||||
************************************************************************/
|
||||
#if PR_BYTES_PER_BYTE == 1
|
||||
typedef unsigned char PRUint8;
|
||||
/*
|
||||
** Some cfront-based C++ compilers do not like 'signed char' and
|
||||
** issue the warning message:
|
||||
** warning: "signed" not implemented (ignored)
|
||||
** For these compilers, we have to define PRInt8 as plain 'char'.
|
||||
** Make sure that plain 'char' is indeed signed under these compilers.
|
||||
*/
|
||||
#if (defined(HPUX) && defined(__cplusplus) \
|
||||
&& !defined(__GNUC__) && __cplusplus < 199707L) \
|
||||
|| (defined(SCO) && defined(__cplusplus) \
|
||||
&& !defined(__GNUC__) && __cplusplus == 1L)
|
||||
typedef char PRInt8;
|
||||
#else
|
||||
typedef signed char PRInt8;
|
||||
#endif
|
||||
#else
|
||||
#error No suitable type for PRInt8/PRUint8
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* MACROS: PR_INT8_MAX
|
||||
* PR_INT8_MIN
|
||||
* PR_UINT8_MAX
|
||||
* DESCRIPTION:
|
||||
* The maximum and minimum values of a PRInt8 or PRUint8.
|
||||
************************************************************************/
|
||||
|
||||
#define PR_INT8_MAX 127
|
||||
#define PR_INT8_MIN (-128)
|
||||
#define PR_UINT8_MAX 255U
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUint16
|
||||
** PRInt16
|
||||
** DESCRIPTION:
|
||||
** The int16 types are known to be 16 bits each.
|
||||
************************************************************************/
|
||||
#if PR_BYTES_PER_SHORT == 2
|
||||
typedef unsigned short PRUint16;
|
||||
typedef short PRInt16;
|
||||
#else
|
||||
#error No suitable type for PRInt16/PRUint16
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* MACROS: PR_INT16_MAX
|
||||
* PR_INT16_MIN
|
||||
* PR_UINT16_MAX
|
||||
* DESCRIPTION:
|
||||
* The maximum and minimum values of a PRInt16 or PRUint16.
|
||||
************************************************************************/
|
||||
|
||||
#define PR_INT16_MAX 32767
|
||||
#define PR_INT16_MIN (-32768)
|
||||
#define PR_UINT16_MAX 65535U
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUint32
|
||||
** PRInt32
|
||||
** DESCRIPTION:
|
||||
** The int32 types are known to be 32 bits each.
|
||||
************************************************************************/
|
||||
#if PR_BYTES_PER_INT == 4
|
||||
typedef unsigned int PRUint32;
|
||||
typedef int PRInt32;
|
||||
#define PR_INT32(x) x
|
||||
#define PR_UINT32(x) x ## U
|
||||
#elif PR_BYTES_PER_LONG == 4
|
||||
typedef unsigned long PRUint32;
|
||||
typedef long PRInt32;
|
||||
#define PR_INT32(x) x ## L
|
||||
#define PR_UINT32(x) x ## UL
|
||||
#else
|
||||
#error No suitable type for PRInt32/PRUint32
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* MACROS: PR_INT32_MAX
|
||||
* PR_INT32_MIN
|
||||
* PR_UINT32_MAX
|
||||
* DESCRIPTION:
|
||||
* The maximum and minimum values of a PRInt32 or PRUint32.
|
||||
************************************************************************/
|
||||
|
||||
#define PR_INT32_MAX PR_INT32(2147483647)
|
||||
#define PR_INT32_MIN (-PR_INT32_MAX - 1)
|
||||
#define PR_UINT32_MAX PR_UINT32(4294967295)
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUint64
|
||||
** PRInt64
|
||||
** DESCRIPTION:
|
||||
** The int64 types are known to be 64 bits each. Care must be used when
|
||||
** declaring variables of type PRUint64 or PRInt64. Different hardware
|
||||
** architectures and even different compilers have varying support for
|
||||
** 64 bit values. The only guaranteed portability requires the use of
|
||||
** the LL_ macros (see prlong.h).
|
||||
************************************************************************/
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#if PR_BYTES_PER_LONG == 8
|
||||
typedef long PRInt64;
|
||||
typedef unsigned long PRUint64;
|
||||
#elif defined(WIN16)
|
||||
typedef __int64 PRInt64;
|
||||
typedef unsigned __int64 PRUint64;
|
||||
#elif defined(WIN32) && !defined(__GNUC__)
|
||||
typedef __int64 PRInt64;
|
||||
typedef unsigned __int64 PRUint64;
|
||||
#else
|
||||
typedef long long PRInt64;
|
||||
typedef unsigned long long PRUint64;
|
||||
#endif /* PR_BYTES_PER_LONG == 8 */
|
||||
#else /* !HAVE_LONG_LONG */
|
||||
typedef struct {
|
||||
#ifdef IS_LITTLE_ENDIAN
|
||||
PRUint32 lo, hi;
|
||||
#else
|
||||
PRUint32 hi, lo;
|
||||
#endif
|
||||
} PRInt64;
|
||||
typedef PRInt64 PRUint64;
|
||||
#endif /* !HAVE_LONG_LONG */
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUintn
|
||||
** PRIntn
|
||||
** DESCRIPTION:
|
||||
** The PRIntn types are most appropriate for automatic variables. They are
|
||||
** guaranteed to be at least 16 bits, though various architectures may
|
||||
** define them to be wider (e.g., 32 or even 64 bits). These types are
|
||||
** never valid for fields of a structure.
|
||||
************************************************************************/
|
||||
#if PR_BYTES_PER_INT >= 2
|
||||
typedef int PRIntn;
|
||||
typedef unsigned int PRUintn;
|
||||
#else
|
||||
#error 'sizeof(int)' not sufficient for platform use
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRFloat64
|
||||
** DESCRIPTION:
|
||||
** NSPR's floating point type is always 64 bits.
|
||||
************************************************************************/
|
||||
typedef double PRFloat64;
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRSize
|
||||
** DESCRIPTION:
|
||||
** A type for representing the size of objects.
|
||||
************************************************************************/
|
||||
typedef size_t PRSize;
|
||||
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PROffset32, PROffset64
|
||||
** DESCRIPTION:
|
||||
** A type for representing byte offsets from some location.
|
||||
************************************************************************/
|
||||
typedef PRInt32 PROffset32;
|
||||
typedef PRInt64 PROffset64;
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRPtrDiff
|
||||
** DESCRIPTION:
|
||||
** A type for pointer difference. Variables of this type are suitable
|
||||
** for storing a pointer or pointer subtraction.
|
||||
************************************************************************/
|
||||
typedef ptrdiff_t PRPtrdiff;
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRUptrdiff
|
||||
** DESCRIPTION:
|
||||
** A type for pointer difference. Variables of this type are suitable
|
||||
** for storing a pointer or pointer sutraction.
|
||||
************************************************************************/
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 PRUptrdiff;
|
||||
#else
|
||||
typedef unsigned long PRUptrdiff;
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRBool
|
||||
** DESCRIPTION:
|
||||
** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE
|
||||
** for clarity of target type in assignments and actual arguments. Use
|
||||
** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans
|
||||
** just as you would C int-valued conditions.
|
||||
************************************************************************/
|
||||
typedef PRIntn PRBool;
|
||||
#define PR_TRUE 1
|
||||
#define PR_FALSE 0
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: PRPackedBool
|
||||
** DESCRIPTION:
|
||||
** Use PRPackedBool within structs where bitfields are not desirable
|
||||
** but minimum and consistant overhead matters.
|
||||
************************************************************************/
|
||||
typedef PRUint8 PRPackedBool;
|
||||
|
||||
/*
|
||||
** Status code used by some routines that have a single point of failure or
|
||||
** special status return.
|
||||
*/
|
||||
typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
|
||||
|
||||
#ifndef __PRUNICHAR__
|
||||
#define __PRUNICHAR__
|
||||
#if defined(WIN32)
|
||||
typedef wchar_t PRUnichar;
|
||||
#else
|
||||
typedef PRUint16 PRUnichar;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** WARNING: The undocumented data types PRWord and PRUword are
|
||||
** only used in the garbage collection and arena code. Do not
|
||||
** use PRWord and PRUword in new code.
|
||||
**
|
||||
** A PRWord is an integer that is the same size as a void*.
|
||||
** It implements the notion of a "word" in the Java Virtual
|
||||
** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine
|
||||
** Specification, Addison-Wesley, September 1996.
|
||||
** http://java.sun.com/docs/books/vmspec/index.html.)
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
typedef __int64 PRWord;
|
||||
typedef unsigned __int64 PRUword;
|
||||
#else
|
||||
typedef long PRWord;
|
||||
typedef unsigned long PRUword;
|
||||
#endif
|
||||
|
||||
#if defined(NO_NSPR_10_SUPPORT)
|
||||
#else
|
||||
/********* ???????????????? FIX ME ??????????????????????????? *****/
|
||||
/********************** Some old definitions until pr=>ds transition is done ***/
|
||||
/********************** Also, we are still using NSPR 1.0. GC ******************/
|
||||
/*
|
||||
** Fundamental NSPR macros, used nearly everywhere.
|
||||
*/
|
||||
|
||||
#define PR_PUBLIC_API PR_IMPLEMENT
|
||||
|
||||
/*
|
||||
** Macro body brackets so that macros with compound statement definitions
|
||||
** behave syntactically more like functions when called.
|
||||
*/
|
||||
#define NSPR_BEGIN_MACRO do {
|
||||
#define NSPR_END_MACRO } while (0)
|
||||
|
||||
/*
|
||||
** Macro shorthands for conditional C++ extern block delimiters.
|
||||
*/
|
||||
#ifdef NSPR_BEGIN_EXTERN_C
|
||||
#undef NSPR_BEGIN_EXTERN_C
|
||||
#endif
|
||||
#ifdef NSPR_END_EXTERN_C
|
||||
#undef NSPR_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define NSPR_BEGIN_EXTERN_C extern "C" {
|
||||
#define NSPR_END_EXTERN_C }
|
||||
#else
|
||||
#define NSPR_BEGIN_EXTERN_C
|
||||
#define NSPR_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
/********* ????????????? End Fix me ?????????????????????????????? *****/
|
||||
#endif /* NO_NSPR_10_SUPPORT */
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#if !defined(NO_NSPR_10_SUPPORT)
|
||||
#include "base/basictypes.h"
|
||||
#endif
|
||||
|
||||
#endif /* prtypes_h___ */
|
||||
|
@ -5,12 +5,10 @@
|
||||
#include "base/time.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/sys_string_conversions.h"
|
||||
#include "base/third_party/nspr/prtime.h"
|
||||
#include "prtime.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
using namespace nspr;
|
||||
|
||||
namespace base {
|
||||
|
||||
// TimeDelta ------------------------------------------------------------------
|
||||
|
@ -35,7 +35,6 @@ LOCAL_INCLUDES += -I$(topsrcdir)/base/src
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/lib/ds
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/lib/libc/include
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/nsprpub/pr/include
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/ipc/chromium/src/base/third_party/nspr
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/ipc/chromium/src
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/nss
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/security/nss/lib/util
|
||||
@ -64,3 +63,12 @@ endif
|
||||
EXPORTS = APKOpen.h
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
prcpucfg.h: $(topsrcdir)/nsprpub/pr/include/md/_linux.cfg
|
||||
cp $< $@
|
||||
|
||||
$(OBJS): prcpucfg.h
|
||||
|
||||
GARBAGE += \
|
||||
prcpucfg.h \
|
||||
$(NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user