From e48a877c93306768802a44339dc775d7b9530d05 Mon Sep 17 00:00:00 2001 From: beveloper Date: Wed, 23 Oct 2002 18:47:12 +0000 Subject: [PATCH] a few new headers for compatibility git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1625 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/null.h | 14 ++++++++++++++ headers/posix/size_t.h | 20 ++++++++++++++++++++ headers/posix/wchar.h | 8 ++++++++ headers/posix/wchar_t.h | 12 ++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 headers/posix/null.h create mode 100644 headers/posix/size_t.h create mode 100644 headers/posix/wchar.h create mode 100644 headers/posix/wchar_t.h diff --git a/headers/posix/null.h b/headers/posix/null.h new file mode 100644 index 0000000000..314039bfcb --- /dev/null +++ b/headers/posix/null.h @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2002 Marcus Overhagen + * All rights reserved. + * + * Distributed under the terms of the MIT license + */ +#ifndef _NULL_H +#define _NULL_H + +#ifndef NULL + #define NULL 0 +#endif + +#endif diff --git a/headers/posix/size_t.h b/headers/posix/size_t.h new file mode 100644 index 0000000000..bcba1e9d44 --- /dev/null +++ b/headers/posix/size_t.h @@ -0,0 +1,20 @@ +#ifndef _SIZE_T_H_ +#define _SIZE_T_H_ + +/* + * XXX serious hack that doesn't really solve the problem. + * As of right now, some versions of the toolchain expect size_t to + * be unsigned long (newer ones than 2.95.2 and beos), and the older + * ones need it to be unsigned int. It's an actual failure when + * operator new is declared. This will have to be resolved in the future. + */ + +#ifdef __BEOS__ +typedef unsigned long size_t; +typedef signed long ssize_t; +#else +typedef unsigned int size_t; +typedef signed int ssize_t; +#endif + +#endif /* _SIZE_T_H_ */ diff --git a/headers/posix/wchar.h b/headers/posix/wchar.h new file mode 100644 index 0000000000..93042b0224 --- /dev/null +++ b/headers/posix/wchar.h @@ -0,0 +1,8 @@ +/* + * Copyright (C) 2002 Marcus Overhagen + * All rights reserved. + * + * Distributed under the terms of the MIT license + */ + +#include diff --git a/headers/posix/wchar_t.h b/headers/posix/wchar_t.h new file mode 100644 index 0000000000..e3849542ab --- /dev/null +++ b/headers/posix/wchar_t.h @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2002 Marcus Overhagen + * All rights reserved. + * + * Distributed under the terms of the MIT license + */ +#ifndef _WCHAR_T_H +#define _WCHAR_T_H + +typedef unsigned short wchar_t; + +#endif