Debian Codegraph @

lib/pstypes.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef _TYPES_H
20 #define _TYPES_H
21
22 #include <cstdlib>
23 #include <cstdint>
24
25 #if defined(POSIX)
26 #include "linux_fix.h"
27 #endif
28
29 // The maximum length for a file name, including extension. It *does not* include the
30 // terminating NULL, so a buffer to hold a filename needs to be PSFILENAME_LEN+1 bytes long.
31 #define PSFILENAME_LEN 35
32
33 // The maximum length of a path (or path+filename). The seems (from looking at the code) to
34 // include the terminating NULL. lengthened to 512 to prevent problems with some long pathnames.
35 #define PSPATHNAME_LEN _MAX_PATH
36
37 #if !defined(__APPLE__)
38 #define HOST_BIGENDIAN @HOST_BIGENDIAN @
39 #else
40 #if defined(__BIG_ENDIAN__)
41 #define HOST_BIGENDIAN 1
42 #define MACOSXPPC 1
43 #elif defined(__LITTLE_ENDIAN__)
44 #define HOST_BIGENDIAN 0
45 #define MACOSX86 1
46 #else
47 #error "Unknown HOST_BIGENDIAN!"
48 #endif
49 #endif
50
51 #endif