* Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for "haiku") -- added one more level of indirection to achieve that. (TARGET_LIBRARY_NAME_MAP -> *_LIBRARY_NAME_MAP_*). * Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h (auto-included when compiling something that uses the Be API for platform "host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h, which can be included when compiling something that can be built for both, Haiku and BeOS compatible platforms. * Introduced libhaikucompat.a, a library that adds a few functions existing under Haiku, but not under BeOS. * New rule AddSubDirSupportedPlatforms. * Renamed libopenbeos.so to libbe_haiku.so. * Introduced new target platform "libbe_test", which is basically equivalent to a BeOS compatible host platform target, with the exception, that instead of the host platform's libbe.so a special build of Haiku's libbe.so (libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore Haiku's public app, interface, storage, and support kit headers are used when compiling. This replaces the less nice way in which the test app server and applications for this test environment were built. When building for platform "libbe_test", the library name "be" is autotranslated to "libbe_haiku.so". Thus most applications don't need special fiddling when them building them for the app server test environment; usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice. * Reduced the dependencies of <syscalls.h> and fixed problems caused by this (e.g. source files not including the needed headers directly). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,51 +1,38 @@
|
||||
#ifndef HAIKU_BUILD_COMPATIBILITY_H
|
||||
#define HAIKU_BUILD_COMPATIBILITY_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <Errors.h>
|
||||
#include <string.h>
|
||||
|
||||
// no addr_t under standard BeOS
|
||||
typedef unsigned long haiku_build_addr_t;
|
||||
#define addr_t haiku_build_addr_t
|
||||
|
||||
#include <Errors.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#ifndef DEFFILEMODE
|
||||
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||
#endif
|
||||
|
||||
#ifndef FS_WRITE_FSINFO_NAME
|
||||
#define FS_WRITE_FSINFO_NAME 0x0001
|
||||
#endif
|
||||
|
||||
#ifndef B_CURRENT_TEAM
|
||||
#define B_CURRENT_TEAM 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Is kernel-only under Linux.
|
||||
extern size_t strnlen(const char *string, size_t count);
|
||||
|
||||
extern size_t strlcat(char *dest, const char *source, size_t length);
|
||||
extern size_t strlcpy(char *dest, const char *source, size_t length);
|
||||
|
||||
// BeOS only
|
||||
extern ssize_t read_pos(int fd, off_t pos, void *buffer, size_t count);
|
||||
extern ssize_t write_pos(int fd, off_t pos, const void *buffer,size_t count);
|
||||
|
||||
|
||||
// There's no O_NOTRAVERSE under Linux, but there's a O_NOFOLLOW, which
|
||||
// means something different (open() fails when the file is a symlink), but
|
||||
// we can abuse this flag for our purposes (we filter it in libroot).
|
||||
#ifndef O_NOTRAVERSE
|
||||
#ifdef O_NOFOLLOW
|
||||
#define O_NOTRAVERSE O_NOFOLLOW
|
||||
#else
|
||||
#define O_NOTRAVERSE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef S_IUMSK
|
||||
#define S_IUMSK ALLPERMS
|
||||
#endif
|
||||
|
||||
|
||||
// remap strerror()
|
||||
extern char *_haiku_build_strerror(int errnum);
|
||||
|
||||
#ifndef BUILDING_HAIKU_ERROR_MAPPER
|
||||
|
||||
#undef strerror
|
||||
#define strerror(errnum) _haiku_build_strerror(errnum)
|
||||
|
||||
#endif
|
||||
|
||||
extern char *strcasestr(const char *string, const char *searchString);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user