mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 08:40:14 +02:00
util/nvmutil: remove stdint feature macro
and remove stdint i don't need it. i typedef these ints myself and i assert their size Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+4
-19
@@ -142,10 +142,6 @@ also consider:
|
|||||||
-Wl,-z,now
|
-Wl,-z,now
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _XOPEN_SOURCE
|
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _FILE_OFFSET_BITS
|
#ifndef _FILE_OFFSET_BITS
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
#endif
|
#endif
|
||||||
@@ -161,27 +157,16 @@ also consider:
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#if defined(__has_include)
|
|
||||||
#if __has_include(<stdint.h>)
|
|
||||||
#include <stdint.h>
|
|
||||||
#else
|
|
||||||
typedef unsigned char uint8_t;
|
|
||||||
typedef unsigned short uint16_t;
|
|
||||||
typedef unsigned int uint32_t;
|
|
||||||
#endif
|
|
||||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
||||||
#include <stdint.h>
|
|
||||||
#else
|
|
||||||
typedef unsigned char uint8_t;
|
|
||||||
typedef unsigned short uint16_t;
|
|
||||||
typedef unsigned int uint32_t;
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef unsigned int uint32_t;
|
||||||
|
|
||||||
/* type asserts */
|
/* type asserts */
|
||||||
typedef char static_assert_char_is_8_bits[(CHAR_BIT == 8) ? 1 : -1];
|
typedef char static_assert_char_is_8_bits[(CHAR_BIT == 8) ? 1 : -1];
|
||||||
typedef char static_assert_uint8_is_1[(sizeof(uint8_t) == 1) ? 1 : -1];
|
typedef char static_assert_uint8_is_1[(sizeof(uint8_t) == 1) ? 1 : -1];
|
||||||
|
|||||||
Reference in New Issue
Block a user