Fix #4747 - errnoconvert wrapper for all

This commit is contained in:
pancake 2016-05-02 13:04:59 +02:00
parent 8500509605
commit 741b151d02
2 changed files with 4 additions and 7 deletions

View File

@ -18,9 +18,7 @@
#define EXTRACT_UNSIGNED_INTEGER(addr, len) \
extract_unsigned_integer ((const ut8 *)addr, len, 0)
#if defined(__linux__) || defined(__WINDOWS__) || defined(__APPLE__) || defined(__NetBSD__)
int errnoconvert (int x);
#endif
enum target_signal target_signal_from_nto (int sig);

View File

@ -82,9 +82,7 @@ static int i386nto_gregset_reg_offset[] = {
#define NTO_EILSEQ 88
#define NTO_ENOSYS 89
#if defined(__QNXNTO__) || defined(__SOLARIS__)
#define errnoconvert(x) x
#elif defined(__linux__) || defined(__WINDOWS__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(MINGW32) || defined(__NetBSD__)
#if defined(__linux__) || defined(__WINDOWS__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(MINGW32) || defined(__NetBSD__)
struct errnomap_t {
int nto;
@ -125,9 +123,10 @@ int errnoconvert (int x) {
return x;
}
#define errnoconvert(x) errnoconvert (x)
#else
#error errno mapping not setup for this host
int errnoconvert (int x) {
return x;
}
#endif /* __QNXNTO__ */
LONGEST