File: gcc10.patch

package info (click to toggle)
blastem 0.6.3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,048 kB
  • sloc: ansic: 75,683; python: 2,899; java: 1,590; asm: 461; makefile: 313; sh: 207; xml: 67
file content (107 lines) | stat: -rw-r--r-- 1,913 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Fix FTBFS with GCC 10
 Don't declare variables for enums, as they would otherwise be recognized
 as multiple declarations when the headers are included in multiple files.
 As the variables are not actually used, just use the variable name as the
 enum name.
 Also declare two dummy functions that are used in vdp.c, but not part of
 a source files linked into the test binary.
Bug-Debian: https://bugs.debian.org/957048

--- a/vdp.h
+++ b/vdp.h
@@ -66,7 +66,7 @@
 
 #define DISPLAY_ENABLE 0x40
 
-enum {
+enum vdp_regs {
 	REG_MODE_1=0,
 	REG_MODE_2,
 	REG_SCROLL_A,
@@ -91,7 +91,7 @@
 	REG_DMASRC_L,
 	REG_DMASRC_M,
 	REG_DMASRC_H
-} vdp_regs;
+};
 
 //Mode reg 1
 #define BIT_VSCRL_LOCK 0x80
--- a/gen_x86.h
+++ b/gen_x86.h
@@ -9,7 +9,7 @@
 #include <stdint.h>
 #include "gen.h"
 
-enum {
+enum x86_regs {
 	RAX = 0,
 	RCX,
 	RDX,
@@ -30,9 +30,9 @@
 	R13,
 	R14,
 	R15
-} x86_regs;
+};
 
-enum {
+enum x86_cc {
 	CC_O = 0,
 	CC_NO,
 	CC_C,
@@ -51,14 +51,14 @@
 	CC_GE,
 	CC_LE,
 	CC_G
-} x86_cc;
+};
 
-enum {
+enum x86_size {
 	SZ_B = 0,
 	SZ_W,
 	SZ_D,
 	SZ_Q
-} x86_size;
+};
 
 #ifdef X86_64
 #define SZ_PTR SZ_Q
@@ -75,7 +75,7 @@
 #define MAX_INST_LEN 11
 #endif
 
-enum {
+enum x86_modes {
 	MODE_REG_INDIRECT = 0,
 	MODE_REG_INDEXED = 4,
 	MODE_REG_DISPLACE8 = 0x40,
@@ -85,7 +85,7 @@
 	MODE_REG_DIRECT = 0xC0,
 //"phony" mode
 	MODE_IMMED = 0xFF
-} x86_modes;
+};
 
 void rol_ir(code_info *code, uint8_t val, uint8_t dst, uint8_t size);
 void ror_ir(code_info *code, uint8_t val, uint8_t dst, uint8_t size);
--- a/test.c
+++ b/test.c
@@ -15,6 +15,15 @@
 	return 0;
 }
 
+uint32_t *render_get_framebuffer(uint8_t which, int *pitch)
+{
+	return NULL;
+}
+
+void render_framebuffer_updated(uint8_t which, int width)
+{
+}
+
 /* void render_alloc_surfaces(vdp_context * context)
 {
 	context->oddbuf = context->framebuf = malloc(512 * 256 * 4 * 2);