• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2010 Google Inc. All Rights Reserved.
2 //
3 // This code is licensed under the same terms as WebM:
4 //  Software License Agreement:  http://www.webmproject.org/license/software/
5 //  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/
6 // -----------------------------------------------------------------------------
7 //
8 //  Common types
9 //
10 // Author: Skal (pascal.massimino@gmail.com)
11 
12 #ifndef WEBP_WEBP_TYPES_H_
13 #define WEBP_WEBP_TYPES_H_
14 
15 #include <stddef.h>  // for size_t
16 
17 #ifndef _MSC_VER
18 #include <inttypes.h>
19 #ifdef __STRICT_ANSI__
20 #define WEBP_INLINE
21 #else  /* __STRICT_ANSI__ */
22 #define WEBP_INLINE inline
23 #endif
24 #else
25 typedef signed   char int8_t;
26 typedef unsigned char uint8_t;
27 typedef signed   short int16_t;
28 typedef unsigned short uint16_t;
29 typedef signed   int int32_t;
30 typedef unsigned int uint32_t;
31 typedef unsigned long long int uint64_t;
32 typedef long long int int64_t;
33 #define WEBP_INLINE __forceinline
34 #endif  /* _MSC_VER */
35 
36 #ifndef WEBP_EXTERN
37 // This explicitly marks library functions and allows for changing the
38 // signature for e.g., Windows DLL builds.
39 #define WEBP_EXTERN(type) extern type
40 #endif  /* WEBP_EXTERN */
41 
42 // Macro to check ABI compatibility (same major revision number)
43 #define WEBP_ABI_IS_INCOMPATIBLE(a, b) (((a) >> 8) != ((b) >> 8))
44 
45 #endif  /* WEBP_WEBP_TYPES_H_ */
46