Updated our build SupportDefs.h to the same version as the current standard

version. This gets rid of the _IMPEXP* definitions so it should not cause
any trouble.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24184 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-02-29 23:43:18 +00:00
parent 438500b022
commit d8a88cb313
+37 -59
View File
@@ -1,49 +1,28 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2004-2005, Haiku * Copyright 2004-2007, Haiku, Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Erik Jaesler ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: SupportDefs.h
// Author: Erik Jaesler ([email protected])
// Description: Common type definitions.
//------------------------------------------------------------------------------
#ifndef _SUPPORT_DEFS_H #ifndef _SUPPORT_DEFS_H
#define _SUPPORT_DEFS_H #define _SUPPORT_DEFS_H
/* this !must! be located before the include of sys/types.h */
/* this must be located before the include of sys/types.h */
#if !defined(_SYS_TYPES_H) && !defined(_SYS_TYPES_H_) #if !defined(_SYS_TYPES_H) && !defined(_SYS_TYPES_H_)
typedef unsigned long ulong; typedef unsigned long ulong;
typedef unsigned int uint; typedef unsigned int uint;
typedef unsigned short ushort; typedef unsigned short ushort;
#endif #endif
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <BeBuild.h> #include <BeBuild.h>
#include <sys/types.h>
#include <Errors.h> #include <Errors.h>
// Shorthand type formats ------------------------------------------------------ #include <sys/types.h>
// Shorthand type formats
typedef signed char int8; typedef signed char int8;
typedef unsigned char uint8; typedef unsigned char uint8;
typedef volatile signed char vint8; typedef volatile signed char vint8;
@@ -78,24 +57,20 @@ typedef unsigned char uchar;
typedef unsigned short unichar; typedef unsigned short unichar;
// Descriptive formats --------------------------------------------------------- // Descriptive formats
typedef int32 status_t; typedef int32 status_t;
typedef int64 bigtime_t; typedef int64 bigtime_t;
typedef uint32 type_code; typedef uint32 type_code;
typedef uint32 perform_code; typedef uint32 perform_code;
// Empty string ("") ----------------------------------------------------------- // Empty string ("")
#ifdef __cplusplus #ifdef __cplusplus
extern _IMPEXP_BE const char *B_EMPTY_STRING; extern const char *B_EMPTY_STRING;
#endif #endif
// min and max comparisons ----------------------------------------------------- // min and max comparisons
// min() and max() won't work in C++
#define min_c(a,b) ((a)>(b)?(b):(a))
#define max_c(a,b) ((a)>(b)?(a):(b))
#ifndef __cplusplus #ifndef __cplusplus
# ifndef min # ifndef min
# define min(a,b) ((a)>(b)?(b):(a)) # define min(a,b) ((a)>(b)?(b):(a))
@@ -105,8 +80,12 @@ extern _IMPEXP_BE const char *B_EMPTY_STRING;
# endif # endif
#endif #endif
// min() and max() won't work in C++
#define min_c(a,b) ((a)>(b)?(b):(a))
#define max_c(a,b) ((a)>(b)?(a):(b))
// Grandfathering --------------------------------------------------------------
// Grandfathering
#ifndef __cplusplus #ifndef __cplusplus
# include <stdbool.h> # include <stdbool.h>
#endif #endif
@@ -116,34 +95,33 @@ extern _IMPEXP_BE const char *B_EMPTY_STRING;
#endif #endif
//------------------------------------------------------------------------------
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
//----- Atomic functions; old value is returned -------------------------------- // Atomic functions; previous value is returned
extern _IMPEXP_ROOT int32 atomic_set(vint32 *value, int32 newValue); extern int32 atomic_set(vint32 *value, int32 newValue);
extern _IMPEXP_ROOT int32 atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst); extern int32 atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst);
extern _IMPEXP_ROOT int32 atomic_add(vint32 *value, int32 addValue); extern int32 atomic_add(vint32 *value, int32 addValue);
extern _IMPEXP_ROOT int32 atomic_and(vint32 *value, int32 andValue); extern int32 atomic_and(vint32 *value, int32 andValue);
extern _IMPEXP_ROOT int32 atomic_or(vint32 *value, int32 orValue); extern int32 atomic_or(vint32 *value, int32 orValue);
extern _IMPEXP_ROOT int32 atomic_get(vint32 *value); extern int32 atomic_get(vint32 *value);
extern _IMPEXP_ROOT int64 atomic_set64(vint64 *value, int64 newValue); extern int64 atomic_set64(vint64 *value, int64 newValue);
extern _IMPEXP_ROOT int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst); extern int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst);
extern _IMPEXP_ROOT int64 atomic_add64(vint64 *value, int64 addValue); extern int64 atomic_add64(vint64 *value, int64 addValue);
extern _IMPEXP_ROOT int64 atomic_and64(vint64 *value, int64 andValue); extern int64 atomic_and64(vint64 *value, int64 andValue);
extern _IMPEXP_ROOT int64 atomic_or64(vint64 *value, int64 orValue); extern int64 atomic_or64(vint64 *value, int64 orValue);
extern _IMPEXP_ROOT int64 atomic_get64(vint64 *value); extern int64 atomic_get64(vint64 *value);
// Other stuff ----------------------------------------------------------------- // Other stuff
extern _IMPEXP_ROOT void * get_stack_frame(void); extern void* get_stack_frame(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
//-------- Obsolete or discouraged API ----------------------------------------- // Obsolete or discouraged API
// use 'true' and 'false' // use 'true' and 'false'
#ifndef FALSE #ifndef FALSE