blob: 9b036e0cd6fa3e315f40df5201e167b9fc0a5a51 [file] [log] [blame]
Vikas Aroraa2415722012-08-09 16:18:58 -07001// Copyright 2010 Google Inc. All Rights Reserved.
Vikas Arora03d5e342011-06-02 23:59:44 +05302//
Vikas Arora0406ce12013-08-09 15:57:12 -07003// Use of this source code is governed by a BSD-style license
4// that can be found in the COPYING file in the root of the source
5// tree. An additional intellectual property rights grant can be found
6// in the file PATENTS. All contributing project authors may
7// be found in the AUTHORS file in the root of the source tree.
Vikas Arora03d5e342011-06-02 23:59:44 +05308// -----------------------------------------------------------------------------
9//
10// Common types
11//
12// Author: Skal (pascal.massimino@gmail.com)
13
14#ifndef WEBP_WEBP_TYPES_H_
15#define WEBP_WEBP_TYPES_H_
16
Vikas Aroraa2415722012-08-09 16:18:58 -070017#include <stddef.h> // for size_t
18
Vikas Arora03d5e342011-06-02 23:59:44 +053019#ifndef _MSC_VER
20#include <inttypes.h>
James Zern9e80ee92015-03-17 18:54:21 -070021#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \
22 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
Vikas Aroraa2415722012-08-09 16:18:58 -070023#define WEBP_INLINE inline
James Zern9e80ee92015-03-17 18:54:21 -070024#else
25#define WEBP_INLINE
Vikas Aroraa2415722012-08-09 16:18:58 -070026#endif
Vikas Arora03d5e342011-06-02 23:59:44 +053027#else
28typedef signed char int8_t;
29typedef unsigned char uint8_t;
30typedef signed short int16_t;
31typedef unsigned short uint16_t;
32typedef signed int int32_t;
33typedef unsigned int uint32_t;
34typedef unsigned long long int uint64_t;
35typedef long long int int64_t;
Vikas Aroraa2415722012-08-09 16:18:58 -070036#define WEBP_INLINE __forceinline
Vikas Arora03d5e342011-06-02 23:59:44 +053037#endif /* _MSC_VER */
38
Vikas Arora46672792011-07-13 16:37:55 +053039#ifndef WEBP_EXTERN
40// This explicitly marks library functions and allows for changing the
41// signature for e.g., Windows DLL builds.
42#define WEBP_EXTERN(type) extern type
43#endif /* WEBP_EXTERN */
44
Vikas Aroraa2415722012-08-09 16:18:58 -070045// Macro to check ABI compatibility (same major revision number)
46#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
47
Vikas Arora03d5e342011-06-02 23:59:44 +053048#endif /* WEBP_WEBP_TYPES_H_ */