Changeset 4b8ce41a01d64ef213fde735fc73e6323aa0cdee
- Timestamp:
- 05/01/08 22:08:41
(2 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1209672521 +0300
- git-parent:
[9cef959f9fba2e6ae3989d81f2ef8f2bb7878a61]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1209672521 +0300
- Message:
We need <inttypes.h>, always
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra660c4f |
r4b8ce41 |
|
| 47 | 47 | #include <string.h> |
|---|
| 48 | 48 | #include <stdio.h> |
|---|
| | 49 | #include <inttypes.h> |
|---|
| 49 | 50 | |
|---|
| 50 | 51 | #ifdef HAVE_SYS_TYPES_H |
|---|
| … | … | |
| 55 | 56 | * Basic types definitions |
|---|
| 56 | 57 | *****************************************************************************/ |
|---|
| 57 | | #if defined( HAVE_INTTYPES_H ) |
|---|
| 58 | | # include <inttypes.h> |
|---|
| 59 | | #elif defined( SYS_CYGWIN ) |
|---|
| 60 | | /* Cygwin only defines half of these... */ |
|---|
| 61 | | typedef u_int8_t uint8_t; |
|---|
| 62 | | typedef u_int16_t uint16_t; |
|---|
| 63 | | typedef u_int32_t uint32_t; |
|---|
| 64 | | typedef u_int64_t uint64_t; |
|---|
| 65 | | #else |
|---|
| 66 | | /* Fallback types (very x86-centric, sorry) */ |
|---|
| 67 | | typedef unsigned char uint8_t; |
|---|
| 68 | | typedef signed char int8_t; |
|---|
| 69 | | typedef unsigned short uint16_t; |
|---|
| 70 | | typedef signed short int16_t; |
|---|
| 71 | | typedef unsigned int uint32_t; |
|---|
| 72 | | typedef signed int int32_t; |
|---|
| 73 | | # if defined( _MSC_VER ) \ |
|---|
| 74 | | || defined( UNDER_CE ) \ |
|---|
| 75 | | || ( defined( WIN32 ) && !defined( __MINGW32__ ) ) |
|---|
| 76 | | typedef unsigned __int64 uint64_t; |
|---|
| 77 | | typedef signed __int64 int64_t; |
|---|
| 78 | | # else |
|---|
| 79 | | typedef unsigned long long uint64_t; |
|---|
| 80 | | typedef signed long long int64_t; |
|---|
| 81 | | # endif |
|---|
| 82 | | typedef uint32_t uintptr_t; |
|---|
| 83 | | typedef int32_t intptr_t; |
|---|
| 84 | | #endif |
|---|
| 85 | | |
|---|
| 86 | | /* Systems that don't have stdint.h may not define INT64_MIN and |
|---|
| 87 | | INT64_MAX */ |
|---|
| 88 | | #ifndef INT64_MIN |
|---|
| 89 | | #define INT64_MIN (-9223372036854775807LL-1) |
|---|
| 90 | | #endif |
|---|
| 91 | | #ifndef INT64_MAX |
|---|
| 92 | | #define INT64_MAX (9223372036854775807LL) |
|---|
| 93 | | #endif |
|---|
| 94 | | |
|---|
| 95 | 58 | #if defined( WIN32 ) || defined( UNDER_CE ) |
|---|
| 96 | 59 | # include <malloc.h> |
|---|