Commit 10e73046ae157c97cd94a00eddcf48b97d564df1
- Diff rendering mode:
- inline
- side by side
stlport/cstdint
(46 / 0)
|   | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2009 | ||
| 3 | * Petr Ovtchenkov | ||
| 4 | * | ||
| 5 | * Licensed under the Academic Free License version 3.0 | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _STLP_CSTDINT | ||
| 10 | #define _STLP_CSTDINT | ||
| 11 | |||
| 12 | #ifndef _STLP_OUTERMOST_HEADER_ID | ||
| 13 | # define _STLP_OUTERMOST_HEADER_ID 0x119 | ||
| 14 | # include <stl/_cprolog.h> | ||
| 15 | #elif (_STLP_OUTERMOST_HEADER_ID == 0x119) && !defined(_STLP_DONT_POP_HEADER_ID) | ||
| 16 | # define _STLP_DONT_POP_HEADER_ID | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #ifdef _STLP_USE_NEW_C_HEADERS | ||
| 20 | # ifdef _STLP_HAS_INCLUDE_NEXT | ||
| 21 | # include_next <cstdint> | ||
| 22 | # else | ||
| 23 | # include _STLP_NATIVE_CPP_C_HEADER(cstdint) | ||
| 24 | # endif | ||
| 25 | #else // _STLP_USE_NEW_C_HEADERS | ||
| 26 | # include <stdint.h> | ||
| 27 | |||
| 28 | # if (_STLP_OUTERMOST_HEADER_ID == 0x119) && !defined(_STLP_INTERNAL_CSTDINT) | ||
| 29 | # include "stl/_cstdint.h" | ||
| 30 | # endif | ||
| 31 | #endif // _STLP_USE_NEW_C_HEADERS | ||
| 32 | |||
| 33 | #if (_STLP_OUTERMOST_HEADER_ID == 0x119) | ||
| 34 | # ifndef _STLP_DONT_POP_HEADER_ID | ||
| 35 | # include <stl/_epilog.h> | ||
| 36 | # undef _STLP_OUTERMOST_HEADER_ID | ||
| 37 | # else | ||
| 38 | # undef _STLP_DONT_POP_HEADER_ID | ||
| 39 | # endif | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif // _STLP_CSTDINT | ||
| 43 | |||
| 44 | // Local Variables: | ||
| 45 | // mode:C++ | ||
| 46 | // End: |
stlport/stdint.h
(18 / 0)
|   | |||
| 6 | 6 | * | |
| 7 | 7 | */ | |
| 8 | 8 | ||
| 9 | #ifndef _STLP_STDINT_H | ||
| 10 | #define _STLP_STDINT_H | ||
| 11 | |||
| 9 | 12 | #ifndef _STLP_OUTERMOST_HEADER_ID | |
| 10 | 13 | # define _STLP_OUTERMOST_HEADER_ID 0x263 | |
| 11 | 14 | # include <stl/_cprolog.h> | |
| … | … | ||
| 16 | 16 | # define _STLP_DONT_POP_HEADER_ID | |
| 17 | 17 | #endif | |
| 18 | 18 | ||
| 19 | /* For 8.22.1/1 (see C99, Notes 219, 220, 222) */ | ||
| 20 | #ifndef __STDC_LIMIT_MACROS | ||
| 21 | # define __STDC_LIMIT_MACROS | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef __STDC_CONSTANT_MACROS | ||
| 25 | # define __STDC_CONSTANT_MACROS | ||
| 26 | #endif | ||
| 27 | |||
| 19 | 28 | #ifdef _MSC_VER | |
| 20 | 29 | # include "stl/msc_stdint.h" | |
| 21 | 30 | #else /* _MSC_VER */ | |
| … | … | ||
| 35 | 35 | # endif | |
| 36 | 36 | #endif /* _MSC_VER */ | |
| 37 | 37 | ||
| 38 | #if defined(__cplusplus) && (_STLP_OUTERMOST_HEADER_ID == 0x263) && !defined(_STLP_INTERNAL_CSTDINT) | ||
| 39 | # include "stl/_cstdint.h" | ||
| 40 | #endif /* __cplusplus */ | ||
| 41 | |||
| 38 | 42 | #if (_STLP_OUTERMOST_HEADER_ID == 0x263) | |
| 39 | 43 | # ifndef _STLP_DONT_POP_HEADER_ID | |
| 40 | 44 | # include <stl/_epilog.h> | |
| … | … | ||
| 47 | 47 | # undef _STLP_DONT_POP_HEADER_ID | |
| 48 | 48 | # endif | |
| 49 | 49 | #endif | |
| 50 | |||
| 51 | #endif /* _STLP_STDINT_H */ |
stlport/stl/_cstdint.h
(56 / 0)
|   | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2009 | ||
| 3 | * Petr Ovtchenkov | ||
| 4 | * | ||
| 5 | * Licensed under the Academic Free License version 3.0 | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _STLP_INTERNAL_CSTDINT | ||
| 10 | #define _STLP_INTERNAL_CSTDINT | ||
| 11 | |||
| 12 | _STLP_BEGIN_NAMESPACE | ||
| 13 | |||
| 14 | using ::int8_t; | ||
| 15 | using ::int16_t; | ||
| 16 | using ::int32_t; | ||
| 17 | using ::int64_t; | ||
| 18 | |||
| 19 | using ::int_fast8_t; | ||
| 20 | using ::int_fast16_t; | ||
| 21 | using ::int_fast32_t; | ||
| 22 | using ::int_fast64_t; | ||
| 23 | |||
| 24 | using ::int_least8_t; | ||
| 25 | using ::int_least16_t; | ||
| 26 | using ::int_least32_t; | ||
| 27 | using ::int_least64_t; | ||
| 28 | |||
| 29 | using ::intmax_t; | ||
| 30 | using ::intptr_t; | ||
| 31 | |||
| 32 | using ::uint8_t; | ||
| 33 | using ::uint16_t; | ||
| 34 | using ::uint32_t; | ||
| 35 | using ::uint64_t; | ||
| 36 | |||
| 37 | using ::uint_fast8_t; | ||
| 38 | using ::uint_fast16_t; | ||
| 39 | using ::uint_fast32_t; | ||
| 40 | using ::uint_fast64_t; | ||
| 41 | |||
| 42 | using ::uint_least8_t; | ||
| 43 | using ::uint_least16_t; | ||
| 44 | using ::uint_least32_t; | ||
| 45 | using ::uint_least64_t; | ||
| 46 | |||
| 47 | using ::uintmax_t; | ||
| 48 | using ::uintptr_t; | ||
| 49 | |||
| 50 | _STLP_END_NAMESPACE | ||
| 51 | |||
| 52 | #endif // _STLP_INTERNAL_CSTDINT | ||
| 53 | |||
| 54 | // Local Variables: | ||
| 55 | // mode:C++ | ||
| 56 | // End: |
test/cmp_unit/Makefile.inc
(3 / 0)
|   | |||
| 25 | 25 | cstdarg_header_test.cpp \ | |
| 26 | 26 | cstddef_header_test.cpp \ | |
| 27 | 27 | cstdio_header_test.cpp \ | |
| 28 | cstdint_header_test.cpp \ | ||
| 28 | 29 | cstdlib_header_test.cpp \ | |
| 29 | 30 | cstring_header_test.cpp \ | |
| 30 | 31 | ctime_header_test.cpp \ | |
| … | … | ||
| 55 | 55 | sstream_header_test.cpp \ | |
| 56 | 56 | stack_header_test.cpp \ | |
| 57 | 57 | stdexcept_header_test.cpp \ | |
| 58 | stdint_header_test.cpp \ | ||
| 58 | 59 | stldbg_include.cpp \ | |
| 59 | 60 | streambuf_header_test.cpp \ | |
| 60 | 61 | string_header_test.cpp \ | |
| … | … | ||
| 78 | 78 | stdarg_header_test.c \ | |
| 79 | 79 | stddef_header_test.c \ | |
| 80 | 80 | stdio_header_test.c \ | |
| 81 | stdint_c_header_test.c \ | ||
| 81 | 82 | stdlib_header_test.c \ | |
| 82 | 83 | string_header_test.c \ | |
| 83 | 84 | time_header_test.c \ |
|   | |||
| 1 | /* This test purpose is simply to check Standard header independancy that | ||
| 2 | * is to say that the header can be included alone without any previous | ||
| 3 | * include. | ||
| 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be | ||
| 5 | * used to check that files included by those headers are compatible with | ||
| 6 | * pure C compilers. | ||
| 7 | */ | ||
| 8 | #include <cstdint> | ||
| 9 | |||
| 10 | static int f() | ||
| 11 | { | ||
| 12 | std::int32_t v = 1; | ||
| 13 | |||
| 14 | return static_cast<int>(v); | ||
| 15 | } |
|   | |||
| 1 | /* This test purpose is simply to check Standard header independancy that | ||
| 2 | * is to say that the header can be included alone without any previous | ||
| 3 | * include. | ||
| 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be | ||
| 5 | * used to check that files included by those headers are compatible with | ||
| 6 | * pure C compilers. | ||
| 7 | */ | ||
| 8 | #include <stdint.h> | ||
| 9 | |||
| 10 | static int f() | ||
| 11 | { | ||
| 12 | int32_t v = 1; | ||
| 13 | |||
| 14 | return (int)v; | ||
| 15 | } |
|   | |||
| 1 | /* This test purpose is simply to check Standard header independancy that | ||
| 2 | * is to say that the header can be included alone without any previous | ||
| 3 | * include. | ||
| 4 | * Additionnaly, for C Standard headers that STLport expose, it can also be | ||
| 5 | * used to check that files included by those headers are compatible with | ||
| 6 | * pure C compilers. | ||
| 7 | */ | ||
| 8 | #include <stdint.h> | ||
| 9 | |||
| 10 | static int f() | ||
| 11 | { | ||
| 12 | std::int32_t v = 1; | ||
| 13 | |||
| 14 | return static_cast<int>(v); | ||
| 15 | } |

