Debian Codegraph @

debian/patches/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch

raw
1 From: Simon McVittie <[email protected]>
2 Date: Sat, 24 Jun 2017 19:37:00 +0100
3 Subject: Treat GNU/kFreeBSD and GNU/Hurd as equivalent to GNU/Linux
4
5 The GNU family of operating systems use the GNU libc and runtime linker,
6 which is the layer that this engine interacts with directly. The specific
7 kernel used is below the level that this engine is dealing with.
8
9 This is a combination of ioquake3 commits
10 https://github.com/ioquake/ioq3/commit/fd4cf3b7839ec36789627c27758478cca8f69ffe,
11 https://github.com/ioquake/ioq3/commit/58a8f5ef8bca62ea6bc4a4e0cfff65b5d28d36a0,
12 https://github.com/ioquake/ioq3/commit/d2f8b9f4bb3fda901ffd6f18074d035469832338,
13 https://github.com/ioquake/ioq3/commit/54aa7f25832cfa7a8ac7891a702758ccd88d1ba8
14 (partial) and
15 https://github.com/ioquake/ioq3/commit/540e4225cceacaf843a9d4741bfbb11ba19fdd7a,
16 variously written by Cyril Brulebois, Thilo Schulz, devhc and Svante Signell.
17
18 Bug-Debian: https://bugs.debian.org/413617
19 Bug-Debian: https://bugs.debian.org/679330
20 Forwarded: https://github.com/OpenArena/gamecode/pull/17
21 Applied-upstream: https://github.com/OpenArena/gamecode/commit/dbdae40bb755d9897e5e1e9e3b22ce351588b044.
22 Applied-upstream: https://github.com/OpenArena/gamecode/commit/732d32079b6675f8595471af7d252e190c80f006
23 ---
24 Makefile | 4 ++--
25 code/qcommon/q_platform.h | 9 ++++++++-
26 2 files changed, 10 insertions(+), 3 deletions(-)
27
28 diff --git a/Makefile b/Makefile
29 index 91fb204..023d390 100644
30 --- a/Makefile
31 +++ b/Makefile
32 @@ -4,7 +4,7 @@
33 # GNU Make required
34 #
35
36 -COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
37 +COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
38
39 COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
40
41 @@ -214,7 +214,7 @@ LIB=lib
42 INSTALL=install
43 MKDIR=mkdir
44
45 -ifeq ($(PLATFORM),linux)
46 +ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
47
48 ifeq ($(ARCH),alpha)
49 ARCH=axp
50 diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
51 index 6490ddb..cfa44b7 100644
52 --- a/code/qcommon/q_platform.h
53 +++ b/code/qcommon/q_platform.h
54 @@ -147,11 +147,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
55
56 //================================================================= LINUX ===
57
58 -#ifdef __linux__
59 +#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
60
61 #include <endian.h>
62
63 +#if defined(__linux__)
64 #define OS_STRING "linux"
65 +#elif defined(__FreeBSD_kernel__)
66 +#define OS_STRING "kFreeBSD"
67 +#else
68 +#define OS_STRING "GNU"
69 +#endif
70 +
71 #define ID_INLINE inline
72 #define PATH_SEP '/'
73