diff --git a/acinclude.m4 b/acinclude.m4 index 4115c2f48..cfc1f07d1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -495,6 +495,7 @@ AC_DEFUN([GB_SYSTEM], *-*-darwin* | *-*-rhapsody* ) SYSTEM=MACOSX AC_DEFINE(OS_BSD, 1, [Target system is of BSD family]) + AC_DEFINE(OS_FREEBSD, 1, [Target system is FreeBSD]) AC_DEFINE(OS_MACOSX, 1, [Target system is MacOS X]) AC_DEFINE(SYSTEM, "MacOSX", [Operating system]) ;; @@ -510,6 +511,12 @@ AC_DEFUN([GB_SYSTEM], AC_DEFINE(OS_KFREEBSD, 1, [Target system is kFREEBSD]) AC_DEFINE(SYSTEM, "kFreeBSD", [Operating system]) ;; + *-gnu* ) + SYSTEM=HURD + AC_DEFINE(OS_GNU, 1, [Target system is of GNU family]) + AC_DEFINE(OS_HURD, 1, [Target system is Hurd]) + AC_DEFINE(SYSTEM, "Hurd", [Operating system]) + ;; * ) SYSTEM=UNKNOWN AC_DEFINE(SYSTEM, "unknown", [Operating system]) diff --git a/gb.net/src/CSerialPort.c b/gb.net/src/CSerialPort.c index b339524ce..c17f4bb9e 100644 --- a/gb.net/src/CSerialPort.c +++ b/gb.net/src/CSerialPort.c @@ -38,6 +38,10 @@ #define TIOCOUTQ ((unsigned int) -1) #endif /* __CYGWIN__ */ +#ifndef TIOCINQ +#define TIOCINQ FIONREAD +#endif + #include "main.h" #include "tools.h" diff --git a/main/share/gb_common.h b/main/share/gb_common.h index 69c38e217..cf1b751e3 100644 --- a/main/share/gb_common.h +++ b/main/share/gb_common.h @@ -53,10 +53,6 @@ #include #include -#ifdef OS_MACOSX -#define OS_FREEBSD -#endif - #if defined(__GNU_LIBRARY__) || defined(OS_FREEBSD) #include @@ -147,6 +143,14 @@ typedef #define LLONG_MAX 9223372036854775807LL #endif +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + #define CLEAR(s) (memset(s, 0, sizeof(*s))) /* Workaround spurious gcc warnings */