diff --git a/headers/build/config/HaikuConfig.h b/headers/build/config/HaikuConfig.h new file mode 100644 index 0000000000..f9a1383046 --- /dev/null +++ b/headers/build/config/HaikuConfig.h @@ -0,0 +1 @@ +#include <../config/HaikuConfig.h> diff --git a/headers/build/config_build/types.h b/headers/build/config/types.h similarity index 98% rename from headers/build/config_build/types.h rename to headers/build/config/types.h index 960e1ce0a5..7a05c18d87 100644 --- a/headers/build/config_build/types.h +++ b/headers/build/config/types.h @@ -6,7 +6,7 @@ #define _CONFIG_BUILD_TYPES_H -#include +#include #include diff --git a/headers/build/config_build/HaikuConfig.h b/headers/build/config_build/HaikuConfig.h deleted file mode 100644 index aba9b7fab0..0000000000 --- a/headers/build/config_build/HaikuConfig.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2009-2010, Haiku, Inc. All Rights Reserved. - * Distributed under the terms of the MIT License. - */ -#ifndef _CONFIG_HAIKU_CONFIG_H -#define _CONFIG_HAIKU_CONFIG_H - - -/* Determine the architecture and define macros for some fundamental - properties: - __HAIKU_ARCH - short name of the architecture (used in paths) - __HAIKU_ARCH_ - defined to 1 for the respective architecture - __HAIKU_ARCH_BITS - defined to 32/64 on 32/64 bit architectures - (defaults to 32) - __HAIKU_ARCH_PHYSICAL_BITS - defined to 32/64 on architectures with 32/64 - (defaults to __HAIKU_ARCH_BITS) - __HAIKU_BIG_ENDIAN - defined to 1 on big endian architectures - (defaults to undefined) -*/ -#ifdef __INTEL__ -# define __HAIKU_ARCH x86 -# define __HAIKU_ARCH_X86 1 -#elif __x86_64__ -# define __HAIKU_ARCH x86_64 -# define __HAIKU_ARCH_X86_64 1 -# define __HAIKU_ARCH_BITS 64 -#elif __POWERPC__ -# define __HAIKU_ARCH ppc -# define __HAIKU_ARCH_PPC 1 -# define __HAIKU_BIG_ENDIAN 1 -#elif __M68K__ -# define __HAIKU_ARCH m68k -# define __HAIKU_ARCH_M68K 1 -# define __HAIKU_BIG_ENDIAN 1 -#elif __MIPSEL__ -# define __HAIKU_ARCH mipsel -# define __HAIKU_ARCH_MIPSEL 1 -#elif __ARM__ || __ARMEL__ -# define __HAIKU_ARCH arm -# define __HAIKU_ARCH_ARM 1 -#elif __ARMEB__ -# define __HAIKU_ARCH armeb -# define __HAIKU_ARCH_ARM 1 -# define __HAIKU_BIG_ENDIAN 1 -#elif __AARCH64EL__ -# define __HAIKU_ARCH aarch64 -# define __HAIKU_ARCH_ARM 1 -# define __HAIKU_ARCH_BITS 64 -#else -# error Unsupported architecture! -#endif - -/* implied properties: - __HAIKU_ARCH_{32,64}_BIT - defined to 1 on 32/64 bit architectures, i.e. - using 32/64 bit virtual addresses - __HAIKU_ARCH_PHYSICAL_BITS - defined to 32/64 on architectures with 32/64 - bit physical addresses - __HAIKU_ARCH_PHYSICAL_{32,64}_BIT - defined to 1 on architectures using 64 - bit physical addresses - __HAIKU_BIG_ENDIAN - defined to 1 on big endian architectures -*/ - -/* bitness */ -#ifndef __HAIKU_ARCH_BITS -# define __HAIKU_ARCH_BITS 32 -#endif - -#if __HAIKU_ARCH_BITS == 32 -# define __HAIKU_ARCH_32_BIT 1 -#elif __HAIKU_ARCH_BITS == 64 -# define __HAIKU_ARCH_64_BIT 1 -#else -# error Unsupported bitness! -#endif - -/* physical bitness */ -#ifndef __HAIKU_ARCH_PHYSICAL_BITS -# define __HAIKU_ARCH_PHYSICAL_BITS __HAIKU_ARCH_BITS -#endif - -#if __HAIKU_ARCH_PHYSICAL_BITS == 32 -# define __HAIKU_ARCH_PHYSICAL_32_BIT 1 -#elif __HAIKU_ARCH_PHYSICAL_BITS == 64 -# define __HAIKU_ARCH_PHYSICAL_64_BIT 1 -#else -# error Unsupported physical bitness! -#endif - -/* endianess */ -#ifndef __HAIKU_BIG_ENDIAN -# define __HAIKU_LITTLE_ENDIAN 1 -#endif - -/* architecture specific include macros */ -#define __HAIKU_ARCH_HEADER(header) -#define __HAIKU_SUBDIR_ARCH_HEADER(subdir, header) \ - - - -#endif /* _CONFIG_HAIKU_CONFIG_H */ diff --git a/headers/build/os/BeBuild.h b/headers/build/os/BeBuild.h index 40ed4798f3..8fcabb167c 100644 --- a/headers/build/os/BeBuild.h +++ b/headers/build/os/BeBuild.h @@ -1,82 +1 @@ -/* - * Copyright 2007-2010, Haiku, Inc. All Rights Reserved. - * Distributed under the terms of the MIT License. - */ -#ifndef _BE_BUILD_H -#define _BE_BUILD_H - - -#include - - -#define B_BEOS_VERSION_4 0x0400 -#define B_BEOS_VERSION_4_5 0x0450 -#define B_BEOS_VERSION_5 0x0500 - -#define B_BEOS_VERSION B_BEOS_VERSION_5 -#define B_BEOS_VERSION_MAUI B_BEOS_VERSION_5 - -/* Haiku (API) version */ -#define B_HAIKU_VERSION_BEOS 0x00000001 -#define B_HAIKU_VERSION_BONE 0x00000002 -#define B_HAIKU_VERSION_DANO 0x00000003 -#define B_HAIKU_VERSION_1_ALPHA_1 0x00000100 -#define B_HAIKU_VERSION_1_PRE_ALPHA_2 0x00000101 -#define B_HAIKU_VERSION_1 0x00010000 - -#define B_HAIKU_VERSION B_HAIKU_VERSION_1_PRE_ALPHA_2 - -/* Haiku ABI */ -#define B_HAIKU_ABI_MAJOR 0xffff0000 -#define B_HAIKU_ABI_GCC_2 0x00020000 -#define B_HAIKU_ABI_GCC_4 0x00040000 - -#define B_HAIKU_ABI_GCC_2_ANCIENT 0x00020000 -#define B_HAIKU_ABI_GCC_2_BEOS 0x00020001 -#define B_HAIKU_ABI_GCC_2_HAIKU 0x00020002 - -#if __GNUC__ == 2 -# define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU -#elif __GNUC__ >= 3 && __GNUC__ <= 8 -# define B_HAIKU_ABI B_HAIKU_ABI_GCC_4 -#else -# error Unsupported gcc version! -#endif - - -#define B_HAIKU_BITS __HAIKU_ARCH_BITS -#define B_HAIKU_PHYSICAL_BITS __HAIKU_ARCH_PHYSICAL_BITS - -#ifdef __HAIKU_ARCH_64_BIT -# define B_HAIKU_64_BIT 1 -#else -# define B_HAIKU_32_BIT 1 -#endif - -#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT -# define B_HAIKU_PHYSICAL_64_BIT 1 -#else -# define B_HAIKU_PHYSICAL_32_BIT 1 -#endif - -#ifdef __HAIKU_BEOS_COMPATIBLE -# define B_HAIKU_BEOS_COMPATIBLE 1 -#endif - - -#define _UNUSED(argument) argument -#define _PACKED __attribute__((packed)) -#define _PRINTFLIKE(_format_, _args_) \ - __attribute__((format(__printf__, _format_, _args_))) -#define _EXPORT -#define _IMPORT - -#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \ - __asm__(".symver " function "," versionedSymbol) - - -#define _IMPEXP_ROOT -#define _IMPEXP_BE - - -#endif /* _BE_BUILD_H */ +#include <../os/BeBuild.h> diff --git a/headers/build/os/app/Application.h b/headers/build/os/app/Application.h index 83ffa8677f..5a3424697f 100644 --- a/headers/build/os/app/Application.h +++ b/headers/build/os/app/Application.h @@ -26,7 +26,7 @@ public: // Global Objects -extern _IMPEXP_BE BApplication* be_app; -extern _IMPEXP_BE BMessenger be_app_messenger; +extern BApplication* be_app; +extern BMessenger be_app_messenger; #endif // _APPLICATION_H diff --git a/headers/build/os/kernel/image.h b/headers/build/os/kernel/image.h index 638008fbad..5742a8074c 100644 --- a/headers/build/os/kernel/image.h +++ b/headers/build/os/kernel/image.h @@ -1,114 +1 @@ -/****************************************************************************** -/ -/ File: image.h -/ -/ Description: Kernel interface for managing executable images. -/ -/ Copyright 1993-98, Be Incorporated -/ -******************************************************************************/ - -#ifndef _IMAGE_H -#define _IMAGE_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/*---------------------------------------------------------*/ -/*----- Image types, info, and functions ------------------*/ - -#define B_INIT_BEFORE_FUNCTION_NAME "initialize_before" -#define B_INIT_AFTER_FUNCTION_NAME "initialize_after" -#define B_TERM_BEFORE_FUNCTION_NAME "terminate_before" -#define B_TERM_AFTER_FUNCTION_NAME "terminate_after" - -typedef int32 image_id; - -typedef enum { - B_APP_IMAGE = 1, - B_LIBRARY_IMAGE, - B_ADD_ON_IMAGE, - B_SYSTEM_IMAGE -} image_type; - -typedef struct { - image_id id; - image_type type; - int32 sequence; - int32 init_order; - void (*init_routine)(); - void (*term_routine)(); - dev_t device; - ino_t node; - char name[MAXPATHLEN]; - void *text; - void *data; - int32 text_size; - int32 data_size; -} image_info; - -// flags for _kern_load_image() -enum { - B_WAIT_TILL_LOADED = 0x01, // Wait till the loader has loaded and relocated - // (but not yet initialized) the application - // image and all dependencies. If not supplied, - // the function returns before the loader - // started to do anything at all, i.e. it - // returns success, even if the executable - // doesn't exist. -}; - -extern _IMPEXP_ROOT thread_id load_image(int32 argc, const char **argv, - const char **envp); -extern _IMPEXP_ROOT image_id load_add_on(const char *path); -extern _IMPEXP_ROOT status_t unload_add_on(image_id imageID); - -/* private; use the macros, below */ -extern _IMPEXP_ROOT status_t _get_image_info (image_id imageID, - image_info *info, size_t size); -extern _IMPEXP_ROOT status_t _get_next_image_info (team_id team, int32 *cookie, - image_info *info, size_t size); -/* use these */ -#define get_image_info(image, info) \ - _get_image_info((image), (info), sizeof(*(info))) -#define get_next_image_info(team, cookie, info) \ - _get_next_image_info((team), (cookie), (info), sizeof(*(info))) - - -/*---------------------------------------------------------*/ -/*----- symbol types and functions ------------------------*/ - -#define B_SYMBOL_TYPE_DATA 0x1 -#define B_SYMBOL_TYPE_TEXT 0x2 -#define B_SYMBOL_TYPE_ANY 0x5 - -extern _IMPEXP_ROOT status_t get_image_symbol(image_id imid, - const char *name, int32 sclass, void **ptr); -extern _IMPEXP_ROOT status_t get_nth_image_symbol(image_id imid, int32 index, - char *buf, int32 *bufsize, int32 *sclass, - void **ptr); - - -/*---------------------------------------------------------*/ -/*----- cache manipulation --------------------------------*/ - -#define B_FLUSH_DCACHE 0x0001 /* dcache = data cache */ -#define B_FLUSH_ICACHE 0x0004 /* icache = instruction cache */ -#define B_INVALIDATE_DCACHE 0x0002 -#define B_INVALIDATE_ICACHE 0x0008 - -extern _IMPEXP_ROOT void clear_caches(void *addr, size_t len, uint32 flags); - -/*---------------------------------------------------------*/ - -#ifdef __cplusplus -} -#endif - -#endif /* _IMAGE_H */ +#include <../os/kernel/image.h> diff --git a/headers/build/os/support/Archivable.h b/headers/build/os/support/Archivable.h index ec9d9b0fe3..aeaefd9efd 100644 --- a/headers/build/os/support/Archivable.h +++ b/headers/build/os/support/Archivable.h @@ -49,7 +49,7 @@ class BMessage; class BArchivable { public: BArchivable(); - virtual ~BArchivable(); + virtual ~BArchivable(); BArchivable(BMessage* from); virtual status_t Archive(BMessage* into, bool deep = true) const; @@ -70,9 +70,9 @@ private: // Global Functions ------------------------------------------------------------ -typedef BArchivable* (*instantiation_func) (BMessage *); +typedef BArchivable* (*instantiation_func) (BMessage *); -_IMPEXP_BE bool validate_instantiation(BMessage* from, +bool validate_instantiation(BMessage* from, const char* class_name); @@ -80,11 +80,3 @@ _IMPEXP_BE bool validate_instantiation(BMessage* from, #endif // _ARCHIVABLE_H - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/support/SupportDefs.h b/headers/build/os/support/SupportDefs.h index f400fd3b11..13ac989d16 100644 --- a/headers/build/os/support/SupportDefs.h +++ b/headers/build/os/support/SupportDefs.h @@ -1,2 +1,2 @@ -#include +#include #include <../os/support/SupportDefs.h>