1 |
commit: 2ad01f6e3a8f8c13813f373706355a9f24a499d7 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 20 19:13:23 2015 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 20 19:13:23 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=2ad01f6e |
7 |
|
8 |
Include changes for GCC 5 in Emacs 18.59 patchset. |
9 |
|
10 |
emacs/18.59/11_all_gcc-warnings.patch | 94 +++++++++++++++++++++++++++++++++++ |
11 |
emacs/18.59/12_all_etc-cflags.patch | 21 ++++++++ |
12 |
emacs/18.59/13_all_malloc.patch | 27 ++++++++++ |
13 |
3 files changed, 142 insertions(+) |
14 |
|
15 |
diff --git a/emacs/18.59/11_all_gcc-warnings.patch b/emacs/18.59/11_all_gcc-warnings.patch |
16 |
new file mode 100644 |
17 |
index 0000000..c950304 |
18 |
--- /dev/null |
19 |
+++ b/emacs/18.59/11_all_gcc-warnings.patch |
20 |
@@ -0,0 +1,94 @@ |
21 |
+--- emacs-18.59-orig/src/ChangeLog |
22 |
++++ emacs-18.59/src/ChangeLog |
23 |
+@@ -1,3 +1,11 @@ |
24 |
++2015-12-19 Ulrich Mueller <ulm@g.o> |
25 |
++ |
26 |
++ Fix a couple of compiler warnings. |
27 |
++ * buffer.c (init_buffer): Use getcwd(3) instead of getwd(3). |
28 |
++ * callproc.c (Fcall_process): Check for errors of pipe(2). |
29 |
++ (child_setup): Check for errors of chdir(2). |
30 |
++ * process.c (sigchld_handler): Add type cast. |
31 |
++ |
32 |
+ 2012-06-28 Ulrich Mueller <ulm@g.o> |
33 |
+ |
34 |
+ Support x32 ABI on x86_64 architecture. |
35 |
+--- emacs-18.59-orig/src/buffer.c |
36 |
++++ emacs-18.59/src/buffer.c |
37 |
+@@ -1131,8 +1131,8 @@ |
38 |
+ char buf[MAXPATHLEN+1]; |
39 |
+ |
40 |
+ Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
41 |
+- if (getwd (buf) == 0) |
42 |
+- fatal ("`getwd' failed: %s.\n", buf); |
43 |
++ if (getcwd (buf, MAXPATHLEN+1) == 0) |
44 |
++ fatal ("`getcwd' failed: %s.\n", buf); |
45 |
+ |
46 |
+ #ifndef VMS |
47 |
+ /* Maybe this should really use some standard subroutine |
48 |
+--- emacs-18.59-orig/src/callproc.c |
49 |
++++ emacs-18.59/src/callproc.c |
50 |
+@@ -184,7 +184,10 @@ |
51 |
+ #endif /* not VMS */ |
52 |
+ else |
53 |
+ { |
54 |
+- pipe (fd); |
55 |
++ if (pipe (fd) < 0) { |
56 |
++ close (filefd); |
57 |
++ report_file_error ("Creating pipe", Qnil); |
58 |
++ } |
59 |
+ #if 0 |
60 |
+ /* Replaced by close_process_descs */ |
61 |
+ set_exclusive_use (fd[0]); |
62 |
+@@ -362,7 +365,8 @@ |
63 |
+ bcopy (XSTRING (current_buffer->directory)->data, temp, i); |
64 |
+ if (temp[i - 1] != '/') temp[i++] = '/'; |
65 |
+ temp[i] = 0; |
66 |
+- chdir (temp); |
67 |
++ if (chdir (temp) < 0) |
68 |
++ _exit (1); |
69 |
+ } |
70 |
+ |
71 |
+ #ifndef MAINTAIN_ENVIRONMENT |
72 |
+--- emacs-18.59-orig/src/process.c |
73 |
++++ emacs-18.59/src/process.c |
74 |
+@@ -2517,7 +2517,7 @@ |
75 |
+ if (WIFEXITED (w)) |
76 |
+ synch_process_retcode = WRETCODE (w); |
77 |
+ else if (WIFSIGNALED (w)) |
78 |
+- synch_process_death = sys_siglist[WTERMSIG (w)]; |
79 |
++ synch_process_death = (char *) sys_siglist[WTERMSIG (w)]; |
80 |
+ } |
81 |
+ |
82 |
+ /* On some systems, we must return right away. |
83 |
+--- emacs-18.59-orig/etc/ChangeLog |
84 |
++++ emacs-18.59/etc/ChangeLog |
85 |
+@@ -1,3 +1,7 @@ |
86 |
++2015-12-19 Ulrich Mueller <ulm@g.o> |
87 |
++ |
88 |
++ * etags.c (main): Check for errors of system(3). |
89 |
++ |
90 |
+ 2012-06-28 Ulrich Mueller <ulm@g.o> |
91 |
+ |
92 |
+ * fakemail.c (make_file_preface): time(2) returns a value of |
93 |
+--- emacs-18.59-orig/etc/etags.c |
94 |
++++ emacs-18.59/etc/etags.c |
95 |
+@@ -342,7 +342,8 @@ |
96 |
+ sprintf(cmd, |
97 |
+ "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS", |
98 |
+ outfile, av[i], outfile); |
99 |
+- system(cmd); |
100 |
++ if (system(cmd) != 0) |
101 |
++ fatal ("%s", "failed to execute shell command"); |
102 |
+ } |
103 |
+ aflag++; |
104 |
+ } |
105 |
+@@ -359,7 +360,8 @@ |
106 |
+ if (uflag) |
107 |
+ { |
108 |
+ sprintf(cmd, "sort %s -o %s", outfile, outfile); |
109 |
+- system(cmd); |
110 |
++ if (system(cmd) != 0) |
111 |
++ fatal ("%s", "failed to execute shell command"); |
112 |
+ } |
113 |
+ #endif |
114 |
+ exit(GOOD); |
115 |
|
116 |
diff --git a/emacs/18.59/12_all_etc-cflags.patch b/emacs/18.59/12_all_etc-cflags.patch |
117 |
new file mode 100644 |
118 |
index 0000000..46e8f62 |
119 |
--- /dev/null |
120 |
+++ b/emacs/18.59/12_all_etc-cflags.patch |
121 |
@@ -0,0 +1,21 @@ |
122 |
+--- emacs-18.59-orig/etc/ChangeLog |
123 |
++++ emacs-18.59/etc/ChangeLog |
124 |
+@@ -1,3 +1,7 @@ |
125 |
++2015-12-20 Ulrich Mueller <ulm@g.o> |
126 |
++ |
127 |
++ * Makefile (test-distrib): Respect CFLAGS and LDFLAGS. |
128 |
++ |
129 |
+ 2015-12-19 Ulrich Mueller <ulm@g.o> |
130 |
+ |
131 |
+ * etags.c (main): Check for errors of system(3). |
132 |
+--- emacs-18.59-orig/etc/Makefile |
133 |
++++ emacs-18.59/etc/Makefile |
134 |
+@@ -21,7 +21,7 @@ |
135 |
+ # whatever means were used to copy and distribute Emacs. |
136 |
+ # If they were clobbered, all the .elc files were clobbered too. |
137 |
+ test-distrib: test-distrib.c |
138 |
+- $(CC) -o test-distrib test-distrib.c |
139 |
++ $(CC) -o test-distrib ${CFLAGS} ${LDFLAGS} test-distrib.c |
140 |
+ ./test-distrib |
141 |
+ |
142 |
+ etags: etags.c |
143 |
|
144 |
diff --git a/emacs/18.59/13_all_malloc.patch b/emacs/18.59/13_all_malloc.patch |
145 |
new file mode 100644 |
146 |
index 0000000..80756f9 |
147 |
--- /dev/null |
148 |
+++ b/emacs/18.59/13_all_malloc.patch |
149 |
@@ -0,0 +1,27 @@ |
150 |
+--- emacs-18.59-orig/src/ChangeLog |
151 |
++++ emacs-18.59/src/ChangeLog |
152 |
+@@ -1,3 +1,8 @@ |
153 |
++2015-12-20 Ulrich Mueller <ulm@g.o> |
154 |
++ |
155 |
++ * s-linux.h (SYSTEM_MALLOC): Define. Fixes hanging at runtime |
156 |
++ when compiled with GCC 5.3. |
157 |
++ |
158 |
+ 2015-12-19 Ulrich Mueller <ulm@g.o> |
159 |
+ |
160 |
+ Fix a couple of compiler warnings. |
161 |
+--- emacs-18.59-orig/src/s-linux.h |
162 |
++++ emacs-18.59/src/s-linux.h |
163 |
+@@ -218,13 +218,7 @@ |
164 |
+ performed in x11term.c (x_init_1). */ |
165 |
+ #define SYSV_STREAMS |
166 |
+ |
167 |
+-/* note: system malloc does not work with shared libs |
168 |
+- This was reported with earlier versions of linux (libc 4). |
169 |
+- Still true? |
170 |
+- */ |
171 |
+-#if 0 /* choose for yourself */ |
172 |
+ #define SYSTEM_MALLOC /* produces smaller binary */ |
173 |
+-#endif |
174 |
+ |
175 |
+ /* misc. kludges for linux */ |
176 |
+ #if !(defined (__GLIBC__) && (__GLIBC__ >= 2)) |