diff options
author | Andrew Boie <andrew.p.boie@intel.com> | 2016-08-19 11:35:38 -0700 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2016-08-28 11:33:15 +0000 |
commit | ad9d5265c3f596361346a9335420c98cfc44e466 (patch) | |
tree | 8bb684f11fd61732d8c7b142b4a0f3e3dcc2f934 /lib | |
parent | 1980b7bb0ffee0750ed832fc1b474c6ae6e85b00 (diff) |
libc: minimal: add reduced inttypes.h
This implements a subset of the standard inttypes.h, based on what
other functionality exists in minimal libc.
Change-Id: Ib5685a6da13768ee46acbfca734d145f7018b9e0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/minimal/include/inttypes.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/libc/minimal/include/inttypes.h b/lib/libc/minimal/include/inttypes.h new file mode 100644 index 000000000..0267b4e0f --- /dev/null +++ b/lib/libc/minimal/include/inttypes.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2016 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef _INTTYPES_H_ +#define _INTTYPES_H_ + +#include <stdint.h> + +#define PRId8 "d" /* int8_t */ +#define PRId16 "d" /* int16_t */ +#define PRId32 "d" /* int32_t */ +#define PRId64 "lld" /* int64_t */ +#define PRIdPTR "d" /* intptr_t */ + +#define PRIi8 "i" /* int8_t */ +#define PRIi16 "i" /* int16_t */ +#define PRIi32 "i" /* int32_t */ +#define PRIi64 "lli" /* int64_t */ +#define PRIiPTR "i" /* intptr_t */ + +#define PRIo8 "o" /* int8_t */ +#define PRIo16 "o" /* int16_t */ +#define PRIo32 "o" /* int32_t */ +#define PRIo64 "llo" /* int64_t */ +#define PRIoPTR "o" /* intptr_t */ + +#define PRIu8 "u" /* uint8_t */ +#define PRIu16 "u" /* uint16_t */ +#define PRIu32 "u" /* uint32_t */ +#define PRIu64 "llu" /* uint64_t */ +#define PRIuPTR "u" /* uintptr_t */ + +#define PRIx8 "x" /* uint8_t */ +#define PRIx16 "x" /* uint16_t */ +#define PRIx32 "x" /* uint32_t */ +#define PRIx64 "llx" /* uint64_t */ +#define PRIxPTR "x" /* uintptr_t */ + +#define PRIX8 "X" /* uint8_t */ +#define PRIX16 "X" /* uint16_t */ +#define PRIX32 "X" /* uint32_t */ +#define PRIX64 "llX" /* uint64_t */ +#define PRIXPTR "X" /* uintptr_t */ + +#endif |