2019-01-21 15:00:04 +01:00
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
// GNU GPL OS/K //
|
|
|
|
// //
|
2019-02-16 23:36:33 +01:00
|
|
|
// Desc: Common C types used throughout OS/K //
|
2019-01-21 15:00:04 +01:00
|
|
|
// //
|
2019-02-16 23:36:33 +01:00
|
|
|
// //
|
|
|
|
// Copyright © 2018-2019 The OS/K Team //
|
|
|
|
// //
|
|
|
|
// This file is part of OS/K. //
|
|
|
|
// //
|
|
|
|
// OS/K is free software: you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or //
|
|
|
|
// any later version. //
|
|
|
|
// //
|
|
|
|
// OS/K is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY//without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
2019-01-21 15:00:04 +01:00
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef _KALBASE_TYPES_H
|
|
|
|
#define _KALBASE_TYPES_H
|
|
|
|
|
2019-02-16 23:36:33 +01:00
|
|
|
#ifdef __cpluplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-01-21 15:00:04 +01:00
|
|
|
//------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef __base_types_aliases
|
|
|
|
#define __base_types_aliases
|
|
|
|
typedef unsigned char uchar;
|
|
|
|
typedef signed char schar;
|
|
|
|
typedef unsigned short ushort;
|
|
|
|
typedef unsigned int uint;
|
|
|
|
typedef unsigned long ulong;
|
|
|
|
typedef signed long long llong;
|
|
|
|
typedef unsigned long long ullong;
|
|
|
|
typedef long double ldouble;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef __size_t_defined
|
|
|
|
#define __size_t_defined
|
|
|
|
typedef unsigned long size_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ssize_t_defined
|
|
|
|
#define __ssize_t_defined
|
|
|
|
typedef signed long ssize_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __wchar_t_defined
|
|
|
|
#define __wchar_t_defined
|
|
|
|
typedef signed int wchar_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __off_t_defined
|
|
|
|
#define __off_t_defined
|
|
|
|
typedef unsigned long off_t;
|
|
|
|
#endif
|
|
|
|
|
2019-03-08 09:00:55 +01:00
|
|
|
#ifndef __time_t_defined
|
|
|
|
#define __time_t_defined
|
|
|
|
typedef unsigned long time_t;
|
|
|
|
#endif
|
|
|
|
|
2019-01-21 15:00:04 +01:00
|
|
|
//------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef __ptrdiff_t_defined
|
|
|
|
#define __ptrdiff_t_defined
|
|
|
|
typedef signed long ptrdiff_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __intptr_t_defined
|
|
|
|
#define __intptr_t_defined
|
|
|
|
typedef signed long intptr_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __uintptr_t_defined
|
|
|
|
#define __uintptr_t_defined
|
|
|
|
typedef unsigned long uintptr_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __intmax_t_defined
|
|
|
|
#define __intmax_t_defined
|
|
|
|
typedef signed long intmax_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __uintmax_t_defined
|
|
|
|
#define __uintmax_t_defined
|
|
|
|
typedef unsigned long uintmax_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef __va_list_defined
|
|
|
|
#define __va_list_defined
|
|
|
|
typedef __builtin_va_list va_list;
|
|
|
|
#endif
|
|
|
|
|
2019-03-08 09:00:55 +01:00
|
|
|
#ifndef __osk_div_t_defined
|
|
|
|
#define __osk_div_t_defined
|
2019-01-21 15:00:04 +01:00
|
|
|
typedef struct { int quot, rem; } div_t;
|
|
|
|
#endif
|
|
|
|
|
2019-03-08 09:00:55 +01:00
|
|
|
#ifndef __osk_ldiv_t_defined
|
|
|
|
#define __osk_ldiv_t_defined
|
2019-01-21 15:00:04 +01:00
|
|
|
typedef struct { long quot, rem; } ldiv_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------//
|
|
|
|
|
|
|
|
#ifndef __error_t_defined
|
|
|
|
#define __error_t_defined
|
2019-03-25 17:33:51 +01:00
|
|
|
typedef uint error_t;
|
2019-01-21 15:00:04 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __port_t_defined
|
|
|
|
#define __port_t_defined
|
|
|
|
typedef ushort port_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//------------------------------------------//
|
|
|
|
|
2019-02-16 23:36:33 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-01-21 15:00:04 +01:00
|
|
|
#endif
|