2005-10-29 20:27:43 +04:00
|
|
|
#ifndef HAIKU_BUILD_COMPATIBILITY_H
|
|
|
|
#define HAIKU_BUILD_COMPATIBILITY_H
|
|
|
|
|
2007-07-23 04:57:45 +04:00
|
|
|
/*!
|
|
|
|
This header is automatically included in all Haiku applications
|
2009-11-26 02:48:45 +03:00
|
|
|
that are built for BeOS or a Haiku host (which might not be compatible
|
|
|
|
with the current Haiku source anymore).
|
|
|
|
It will make BeOS/Haiku a bit more Haiku compatible, and slightly more
|
2007-07-23 04:57:45 +04:00
|
|
|
POSIX compatible, too. It is supposed to keep the BeOS compatibility
|
|
|
|
kludges in our source files at a minimum.
|
|
|
|
*/
|
|
|
|
|
2008-02-28 17:49:51 +03:00
|
|
|
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
2006-08-06 16:51:10 +04:00
|
|
|
# define _BE_ERRNO_H_
|
|
|
|
// this is what Dano/Zeta is using
|
|
|
|
# include <Errors.h>
|
|
|
|
#endif
|
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#include <sys/stat.h>
|
2008-02-27 12:03:46 +03:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <SupportDefs.h>
|
2009-11-26 02:48:45 +03:00
|
|
|
#include <TypeConstants.h>
|
2008-02-27 12:03:46 +03:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
#include <string.h>
|
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
// no addr_t under standard BeOS
|
2010-04-11 17:15:54 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2009-11-26 02:48:45 +03:00
|
|
|
typedef unsigned long haiku_build_addr_t;
|
|
|
|
# define addr_t haiku_build_addr_t
|
|
|
|
#endif
|
|
|
|
|
2010-04-11 17:15:54 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2008-02-02 15:18:55 +03:00
|
|
|
struct sockaddr_storage {
|
|
|
|
uint8 ss_len; /* total length */
|
|
|
|
uint8 ss_family; /* address family */
|
|
|
|
uint8 __ss_pad1[6]; /* align to quad */
|
|
|
|
uint64 __ss_pad2; /* force alignment to 64 bit */
|
|
|
|
uint8 __ss_pad3[112]; /* pad to a total of 128 bytes */
|
|
|
|
};
|
|
|
|
|
2007-07-23 04:57:45 +04:00
|
|
|
typedef int socklen_t;
|
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#endif // !HAIKU_HOST_PLATFORM_HAIKU
|
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
#ifndef DEFFILEMODE
|
2006-08-06 16:51:10 +04:00
|
|
|
# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
2005-10-29 20:27:43 +04:00
|
|
|
#endif
|
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
#ifndef FS_WRITE_FSINFO_NAME
|
2006-08-06 16:51:10 +04:00
|
|
|
# define FS_WRITE_FSINFO_NAME 0x0001
|
2005-10-29 20:27:43 +04:00
|
|
|
#endif
|
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
#ifndef B_CURRENT_TEAM
|
2006-08-06 16:51:10 +04:00
|
|
|
# define B_CURRENT_TEAM 0
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
#endif
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2006-08-26 20:21:15 +04:00
|
|
|
#ifndef SYMLOOP_MAX
|
|
|
|
# define SYMLOOP_MAX (16)
|
|
|
|
#endif
|
|
|
|
|
2006-08-09 13:53:10 +04:00
|
|
|
#ifndef B_FIRST_REAL_TIME_PRIORITY
|
|
|
|
# define B_FIRST_REAL_TIME_PRIORITY B_REAL_TIME_DISPLAY_PRIORITY
|
|
|
|
#endif
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2014-03-18 23:40:02 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
2014-03-18 01:54:19 +04:00
|
|
|
&& !defined(B_SPINLOCK_INITIALIZER)
|
2009-02-09 22:06:44 +03:00
|
|
|
# define B_SPINLOCK_INITIALIZER 0
|
|
|
|
#endif
|
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#if defined(__GNUC__) && !defined(_PRINTFLIKE)
|
2007-10-19 23:54:05 +04:00
|
|
|
# define _PRINTFLIKE(_format_, _args_) \
|
|
|
|
__attribute__((format(__printf__, _format_, _args_)))
|
|
|
|
#endif
|
2006-08-26 20:21:15 +04:00
|
|
|
|
2010-04-11 17:15:54 +04:00
|
|
|
#if 0
|
|
|
|
// NOTE: This is probably only needed on platforms which don't use ELF
|
|
|
|
// as binary format. So could probably be removed completely.
|
2009-11-26 02:48:45 +03:00
|
|
|
#if defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2007-10-21 19:54:04 +04:00
|
|
|
// BeOS version of BeBuild.h defines this
|
2007-10-26 16:53:25 +04:00
|
|
|
# define _IMPEXP_ROOT __declspec(dllimport)
|
|
|
|
# define _IMPEXP_BE __declspec(dllimport)
|
|
|
|
# define _IMPEXP_MEDIA __declspec(dllimport)
|
|
|
|
# define _IMPEXP_TRACKER __declspec(dllimport)
|
|
|
|
# define _IMPEXP_TRANSLATION __declspec(dllimport)
|
|
|
|
# define _IMPEXP_DEVICE __declspec(dllimport)
|
2008-06-07 16:39:14 +04:00
|
|
|
# define _IMPEXP_NET __declspec(dllimport)
|
2007-10-26 16:53:25 +04:00
|
|
|
#endif
|
2010-04-11 17:15:54 +04:00
|
|
|
#endif
|
2007-10-21 19:54:04 +04:00
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#if defined(__cplusplus) && !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2007-10-21 19:54:04 +04:00
|
|
|
class BBuffer;
|
|
|
|
class BBufferConsumer;
|
|
|
|
class BBufferGroup;
|
|
|
|
class BContinuousParameter;
|
|
|
|
class BControllable;
|
|
|
|
class BFileInterface;
|
2007-10-27 03:43:55 +04:00
|
|
|
class BMimeType;
|
2007-10-21 19:54:04 +04:00
|
|
|
class BParameterWeb;
|
2007-10-27 03:43:55 +04:00
|
|
|
class BRegion;
|
2007-10-21 19:54:04 +04:00
|
|
|
class BTextView;
|
|
|
|
class BTranslator;
|
|
|
|
class BTimeSource;
|
|
|
|
struct entry_ref;
|
|
|
|
struct media_node;
|
|
|
|
#endif
|
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2005-10-29 20:27:43 +04:00
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
extern size_t strnlen(const char *string, size_t count);
|
2005-10-29 20:27:43 +04:00
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
extern size_t strlcat(char *dest, const char *source, size_t length);
|
|
|
|
extern size_t strlcpy(char *dest, const char *source, size_t length);
|
2005-10-29 20:27:43 +04:00
|
|
|
|
* 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
2005-11-07 19:07:25 +03:00
|
|
|
extern char *strcasestr(const char *string, const char *searchString);
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2005-11-13 22:43:42 +03:00
|
|
|
extern float roundf(float value);
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
#ifdef __cplusplus
|
2006-08-06 16:51:10 +04:00
|
|
|
}
|
2005-10-29 20:27:43 +04:00
|
|
|
#endif
|
|
|
|
|
2006-08-03 22:28:52 +04:00
|
|
|
// These are R1-specific extensions
|
2009-11-26 02:48:45 +03:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2008-02-27 12:03:46 +03:00
|
|
|
# define B_TRANSLATION_MAKE_VERSION(major, minor, revision) \
|
|
|
|
((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f))
|
2006-08-06 16:51:10 +04:00
|
|
|
# define B_TRANSLATION_MAJOR_VERSION(v) (v >> 8)
|
|
|
|
# define B_TRANSLATION_MINOR_VERSION(v) ((v >> 4) & 0xf)
|
|
|
|
# define B_TRANSLATION_REVISION_VERSION(v) (v & 0xf)
|
2008-02-29 18:02:12 +03:00
|
|
|
# ifndef USING_HAIKU_TYPE_CONSTANTS_H
|
2008-02-27 12:03:46 +03:00
|
|
|
# define B_LARGE_ICON_TYPE 'ICON'
|
|
|
|
# define B_MINI_ICON_TYPE 'MICN'
|
|
|
|
# define B_VECTOR_ICON_TYPE 'VICN'
|
|
|
|
# define B_BITMAP_NO_SERVER_LINK 0
|
2008-07-27 03:40:13 +04:00
|
|
|
# define B_BITMAP_SCALE_BILINEAR 0
|
2008-02-27 12:03:46 +03:00
|
|
|
# endif
|
2007-04-19 23:22:49 +04:00
|
|
|
#endif // HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
|
|
|
|
2010-04-11 17:15:54 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2019-03-30 21:16:46 +03:00
|
|
|
# if !defined(B_NOT_SUPPORTED)
|
2008-02-27 12:03:46 +03:00
|
|
|
# define B_NOT_SUPPORTED (B_ERROR)
|
2008-01-28 20:38:28 +03:00
|
|
|
# endif
|
2008-02-02 15:18:55 +03:00
|
|
|
# define B_KERNEL_READ_AREA 0
|
|
|
|
# define B_KERNEL_WRITE_AREA 0
|
2007-01-21 06:19:27 +03:00
|
|
|
#endif
|
|
|
|
|
2008-06-19 04:03:56 +04:00
|
|
|
#include <limits.h>
|
|
|
|
|
|
|
|
#ifndef INT32_MAX
|
|
|
|
# define INT32_MAX INT_MAX
|
|
|
|
#endif
|
|
|
|
|
2006-09-21 16:29:49 +04:00
|
|
|
#ifndef INT64_MAX
|
2008-01-28 20:38:28 +03:00
|
|
|
# define INT64_MAX LONGLONG_MAX
|
2006-09-21 16:29:49 +04:00
|
|
|
#endif
|
|
|
|
|
2010-04-11 17:15:54 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2009-11-26 02:48:45 +03:00
|
|
|
# define B_MPEG_2_AUDIO_LAYER_1 (enum mpeg_id)0x201
|
|
|
|
# define B_MPEG_2_AUDIO_LAYER_2 (enum mpeg_id)0x202
|
|
|
|
# define B_MPEG_2_AUDIO_LAYER_3 (enum mpeg_id)0x203
|
|
|
|
# define B_MPEG_2_VIDEO (enum mpeg_id)0x211
|
|
|
|
# define B_MPEG_2_5_AUDIO_LAYER_1 (enum mpeg_id)0x301
|
|
|
|
# define B_MPEG_2_5_AUDIO_LAYER_2 (enum mpeg_id)0x302
|
|
|
|
# define B_MPEG_2_5_AUDIO_LAYER_3 (enum mpeg_id)0x303
|
|
|
|
#endif
|
2007-03-14 02:10:19 +03:00
|
|
|
|
2007-10-19 23:54:05 +04:00
|
|
|
// TODO: experimental API (keep in sync with Accelerant.h)
|
2010-04-11 17:15:54 +04:00
|
|
|
#if !defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST) \
|
|
|
|
&& !defined(HAIKU_HOST_PLATFORM_HAIKU)
|
2007-10-19 23:54:05 +04:00
|
|
|
typedef struct {
|
|
|
|
uint32 version;
|
|
|
|
char vendor[128];
|
|
|
|
char name[128];
|
|
|
|
char serial_number[128];
|
|
|
|
uint32 product_id;
|
|
|
|
struct {
|
|
|
|
uint16 week;
|
|
|
|
uint16 year;
|
|
|
|
} produced;
|
|
|
|
float width;
|
|
|
|
float height;
|
|
|
|
uint32 min_horizontal_frequency; // in kHz
|
|
|
|
uint32 max_horizontal_frequency;
|
|
|
|
uint32 min_vertical_frequency; // in Hz
|
|
|
|
uint32 max_vertical_frequency;
|
|
|
|
uint32 max_pixel_clock; // in kHz
|
|
|
|
} monitor_info;
|
2009-11-26 02:48:45 +03:00
|
|
|
#endif // !HAIKU_HOST_PLATFORM_HAIKU
|
2007-10-19 23:54:05 +04:00
|
|
|
|
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#if !defined(B_HAIKU_32_BIT) && !defined(B_HAIKU_64_BIT)
|
|
|
|
# ifdef HAIKU_HOST_PLATFORM_64_BIT
|
|
|
|
# define B_HAIKU_64_BIT 1
|
|
|
|
# else
|
|
|
|
# define B_HAIKU_32_BIT 1
|
|
|
|
# endif
|
|
|
|
#endif
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2009-11-26 02:48:45 +03:00
|
|
|
#ifndef B_PRId8
|
|
|
|
# define __HAIKU_PRI_PREFIX_32 "l"
|
|
|
|
# define __HAIKU_PRI_PREFIX_64 "ll"
|
|
|
|
# define __HAIKU_PRI_PREFIX_ADDR "l"
|
|
|
|
|
|
|
|
/* printf()/scanf() format strings for [u]int* types */
|
|
|
|
# define B_PRId8 "d"
|
|
|
|
# define B_PRIi8 "i"
|
|
|
|
# define B_PRId16 "d"
|
|
|
|
# define B_PRIi16 "i"
|
|
|
|
# define B_PRId32 __HAIKU_PRI_PREFIX_32 "d"
|
|
|
|
# define B_PRIi32 __HAIKU_PRI_PREFIX_32 "i"
|
|
|
|
# define B_PRId64 __HAIKU_PRI_PREFIX_64 "d"
|
|
|
|
# define B_PRIi64 __HAIKU_PRI_PREFIX_64 "i"
|
|
|
|
# define B_PRIu8 "u"
|
|
|
|
# define B_PRIo8 "o"
|
|
|
|
# define B_PRIx8 "x"
|
|
|
|
# define B_PRIX8 "X"
|
|
|
|
# define B_PRIu16 "u"
|
|
|
|
# define B_PRIo16 "o"
|
|
|
|
# define B_PRIx16 "x"
|
|
|
|
# define B_PRIX16 "X"
|
|
|
|
# define B_PRIu32 __HAIKU_PRI_PREFIX_32 "u"
|
|
|
|
# define B_PRIo32 __HAIKU_PRI_PREFIX_32 "o"
|
|
|
|
# define B_PRIx32 __HAIKU_PRI_PREFIX_32 "x"
|
|
|
|
# define B_PRIX32 __HAIKU_PRI_PREFIX_32 "X"
|
|
|
|
# define B_PRIu64 __HAIKU_PRI_PREFIX_64 "u"
|
|
|
|
# define B_PRIo64 __HAIKU_PRI_PREFIX_64 "o"
|
|
|
|
# define B_PRIx64 __HAIKU_PRI_PREFIX_64 "x"
|
|
|
|
# define B_PRIX64 __HAIKU_PRI_PREFIX_64 "X"
|
|
|
|
|
|
|
|
# define B_SCNd8 "hhd"
|
|
|
|
# define B_SCNi8 "hhi"
|
|
|
|
# define B_SCNd16 "hd"
|
|
|
|
# define B_SCNi16 "hi"
|
|
|
|
# define B_SCNd32 __HAIKU_PRI_PREFIX_32 "d"
|
|
|
|
# define B_SCNi32 __HAIKU_PRI_PREFIX_32 "i"
|
|
|
|
# define B_SCNd64 __HAIKU_PRI_PREFIX_64 "d"
|
|
|
|
# define B_SCNi64 __HAIKU_PRI_PREFIX_64 "i"
|
|
|
|
# define B_SCNu8 "hhu"
|
|
|
|
# define B_SCNo8 "hho"
|
|
|
|
# define B_SCNx8 "hhx"
|
|
|
|
# define B_SCNu16 "hu"
|
|
|
|
# define B_SCNo16 "ho"
|
|
|
|
# define B_SCNx16 "hx"
|
|
|
|
# define B_SCNu32 __HAIKU_PRI_PREFIX_32 "u"
|
|
|
|
# define B_SCNo32 __HAIKU_PRI_PREFIX_32 "o"
|
|
|
|
# define B_SCNx32 __HAIKU_PRI_PREFIX_32 "x"
|
|
|
|
# define B_SCNu64 __HAIKU_PRI_PREFIX_64 "u"
|
|
|
|
# define B_SCNo64 __HAIKU_PRI_PREFIX_64 "o"
|
|
|
|
# define B_SCNx64 __HAIKU_PRI_PREFIX_64 "x"
|
|
|
|
|
|
|
|
/* printf() format strings for some standard types */
|
|
|
|
/* size_t */
|
|
|
|
# define B_PRIuSIZE __HAIKU_PRI_PREFIX_ADDR "u"
|
|
|
|
# define B_PRIoSIZE __HAIKU_PRI_PREFIX_ADDR "o"
|
|
|
|
# define B_PRIxSIZE __HAIKU_PRI_PREFIX_ADDR "x"
|
|
|
|
# define B_PRIXSIZE __HAIKU_PRI_PREFIX_ADDR "X"
|
|
|
|
/* ssize_t */
|
|
|
|
# define B_PRIdSSIZE __HAIKU_PRI_PREFIX_ADDR "d"
|
|
|
|
# define B_PRIiSSIZE __HAIKU_PRI_PREFIX_ADDR "i"
|
|
|
|
/* addr_t */
|
|
|
|
# define B_PRIuADDR __HAIKU_PRI_PREFIX_ADDR "u"
|
|
|
|
# define B_PRIoADDR __HAIKU_PRI_PREFIX_ADDR "o"
|
|
|
|
# define B_PRIxADDR __HAIKU_PRI_PREFIX_ADDR "x"
|
|
|
|
# define B_PRIXADDR __HAIKU_PRI_PREFIX_ADDR "X"
|
|
|
|
/* off_t */
|
|
|
|
# define B_PRIdOFF B_PRId64
|
|
|
|
# define B_PRIiOFF B_PRIi64
|
|
|
|
/* dev_t */
|
|
|
|
# define B_PRIdDEV B_PRId32
|
|
|
|
# define B_PRIiDEV B_PRIi32
|
|
|
|
/* ino_t */
|
|
|
|
# define B_PRIdINO B_PRId64
|
|
|
|
# define B_PRIiINO B_PRIi64
|
|
|
|
/* time_t */
|
2017-06-06 04:25:06 +03:00
|
|
|
# if defined(__i386__) && !defined(__x86_64__)
|
|
|
|
# define B_PRIdTIME B_PRId32
|
|
|
|
# define B_PRIiTIME B_PRIi32
|
|
|
|
# else
|
|
|
|
# define B_PRIdTIME B_PRId64
|
|
|
|
# define B_PRIiTIME B_PRIi64
|
|
|
|
# endif
|
2009-11-26 02:48:45 +03:00
|
|
|
#endif // !B_PRId8
|
|
|
|
|
|
|
|
|
|
|
|
#endif // HAIKU_BUILD_COMPATIBILITY_H
|