diff --git a/config/include/port.h b/config/include/port.h index f3a564dc6..1fb4cd6e0 100644 --- a/config/include/port.h +++ b/config/include/port.h @@ -54,14 +54,14 @@ using BYTE = U8; #define DOTDOTSLASH "..\\" // ================================== Win32 definitions #else +// ================================== linux definitions + #define _snprintf snprintf #define _vsnprintf vsnprintf #define _alloca alloca -#if defined(XFRACT) #ifndef unix #define unix #endif -#endif typedef int sigfunc(int); @@ -71,7 +71,25 @@ typedef int sigfunc(int); # define SLASHDOT "/." # define DOTSLASH "./" # define DOTDOTSLASH "../" -#endif // _WIN32 + +#if !defined(_MAX_FNAME) +#define _MAX_FNAME 20 +#endif +#if !defined(_MAX_EXT) +#define _MAX_EXT 4 +#endif + +typedef float FLOAT4; + +#define chsize(fd, en) ftruncate(fd, en) +// We get a problem with connect, since it is used by X +#define connect connect1 +typedef void (*SignalHandler)(int); +char *strlwr(char *s); +char *strupr(char *s); + +// ================================== linux definitions +#endif // Uses big_access32(), big_set32(), ... functions instead of macros. // Some little endian machines may require this as well. #if BYTE_ORDER == BIG_ENDIAN diff --git a/headers/unix.h b/headers/unix.h deleted file mode 100644 index 22c661310..000000000 --- a/headers/unix.h +++ /dev/null @@ -1,19 +0,0 @@ -// UNIX.H - unix port declarations -#pragma once - -#include - -typedef float FLOAT4; - -#if !defined(_MAX_FNAME) -#define _MAX_FNAME 20 -#endif -#if !defined(_MAX_EXT) -#define _MAX_EXT 4 -#endif -#define chsize(fd, en) ftruncate(fd, en) -// We get a problem with connect, since it is used by X -#define connect connect1 -typedef void (*SignalHandler)(int); -char *strlwr(char *s); -char *strupr(char *s);