diff --git a/headers/build/BeOSBuildCompatibility.h b/headers/build/BeOSBuildCompatibility.h index 398f34267c..23d39ce48e 100644 --- a/headers/build/BeOSBuildCompatibility.h +++ b/headers/build/BeOSBuildCompatibility.h @@ -1,6 +1,22 @@ #ifndef 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 +#endif + typedef unsigned long 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); #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 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); @@ -62,7 +83,6 @@ extern char *_haiku_build_strerror(int errnum); #endif - #ifdef __cplusplus } // extern "C" #endif diff --git a/src/build/libroot/Jamfile b/src/build/libroot/Jamfile index fcf5731de2..f57629fbb7 100644 --- a/src/build/libroot/Jamfile +++ b/src/build/libroot/Jamfile @@ -27,6 +27,10 @@ if $(HOST_PLATFORM) != darwin { strlSources = strlcpy.c strlcat.c ; } +if $(HOST_PLATFORM) = cygwin { + strlSources += stpcpy.c strcasestr.c ; +} + local hostPlatformSources ; if $(HOST_PLATFORM) = freebsd { hostPlatformSources = fs_freebsd.cpp ; diff --git a/src/build/libroot/errors.cpp b/src/build/libroot/errors.cpp index 30871dbbaf..3b34c97a74 100644 --- a/src/build/libroot/errors.cpp +++ b/src/build/libroot/errors.cpp @@ -75,7 +75,9 @@ init_error_map() ADD_ERROR(ENOTSOCK); ADD_ERROR(EHOSTDOWN); ADD_ERROR(EBADMSG); - ADD_ERROR(ECANCELED); + #ifdef ECANCELED + ADD_ERROR(ECANCELED); + #endif ADD_ERROR(EDESTADDRREQ); ADD_ERROR(EDQUOT); ADD_ERROR(EIDRM);