Skip to content

Latest commit

 

History

History
52 lines (46 loc) · 1.65 KB

File metadata and controls

52 lines (46 loc) · 1.65 KB
 
Oct 16, 2018
Oct 16, 2018
1
// Copyright 2010 Google Inc. All Rights Reserved.
Jan 2, 2012
Jan 2, 2012
2
//
Oct 16, 2018
Oct 16, 2018
3
4
5
6
7
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
Jan 2, 2012
Jan 2, 2012
8
9
10
11
12
13
14
15
16
// -----------------------------------------------------------------------------
//
// Common types
//
// Author: Skal (pascal.massimino@gmail.com)
#ifndef WEBP_WEBP_TYPES_H_
#define WEBP_WEBP_TYPES_H_
Oct 16, 2018
Oct 16, 2018
17
18
#include <stddef.h> // for size_t
Jan 2, 2012
Jan 2, 2012
19
20
#ifndef _MSC_VER
#include <inttypes.h>
Oct 16, 2018
Oct 16, 2018
21
22
#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
Jan 2, 2012
Jan 2, 2012
23
#define WEBP_INLINE inline
Oct 16, 2018
Oct 16, 2018
24
25
#else
#define WEBP_INLINE
Jan 2, 2012
Jan 2, 2012
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#endif
#else
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;
typedef long long int int64_t;
#define WEBP_INLINE __forceinline
#endif /* _MSC_VER */
#ifndef WEBP_EXTERN
// This explicitly marks library functions and allows for changing the
// signature for e.g., Windows DLL builds.
Oct 16, 2018
Oct 16, 2018
42
43
44
45
46
# if defined(__GNUC__) && __GNUC__ >= 4
# define WEBP_EXTERN(type) extern __attribute__ ((visibility ("default"))) type
# else
# define WEBP_EXTERN(type) extern type
# endif /* __GNUC__ >= 4 */
Jan 2, 2012
Jan 2, 2012
47
48
#endif /* WEBP_EXTERN */
Oct 16, 2018
Oct 16, 2018
49
50
51
// Macro to check ABI compatibility (same major revision number)
#define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
Jan 2, 2012
Jan 2, 2012
52
#endif /* WEBP_WEBP_TYPES_H_ */