2005-10-29 16:27:43 +00:00
|
|
|
#ifndef HAIKU_BUILD_COMPATIBILITY_H
|
|
|
|
|
#define HAIKU_BUILD_COMPATIBILITY_H
|
|
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
#include <sys/types.h>
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2006-08-06 12:51:10 +00:00
|
|
|
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
|
|
|
|
# define _BE_ERRNO_H_
|
|
|
|
|
// this is what Dano/Zeta is using
|
|
|
|
|
# include <Errors.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2005-10-29 16:27:43 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
// no addr_t under standard BeOS
|
|
|
|
|
typedef unsigned long haiku_build_addr_t;
|
|
|
|
|
#define addr_t haiku_build_addr_t
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
#ifndef DEFFILEMODE
|
2006-08-06 12:51:10 +00:00
|
|
|
# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
2005-10-29 16:27:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
#ifndef FS_WRITE_FSINFO_NAME
|
2006-08-06 12:51:10 +00:00
|
|
|
# define FS_WRITE_FSINFO_NAME 0x0001
|
2005-10-29 16:27:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
#ifndef B_CURRENT_TEAM
|
2006-08-06 12:51:10 +00:00
|
|
|
# define B_CURRENT_TEAM 0
|
2005-11-07 16:07:25 +00:00
|
|
|
#endif
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2006-08-26 16:21:15 +00:00
|
|
|
|
|
|
|
|
#ifndef SYMLOOP_MAX
|
|
|
|
|
# define SYMLOOP_MAX (16)
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-08-09 09:53:10 +00:00
|
|
|
#ifndef B_FIRST_REAL_TIME_PRIORITY
|
|
|
|
|
# define B_FIRST_REAL_TIME_PRIORITY B_REAL_TIME_DISPLAY_PRIORITY
|
|
|
|
|
#endif
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2006-08-26 16:21:15 +00:00
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
extern size_t strnlen(const char *string, size_t count);
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2005-11-07 16:07:25 +00: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 16:27:43 +00:00
|
|
|
|
2005-11-07 16:07:25 +00:00
|
|
|
extern char *strcasestr(const char *string, const char *searchString);
|
2005-10-29 16:27:43 +00:00
|
|
|
|
2005-11-13 19:43:42 +00:00
|
|
|
extern float roundf(float value);
|
|
|
|
|
|
2005-10-29 16:27:43 +00:00
|
|
|
#ifdef __cplusplus
|
2006-08-06 12:51:10 +00:00
|
|
|
}
|
2005-10-29 16:27:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
2006-08-03 18:28:52 +00:00
|
|
|
// These are R1-specific extensions
|
2006-08-06 12:51:10 +00:00
|
|
|
#ifndef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
|
|
|
|
# define B_TRANSLATION_MAKE_VERSION(major,minor,revision) ((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f))
|
|
|
|
|
# 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)
|
|
|
|
|
#endif // HAIKU_TARGET_PLATFORM_HAIKU
|
|
|
|
|
|
|
|
|
|
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
2006-08-07 12:45:56 +00:00
|
|
|
# define B_REDO 'REDO'
|
2006-08-31 16:23:09 +00:00
|
|
|
# define B_BAD_DATA (B_NOT_ALLOWED + 1)
|
2006-08-03 18:28:52 +00:00
|
|
|
#endif
|
|
|
|
|
|
2006-09-21 12:29:49 +00:00
|
|
|
#ifndef INT64_MAX
|
|
|
|
|
#include <limits.h>
|
|
|
|
|
#define INT64_MAX LONGLONG_MAX
|
|
|
|
|
#endif
|
|
|
|
|
|
2005-10-29 16:27:43 +00:00
|
|
|
#endif // HAIKU_BUILD_COMPATIBILITY_H
|
|
|
|
|
|