julun+mauricek:
* Cygwin needs some additional defines compared to other platforms * Additionally stpcpy and strcasestr are unknown on Cygwin. Thus we need to use the one from our posix library. * ECANCELED is not defined on Cygwin, so only add error in case it is. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26584 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e688a433ca
commit
59c40b2f95
@ -1,6 +1,22 @@
|
|||||||
#ifndef BEOS_BUILD_COMPATIBILITY_H
|
#ifndef BEOS_BUILD_COMPATIBILITY_H
|
||||||
#define BEOS_BUILD_COMPATIBILITY_H
|
#define BEOS_BUILD_COMPATIBILITY_H
|
||||||
|
|
||||||
|
#if defined(HAIKU_HOST_PLATFORM_CYGWIN)
|
||||||
|
#ifndef __addr_t_defined
|
||||||
|
#define __addr_t_defined
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DEFFILEMODE
|
||||||
|
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_IUMSK
|
||||||
|
#define S_IUMSK 07777
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned long haiku_build_addr_t;
|
typedef unsigned long haiku_build_addr_t;
|
||||||
#define addr_t haiku_build_addr_t
|
#define addr_t haiku_build_addr_t
|
||||||
|
|
||||||
@ -27,6 +43,11 @@ extern size_t strlcat(char *dest, const char *source, size_t length);
|
|||||||
extern size_t strnlen(const char *string, size_t length);
|
extern size_t strnlen(const char *string, size_t length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAIKU_HOST_PLATFORM_CYGWIN)
|
||||||
|
extern char * stpcpy(char *dest, const char *src);
|
||||||
|
extern char * strcasestr(const char *s, const char *find);
|
||||||
|
#endif
|
||||||
|
|
||||||
// BeOS only
|
// BeOS only
|
||||||
extern ssize_t read_pos(int fd, off_t pos, void *buffer, size_t count);
|
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);
|
extern ssize_t write_pos(int fd, off_t pos, const void *buffer, size_t count);
|
||||||
@ -62,7 +83,6 @@ extern char *_haiku_build_strerror(int errnum);
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,6 +27,10 @@ if $(HOST_PLATFORM) != darwin {
|
|||||||
strlSources = strlcpy.c strlcat.c ;
|
strlSources = strlcpy.c strlcat.c ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $(HOST_PLATFORM) = cygwin {
|
||||||
|
strlSources += stpcpy.c strcasestr.c ;
|
||||||
|
}
|
||||||
|
|
||||||
local hostPlatformSources ;
|
local hostPlatformSources ;
|
||||||
if $(HOST_PLATFORM) = freebsd {
|
if $(HOST_PLATFORM) = freebsd {
|
||||||
hostPlatformSources = fs_freebsd.cpp ;
|
hostPlatformSources = fs_freebsd.cpp ;
|
||||||
|
@ -75,7 +75,9 @@ init_error_map()
|
|||||||
ADD_ERROR(ENOTSOCK);
|
ADD_ERROR(ENOTSOCK);
|
||||||
ADD_ERROR(EHOSTDOWN);
|
ADD_ERROR(EHOSTDOWN);
|
||||||
ADD_ERROR(EBADMSG);
|
ADD_ERROR(EBADMSG);
|
||||||
ADD_ERROR(ECANCELED);
|
#ifdef ECANCELED
|
||||||
|
ADD_ERROR(ECANCELED);
|
||||||
|
#endif
|
||||||
ADD_ERROR(EDESTADDRREQ);
|
ADD_ERROR(EDESTADDRREQ);
|
||||||
ADD_ERROR(EDQUOT);
|
ADD_ERROR(EDQUOT);
|
||||||
ADD_ERROR(EIDRM);
|
ADD_ERROR(EIDRM);
|
||||||
|
Loading…
Reference in New Issue
Block a user