mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
Define basic_types backward compatible layer
Use C99 types internally but define old types for compatibility with older API. (r1690 and earlier) TBR=braveyao@chromium.org Bug: libyuv:774 Test: try bots build on all platforms Change-Id: I06f89537da3875f74e65189897e67b69af2c2ec2 Reviewed-on: https://chromium-review.googlesource.com/882501 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
7e389884a1
commit
f1c5345046
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1690
|
Version: 1691
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,37 +11,33 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_
|
#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_
|
||||||
#define INCLUDE_LIBYUV_BASIC_TYPES_H_
|
#define INCLUDE_LIBYUV_BASIC_TYPES_H_
|
||||||
|
|
||||||
#include <stddef.h> // for NULL, size_t
|
#include <stddef.h> // For size_t and NULL
|
||||||
|
|
||||||
|
#if !defined(INT_TYPES_DEFINED) && !defined(GG_LONGLONG)
|
||||||
|
#define INT_TYPES_DEFINED
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
#include <sys/types.h> // for uintptr_t on x86
|
#include <sys/types.h> // for uintptr_t on x86
|
||||||
#else
|
|
||||||
#include <stdint.h> // for uintptr_t
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GG_LONGLONG
|
|
||||||
#ifndef INT_TYPES_DEFINED
|
|
||||||
#define INT_TYPES_DEFINED
|
|
||||||
#ifdef COMPILER_MSVC
|
|
||||||
typedef unsigned __int64 uint64_t;
|
typedef unsigned __int64 uint64_t;
|
||||||
typedef __int64 int64_t;
|
typedef __int64 int64_t;
|
||||||
#else // COMPILER_MSVC
|
|
||||||
#if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__)
|
|
||||||
typedef unsigned long uint64_t; // NOLINT
|
|
||||||
typedef long int64_t; // NOLINT
|
|
||||||
#else // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__)
|
|
||||||
typedef unsigned long long uint64_t; // NOLINT
|
|
||||||
typedef long long int64_t; // NOLINT
|
|
||||||
#endif // __LP64__
|
|
||||||
#endif // COMPILER_MSVC
|
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
typedef int int32_t;
|
typedef int int32_t;
|
||||||
typedef unsigned short uint16_t; // NOLINT
|
typedef unsigned short uint16_t;
|
||||||
typedef short int16_t; // NOLINT
|
typedef short int16_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
|
#else
|
||||||
|
#include <stdint.h> // for uintptr_t and C99 types
|
||||||
|
#endif // defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
|
typedef uint64_t uint64;
|
||||||
|
typedef int64_t int64;
|
||||||
|
typedef uint32_t uint32;
|
||||||
|
typedef int32_t int32;
|
||||||
|
typedef uint16_t uint16;
|
||||||
|
typedef int16_t int16;
|
||||||
|
typedef uint8_t uint8;
|
||||||
|
typedef int8_t int8;
|
||||||
#endif // INT_TYPES_DEFINED
|
#endif // INT_TYPES_DEFINED
|
||||||
#endif // GG_LONGLONG
|
|
||||||
|
|
||||||
#if !defined(LIBYUV_API)
|
#if !defined(LIBYUV_API)
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
@ -61,6 +57,7 @@ typedef signed char int8_t;
|
|||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
#endif // LIBYUV_API
|
#endif // LIBYUV_API
|
||||||
|
|
||||||
|
// TODO(fbarchard): Remove bool macros.
|
||||||
#define LIBYUV_BOOL int
|
#define LIBYUV_BOOL int
|
||||||
#define LIBYUV_FALSE 0
|
#define LIBYUV_FALSE 0
|
||||||
#define LIBYUV_TRUE 1
|
#define LIBYUV_TRUE 1
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 1690
|
#define LIBYUV_VERSION 1691
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user