summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch90
1 files changed, 0 insertions, 90 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch
deleted file mode 100644
index 8415073e17..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-rh251682.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1Upstream-Status: Inappropriate [distribution: fedora]
22008-04-01 Jakub Jelinek <jakub@redhat.com>
3
4 PR pch/13675
5 * files.c (struct _cpp_file): Remove pch field.
6 (pch_open_file): Don't set file->pch, just file->pchname.
7 (should_stack_file): After pfile->cb.read_pch call
8 free pchname and clear pchname, don't close file->fd.
9 Test file->pchname instead of file->pch. Don't close fd after cb.
10 (_cpp_stack_include): Test file->pchname instead of file->pch.
11
12 * c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
13
14--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
15+++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
16@@ -106,9 +106,6 @@ struct _cpp_file
17
18 /* If BUFFER above contains the true contents of the file. */
19 bool buffer_valid;
20-
21- /* File is a PCH (on return from find_include_file). */
22- bool pch;
23 };
24
25 /* A singly-linked list for all searches for a given file name, with
26@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
27 }
28 closedir (pchdir);
29 }
30- if (valid)
31- file->pch = true;
32- else
33+ if (!valid)
34 *invalid_pch = true;
35 }
36
37@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
38 return false;
39
40 /* Handle PCH files immediately; don't stack them. */
41- if (file->pch)
42+ if (file->pchname)
43 {
44 pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
45- close (file->fd);
46 file->fd = -1;
47+ free ((void *) file->pchname);
48+ file->pchname = NULL;
49 return false;
50 }
51
52@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
53 complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
54 found a PCH file (in which case linemap_add is not called) or we
55 were included from the command-line. */
56- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
57+ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
58 pfile->line_table->highest_location--;
59
60 return _cpp_stack_file (pfile, file, type == IT_IMPORT);
61--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
62+++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
63@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
64 if (f == NULL)
65 {
66 cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
67+ close (fd);
68 return;
69 }
70
71@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
72 if (fread (&h, sizeof (h), 1, f) != 1)
73 {
74 cpp_errno (pfile, CPP_DL_ERROR, "reading");
75+ fclose (f);
76 return;
77 }
78
79@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
80 gt_pch_restore (f);
81
82 if (cpp_read_state (pfile, name, f, smd) != 0)
83- return;
84+ {
85+ fclose (f);
86+ return;
87+ }
88
89 fclose (f);
90