configure & build: Add basic support for building with MSYS.

Also remove the MINGW support, as it was far too incomplete.

This *should* work under case-sensitive NTFS, but instead,
it seems #14963 occurs. So perhaps there is a GCC bug
related to case-sensitive vs. case-insensitivity after all.
This commit is contained in:
Augustin Cavalier
2020-05-03 13:24:26 -04:00
parent c39f9cc827
commit 7a617f59fd
7 changed files with 13 additions and 50 deletions
+5 -24
View File
@@ -1,22 +1,7 @@
#ifndef BEOS_BUILD_COMPATIBILITY_H
#define BEOS_BUILD_COMPATIBILITY_H
// These things have to be done before anything is included
#if defined(HAIKU_HOST_PLATFORM_MINGW)
#define _MODE_T_
#define _POSIX_
typedef int mode_t;
#include <stdint.h>
#include <limits.h>
typedef uint32_t uid_t;
typedef uint32_t gid_t;
#include <io.h>
#define mkdir(path, mode) mkdir(path)
#endif
// DEFFILEMODE is not available on MinGW and on platforms with MUSL
// DEFFILEMODE is not available on platforms with MUSL
#ifndef DEFFILEMODE
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
@@ -33,6 +18,10 @@ typedef uint32_t gid_t;
typedef unsigned long haiku_build_addr_t;
#define addr_t haiku_build_addr_t
#if defined(HAIKU_HOST_PLATFORM_MSYS)
#define __addr_t_defined
#endif
#include <Errors.h>
#include <fcntl.h>
@@ -41,10 +30,7 @@ typedef unsigned long haiku_build_addr_t;
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#if !defined(HAIKU_HOST_PLATFORM_MINGW)
#include <sys/uio.h>
#endif
#ifdef __cplusplus
extern "C" {
@@ -62,11 +48,6 @@ 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_MINGW)
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);
-15
View File
@@ -1,15 +0,0 @@
#ifndef _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN
#define _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN
// There's no <endian.h> in MinGW.
#include <sys/param.h>
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#define __BIG_ENDIAN BIG_ENDIAN
#define __BYTE_ORDER BYTE_ORDER
#endif // _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN