From 0437d751470fe0d32293f4e6b5391ed522cf3a9b Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 22 Sep 2012 13:55:51 +0200 Subject: [PATCH] Remove libmaxsi stddef.h and stdarg.h. These are provided by the cross compiler. --- libmaxsi/decl/NULL.h | 3 ++- libmaxsi/decl/ptrdiff_t.h | 9 ++----- libmaxsi/decl/size_t.h | 12 ++------- libmaxsi/decl/wchar_t.h | 11 ++------ libmaxsi/include/stdarg.h | 39 ---------------------------- libmaxsi/include/stddef.h | 44 -------------------------------- sortix/include/sortix/x64/bits.h | 2 +- sortix/include/sortix/x86/bits.h | 2 +- 8 files changed, 10 insertions(+), 112 deletions(-) delete mode 100644 libmaxsi/include/stdarg.h delete mode 100644 libmaxsi/include/stddef.h diff --git a/libmaxsi/decl/NULL.h b/libmaxsi/decl/NULL.h index fa951f3d..f54c92c3 100644 --- a/libmaxsi/decl/NULL.h +++ b/libmaxsi/decl/NULL.h @@ -1,3 +1,4 @@ #ifndef NULL -#define NULL __NULL +#define __need_NULL +#include #endif diff --git a/libmaxsi/decl/ptrdiff_t.h b/libmaxsi/decl/ptrdiff_t.h index 0be69c72..acb0ab81 100644 --- a/libmaxsi/decl/ptrdiff_t.h +++ b/libmaxsi/decl/ptrdiff_t.h @@ -1,7 +1,2 @@ -#ifndef _PTRDIFF_T_DECL -#define _PTRDIFF_T_DECL -#if !defined(_GCC_PTRDIFF_T) -#define _GCC_PTRDIFF_T -typedef __ptrdiff_t ptrdiff_t; -#endif -#endif +#define __need_ptrdiff_t +#include diff --git a/libmaxsi/decl/size_t.h b/libmaxsi/decl/size_t.h index 9a6246af..318dbd40 100644 --- a/libmaxsi/decl/size_t.h +++ b/libmaxsi/decl/size_t.h @@ -1,10 +1,2 @@ -#ifndef _SIZE_T_DECL -#ifndef _SIZE_T_DECLARED /* Compabillity with gcc */ -#define _SIZE_T_DECL -#define _SIZE_T_DECLARED -#if !defined(_GCC_SIZE_T) -#define _GCC_SIZE_T -typedef __size_t size_t; -#endif -#endif -#endif +#define __need_size_t +#include diff --git a/libmaxsi/decl/wchar_t.h b/libmaxsi/decl/wchar_t.h index bf5e1c64..210d8d0e 100644 --- a/libmaxsi/decl/wchar_t.h +++ b/libmaxsi/decl/wchar_t.h @@ -1,9 +1,2 @@ -#ifndef _WCHAR_T_DECL -#define _WCHAR_T_DECL -#if !defined(__cplusplus) -#if !defined(_GCC_WCHAR_T) -#define _GCC_WCHAR_T -typedef __wchar_t wchar_t; -#endif -#endif -#endif +#define __need_wchar_t +#include diff --git a/libmaxsi/include/stdarg.h b/libmaxsi/include/stdarg.h deleted file mode 100644 index 364a5e19..00000000 --- a/libmaxsi/include/stdarg.h +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** - - COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011. - - This file is part of LibMaxsi. - - LibMaxsi is free software: you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - LibMaxsi 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 Lesser General Public License for - more details. - - You should have received a copy of the GNU Lesser General Public License - along with LibMaxsi. If not, see . - - stdarg.h - Handle variable argument list - -******************************************************************************/ - -#ifndef _STDARG_H -#define _STDARG_H 1 - -#include - -__BEGIN_DECLS - -@include(va_list.h) - -#undef __need___va_list - -__END_DECLS - -#endif - diff --git a/libmaxsi/include/stddef.h b/libmaxsi/include/stddef.h deleted file mode 100644 index 12ea91e7..00000000 --- a/libmaxsi/include/stddef.h +++ /dev/null @@ -1,44 +0,0 @@ -/****************************************************************************** - - COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011. - - This file is part of LibMaxsi. - - LibMaxsi is free software: you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - LibMaxsi 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 Lesser General Public License for - more details. - - You should have received a copy of the GNU Lesser General Public License - along with LibMaxsi. If not, see . - - stddef.h - Standard type definitions. - -******************************************************************************/ - -#ifndef _STDDEF_H -#define _STDDEF_H 1 - -#include - -__BEGIN_DECLS - -@include(NULL.h) - -#define offsetof(type, member) __builtin_offsetof(type, member) - -@include(ptrdiff_t.h) - -@include(wchar_t.h) - -@include(size_t.h) - -__END_DECLS - -#endif diff --git a/sortix/include/sortix/x64/bits.h b/sortix/include/sortix/x64/bits.h index 70bec142..5f90e311 100644 --- a/sortix/include/sortix/x64/bits.h +++ b/sortix/include/sortix/x64/bits.h @@ -55,7 +55,7 @@ typedef __uint64_t __uintmax_t; /* Define an integer able to hold the size of the largest continuous memory */ /* region and define pointer safe integer types. */ -typedef __SIZE_TYPE__ __size_t; +//typedef __SIZE_TYPE__ __size_t; typedef signed long int __ssize_t; typedef signed long __intptr_t; typedef unsigned long __uintptr_t; diff --git a/sortix/include/sortix/x86/bits.h b/sortix/include/sortix/x86/bits.h index d00bf37e..94dfd027 100644 --- a/sortix/include/sortix/x86/bits.h +++ b/sortix/include/sortix/x86/bits.h @@ -55,7 +55,7 @@ typedef __uint64_t __uintmax_t; /* Define an integer able to hold the size of the largest continuous memory */ /* region and define pointer safe integer types. */ -typedef __SIZE_TYPE__ __size_t; +//typedef __SIZE_TYPE__ __size_t; typedef signed int __ssize_t; typedef signed long __intptr_t; typedef unsigned long __uintptr_t;