mirror of https://github.com/flysand7/ciabatta.git
remove types
This commit is contained in:
parent
ebcd9fe0de
commit
e4f23026f3
18
inc/limits.h
18
inc/limits.h
|
@ -68,5 +68,19 @@
|
|||
#define WINT_MAX INT_MAX
|
||||
|
||||
#define WCHAR_WIDTH USHORT_WIDTH
|
||||
#define WCHAR_MIN USHORT_WIDTH
|
||||
#define WCHAR_MAX USHORT_WIDTH
|
||||
|
||||
#if !defined(WCHAR_MIN)
|
||||
#if defined(_WIN32)
|
||||
#define WCHAR_MIN 0
|
||||
#else
|
||||
#define WCHAR_MIN INT_MIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(WCHAR_MAX)
|
||||
#if defined(_WIN32)
|
||||
#define WCHAR_MAX USHORT_MAX
|
||||
#else
|
||||
#define WCHAR_MAX INT_MAX
|
||||
#endif
|
||||
#endif
|
||||
|
|
23
inc/stddef.h
23
inc/stddef.h
|
@ -1,23 +1,19 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <types/size.h>
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
#define __alignas_is_defined 1
|
||||
#define __alignof_is_defined 1
|
||||
|
||||
#if !defined(NULL)
|
||||
#define NULL ((void *)0)
|
||||
#define offsetof(st, m) ((size_t)((char *)&((st *)0)->m - (char *)0))
|
||||
|
||||
typedef long long ptrdiff_t;
|
||||
typedef long long max_align_t;
|
||||
typedef unsigned short wchar_t; //
|
||||
#endif
|
||||
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
#define offsetof(st, m) ((size_t)((char *)&((st *)0)->m - (char *)0))
|
||||
#define alignas _Alignas
|
||||
#define alignof _Alignof
|
||||
|
||||
|
@ -26,3 +22,16 @@ typedef unsigned short wchar_t; //
|
|||
#else
|
||||
#define noreturn declspec(noreturn)
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef long long ptrdiff_t;
|
||||
typedef unsigned long long size_t;
|
||||
typedef unsigned long long max_align_t;
|
||||
typedef unsigned short wchar_t;
|
||||
#else
|
||||
typedef long ptrdiff_t;
|
||||
typedef unsigned long size_t;
|
||||
typedef unsigned long max_align_t;
|
||||
typedef int wchar_t;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#include <types/size.h>
|
||||
|
||||
#if !defined(NULL)
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
@ -19,6 +17,12 @@
|
|||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef unsigned long long size_t;
|
||||
#else
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
|
||||
typedef struct div_t {
|
||||
int quot;
|
||||
int rem;
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
typedef struct mbstate_t mbstate_t;
|
||||
struct mbstate_t {
|
||||
union {
|
||||
unsigned short leftover;
|
||||
unsigned short high_surrogate;
|
||||
};
|
||||
};
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef unsigned long long size_t;
|
||||
#else
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
|
13
inc/uchar.h
13
inc/uchar.h
|
@ -1,11 +1,20 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <types/mbstate.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if !defined(_mbstate_t_defined)
|
||||
#define _mbstate_t_defined
|
||||
typedef struct mbstate_t mbstate_t;
|
||||
struct mbstate_t {
|
||||
union {
|
||||
unsigned short leftover;
|
||||
unsigned short high_surrogate;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
|
||||
|
|
19
inc/wchar.h
19
inc/wchar.h
|
@ -1,18 +1,35 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <types/mbstate.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef unsigned short wchar_t;
|
||||
#else
|
||||
typedef int wchar_t;
|
||||
#endif
|
||||
|
||||
typedef int wint_t;
|
||||
|
||||
#if !defined(_mbstate_t_defined)
|
||||
#define _mbstate_t_defined
|
||||
typedef struct mbstate_t mbstate_t;
|
||||
struct mbstate_t {
|
||||
union {
|
||||
unsigned short leftover;
|
||||
unsigned short high_surrogate;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
// #define WCHAR_MIN 0x0000
|
||||
// #define WCHAR_MAX 0xffff
|
||||
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF -1
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue