Skip to content

Commit

Permalink
Move remainder of linux porting definitions to port.h
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Mar 17, 2024
1 parent eaf029a commit 79e5b34
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
24 changes: 21 additions & 3 deletions config/include/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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
Expand Down
19 changes: 0 additions & 19 deletions headers/unix.h

This file was deleted.

0 comments on commit 79e5b34

Please sign in to comment.