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>
This commit is contained in:
parent
1980b7bb0f
commit
ad9d5265c3
1 changed files with 59 additions and 0 deletions
59
lib/libc/minimal/include/inttypes.h
Normal file
59
lib/libc/minimal/include/inttypes.h
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue