Preparations for removing __BEOS__ from the compiler defines.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-10-23 21:46:26 +00:00
parent 889903f9dd
commit bc3955fea5
136 changed files with 244 additions and 244 deletions
+2 -2
View File
@@ -30,7 +30,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <limits.h>
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h>
#else
#include <iostream.h>
@@ -43,7 +43,7 @@ inline T* allocate(ptrdiff_t size, T*) {
set_new_handler(0);
T* tmp = (T*)(::operator new((size_t)(size * sizeof(T))));
if (tmp == 0) {
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
fprintf(stderr, "out of memory\n");
#else
cerr << "out of memory" << endl;
+2 -2
View File
@@ -61,7 +61,7 @@ extern void __length_error (const char *);
#endif
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
// Needed for atomic_add():
typedef long int32;
typedef volatile long vint32;
@@ -79,7 +79,7 @@ private:
charT* data () { return reinterpret_cast<charT *>(this + 1); }
charT& operator[] (size_t s) { return data () [s]; }
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
charT* grab () { if (selfish) return clone (); atomic_add((vint32*) &ref, 1); return data (); }
void release() { if (atomic_add((int32*) &ref, -1) == 1) delete this; }
#else
+3 -3
View File
@@ -42,7 +42,7 @@
# include <new>
# define __THROW_BAD_ALLOC throw bad_alloc()
#elif !defined(__THROW_BAD_ALLOC)
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h>
# define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1)
#else
@@ -329,7 +329,7 @@ private:
// instead of enum { x = N }, but few compilers accept the former.
# ifndef __SUNPRO_CC
enum {_ALIGN = 8};
# if defined __BEOS__
# if (defined(__BEOS__) || defined(__HAIKU__))
enum {_MAX_BYTES = 0};
# else
enum {_MAX_BYTES = 128};
@@ -710,7 +710,7 @@ template <bool __threads, int __inst>
__default_alloc_template<__threads, __inst>::_Obj* __VOLATILE
__default_alloc_template<__threads, __inst> ::_S_free_list[
_NFREELISTS
#if defined __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
] = { };
#else
] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
+1 -1
View File
@@ -291,7 +291,7 @@
!defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \
!defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \
!defined(__STL_USE_SGI_ALLOCATORS) || \
defined(__BEOS__)
(defined(__BEOS__) || defined(__HAIKU__))
# define __STL_USE_STD_ALLOCATORS
# endif