Patch by Andreas Faerber with changes by myself: Work towards Solaris

build platform support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26899 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-09 15:36:24 +00:00
parent 8c57f7ed08
commit 4d121ec067
12 changed files with 77 additions and 12 deletions
+10 -1
View File
@@ -5,7 +5,9 @@
#ifndef __addr_t_defined
#define __addr_t_defined
#endif
#endif
#if defined(HAIKU_HOST_PLATFORM_CYGWIN) || defined(HAIKU_HOST_PLATFORM_SUNOS)
#ifndef DEFFILEMODE
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
@@ -17,6 +19,13 @@
#include <ctype.h>
#endif
#ifdef HAIKU_HOST_PLATFORM_SUNOS
# include <limits.h>
# ifndef NAME_MAX
# define NAME_MAX MAXNAMELEN
# endif
#endif
typedef unsigned long haiku_build_addr_t;
#define addr_t haiku_build_addr_t
@@ -43,7 +52,7 @@ extern size_t strlcat(char *dest, const char *source, size_t length);
extern size_t strnlen(const char *string, size_t length);
#endif
#if defined(HAIKU_HOST_PLATFORM_CYGWIN)
#if defined(HAIKU_HOST_PLATFORM_CYGWIN) || defined(HAIKU_HOST_PLATFORM_SUNOS)
extern char * stpcpy(char *dest, const char *src);
extern char * strcasestr(const char *s, const char *find);
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef _HAIKU_BUILD_COMPATIBILITY_SUNOS_ENDIAN
#define _HAIKU_BUILD_COMPATIBILITY_SUNOS_ENDIAN
// There's no <endian.h> in Solaris.
#include <sys/byteorder.h>
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __PDP_ENDIAN 3412
#if defined(_LITTLE_ENDIAN)
#define BYTE_ORDER __LITTLE_ENDIAN
#elif defined(_BIG_ENDIAN)
#define BYTE_ORDER __BIG_ENDIAN
#else
#error Unable to determine byte order!
#endif
#endif // _HAIKU_BUILD_COMPATIBILITY_SUNOS_ENDIAN