1 |
mgorny 15/02/27 21:44:56 |
2 |
|
3 |
Added: |
4 |
xorg-server-1.17-support-multiple-Files-sections.patch |
5 |
Log: |
6 |
Add support for multiple "Files" sections as needed for eselect-opengl, bug #541232. |
7 |
|
8 |
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: xorg-server-1.17-support-multiple-Files-sections.patch |
17 |
=================================================================== |
18 |
From a140d7ce3f37f30b4fed27c5a70ebcc4ed13c612 Mon Sep 17 00:00:00 2001 |
19 |
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
20 |
Date: Tue, 24 Feb 2015 12:57:24 +0100 |
21 |
Subject: [PATCH] config: Support multiple 'Files' sections |
22 |
|
23 |
--- |
24 |
hw/xfree86/parser/Files.c | 8 ++++++-- |
25 |
hw/xfree86/parser/configProcs.h | 2 +- |
26 |
hw/xfree86/parser/read.c | 2 +- |
27 |
3 files changed, 8 insertions(+), 4 deletions(-) |
28 |
|
29 |
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c |
30 |
index 849bf92..5cc3ec7 100644 |
31 |
--- a/hw/xfree86/parser/Files.c |
32 |
+++ b/hw/xfree86/parser/Files.c |
33 |
@@ -76,14 +76,18 @@ static xf86ConfigSymTabRec FilesTab[] = { |
34 |
#define CLEANUP xf86freeFiles |
35 |
|
36 |
XF86ConfFilesPtr |
37 |
-xf86parseFilesSection(void) |
38 |
+xf86parseFilesSection(XF86ConfFilesPtr ptr) |
39 |
{ |
40 |
int i, j; |
41 |
int k, l; |
42 |
char *str; |
43 |
int token; |
44 |
|
45 |
- parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) |
46 |
+ if (!ptr) { |
47 |
+ if( (ptr=calloc(1,sizeof(XF86ConfFilesRec))) == NULL ) { |
48 |
+ return NULL; |
49 |
+ } |
50 |
+ } |
51 |
|
52 |
while ((token = xf86getToken(FilesTab)) != ENDSECTION) { |
53 |
switch (token) { |
54 |
diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h |
55 |
index 774e2a2..b9fdebb 100644 |
56 |
--- a/hw/xfree86/parser/configProcs.h |
57 |
+++ b/hw/xfree86/parser/configProcs.h |
58 |
@@ -37,7 +37,7 @@ void xf86freeDeviceList(XF86ConfDevicePtr ptr); |
59 |
int xf86validateDevice(XF86ConfigPtr p); |
60 |
|
61 |
/* Files.c */ |
62 |
-XF86ConfFilesPtr xf86parseFilesSection(void); |
63 |
+XF86ConfFilesPtr xf86parseFilesSection(XF86ConfFilesPtr ptr); |
64 |
void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); |
65 |
void xf86freeFiles(XF86ConfFilesPtr p); |
66 |
|
67 |
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c |
68 |
index 327c02a..e0d6139 100644 |
69 |
--- a/hw/xfree86/parser/read.c |
70 |
+++ b/hw/xfree86/parser/read.c |
71 |
@@ -110,7 +110,7 @@ xf86readConfigFile(void) |
72 |
if (xf86nameCompare(xf86_lex_val.str, "files") == 0) { |
73 |
free(xf86_lex_val.str); |
74 |
xf86_lex_val.str = NULL; |
75 |
- HANDLE_RETURN(conf_files, xf86parseFilesSection()); |
76 |
+ HANDLE_RETURN(conf_files, xf86parseFilesSection(ptr->conf_files)); |
77 |
} |
78 |
else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) { |
79 |
free(xf86_lex_val.str); |
80 |
-- |
81 |
2.3.0 |