159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat/* ***** BEGIN LICENSE BLOCK *****
259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Version: MPL 1.1/GPL 2.0/LGPL 2.1
359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * The contents of this file are subject to the Mozilla Public License Version
559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * 1.1 (the "License"); you may not use this file except in compliance with
659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * the License. You may obtain a copy of the License at
759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * http://www.mozilla.org/MPL/
859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Software distributed under the License is distributed on an "AS IS" basis,
1059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * for the specific language governing rights and limitations under the
1259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * License.
1359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
1459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * The Original Code is the Netscape security libraries.
1559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
1659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * The Initial Developer of the Original Code is
1759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Netscape Communications Corporation.
1859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Portions created by the Initial Developer are Copyright (C) 2002
1959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * the Initial Developer. All Rights Reserved.
2059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
2159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Contributor(s):
2259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
2359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * Alternatively, the contents of this file may be used under the terms of
2459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * either the GNU General Public License Version 2 or later (the "GPL"), or
2559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * in which case the provisions of the GPL or the LGPL are applicable instead
2759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * of those above. If you wish to allow use of your version of this file only
2859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * under the terms of either the GPL or the LGPL, and not to allow others to
2959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * use your version of this file under the terms of the MPL, indicate your
3059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * decision by deleting the provisions above and replace them with the notice
3159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * and other provisions required by the GPL or the LGPL. If you do not delete
3259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * the provisions above, a recipient may use your version of this file under
3359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * the terms of any one of the MPL, the GPL or the LGPL.
3459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat *
3559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * ***** END LICENSE BLOCK ***** */
3659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
3759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat/* Emulates the real prtypes.h. Defines the types and macros that sha512.cc
3859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * needs. */
3959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
4059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#ifndef CRYPTO_THIRD_PARTY_NSS_CHROMIUM_PRTYPES_H_
4159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define CRYPTO_THIRD_PARTY_NSS_CHROMIUM_PRTYPES_H_
4259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
4359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#include <limits.h>
4459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#include <stdint.h>
4559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
4659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#include "build/build_config.h"
4759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
4859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#if defined(ARCH_CPU_LITTLE_ENDIAN)
4959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define IS_LITTLE_ENDIAN 1
5059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#else
5159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define IS_BIG_ENDIAN 1
5259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#endif
5359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
5459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat/*
5559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * The C language requires that 'long' be at least 32 bits. 2147483647 is the
5659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat * largest signed 32-bit integer.
5759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat */
5859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#if LONG_MAX > 2147483647L
5959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define PR_BYTES_PER_LONG 8
6059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#else
6159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define PR_BYTES_PER_LONG 4
6259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#endif
6359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
6459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define HAVE_LONG_LONG
6559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
6659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#if defined(__linux__)
6759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define LINUX
6859c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#endif
6959c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
7059c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erattypedef uint8_t PRUint8;
7159c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erattypedef uint32_t PRUint32;
7259c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
7359c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erattypedef int PRBool;
7459c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
7559c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#define PR_MIN(x,y) ((x)<(y)?(x):(y))
7659c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat
7759c5f4b0fb104e8e4806e4934a3d5d112ad695abDaniel Erat#endif  /* CRYPTO_THIRD_PARTY_NSS_CHROMIUM_PRTYPES_H_ */
78