1ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov/* 2ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * The copyright in this software is being made available under the 2-clauses 3ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * BSD License, included below. This software may be subject to other third 4ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * party and contributor rights, including patent rights, and no such rights 5ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * are granted under this license. 6ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * 7ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * Copyright (c) 2012, Mathieu Malaterre <mathieu.malaterre@gmail.com> 8ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * All rights reserved. 9ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * 10ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * Redistribution and use in source and binary forms, with or without 11ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * modification, are permitted provided that the following conditions 12ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * are met: 13ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * 1. Redistributions of source code must retain the above copyright 14ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * notice, this list of conditions and the following disclaimer. 15ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * 2. Redistributions in binary form must reproduce the above copyright 16ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * notice, this list of conditions and the following disclaimer in the 17ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * documentation and/or other materials provided with the distribution. 18ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * 19ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 20ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov * POSSIBILITY OF SUCH DAMAGE. 30ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov */ 31ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#ifndef OPJ_STDINT_H 32ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#define OPJ_STDINT_H 33ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov 34ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#include "opj_config.h" 35ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#ifdef OPJ_HAVE_STDINT_H 36ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#include <stdint.h> 37ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#else 38ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#if defined(_WIN32) 39ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef signed __int8 int8_t; 40ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef unsigned __int8 uint8_t; 41ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef signed __int16 int16_t; 42ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef unsigned __int16 uint16_t; 43ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef signed __int32 int32_t; 44ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef unsigned __int32 uint32_t; 45ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef signed __int64 int64_t; 46ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganovtypedef unsigned __int64 uint64_t; 47ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#else 48ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#error unsupported platform 49ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#endif 50ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#endif 51ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov 52ee451cb395940862dad63c85adfe8f2fd55e864cSvet Ganov#endif /* OPJ_STDINT_H */ 53