summaryrefslogtreecommitdiffstats
path: root/recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch')
-rw-r--r--recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch244
1 files changed, 244 insertions, 0 deletions
diff --git a/recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch b/recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch
new file mode 100644
index 0000000..14c95d7
--- /dev/null
+++ b/recipes-extended/msmtp/files/msmtp-fixup-api-and-compiler-warning.patch
@@ -0,0 +1,244 @@
1msmtp: fixup api and compiler warnings
2
3Upstream-Status: Inappropriate [upstream rewrote with GPLv3]
4
5Author: Morgan Little <morgan.little@windriver.com>
6Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
7
8diff -Naur msmtp-1.4.12.orig/configure.ac msmtp-1.4.12/configure.ac
9--- msmtp-1.4.12.orig/configure.ac
10+++ msmtp-1.4.12/configure.ac
11@@ -40,8 +40,8 @@
12 dnl System
13 case "${target}" in *-*-mingw32*) windows=yes ;; *) windows=no ;; esac
14
15-dnl gnulib
16-gl_INIT
17+#dnl gnulib
18+#gl_INIT
19
20 dnl Gettext
21 AM_GNU_GETTEXT([external])
22diff -Naur msmtp-1.4.12.orig/gnulib/base64.c msmtp-1.4.12/gnulib/base64.c
23--- msmtp-1.4.12.orig/gnulib/base64.c
24+++ msmtp-1.4.12/gnulib/base64.c
25@@ -64,8 +64,8 @@
26 possible. If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero
27 terminate the output buffer. */
28 void
29-base64_encode (const char *restrict in, size_t inlen,
30- char *restrict out, size_t outlen)
31+base64_encode (const char *in, size_t inlen,
32+ char *out, size_t outlen)
33 {
34 static const char b64str[64] =
35 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
36@@ -310,8 +310,8 @@
37 that, when applicable, you must remove any line terminators that is
38 part of the data stream before calling this function. */
39 bool
40-base64_decode (const char *restrict in, size_t inlen,
41- char *restrict out, size_t *outlen)
42+base64_decode (const char *in, size_t inlen,
43+ char *out, size_t *outlen)
44 {
45 size_t outleft = *outlen;
46
47diff -Naur msmtp-1.4.12.orig/gnulib/base64.h msmtp-1.4.12/gnulib/base64.h
48--- msmtp-1.4.12.orig/gnulib/base64.h
49+++ msmtp-1.4.12/gnulib/base64.h
50@@ -31,13 +31,13 @@
51
52 extern bool isbase64 (char ch);
53
54-extern void base64_encode (const char *restrict in, size_t inlen,
55- char *restrict out, size_t outlen);
56+extern void base64_encode (const char *in, size_t inlen,
57+ char *out, size_t outlen);
58
59 extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
60
61-extern bool base64_decode (const char *restrict in, size_t inlen,
62- char *restrict out, size_t *outlen);
63+extern bool base64_decode (const char *in, size_t inlen,
64+ char *out, size_t *outlen);
65
66 extern bool base64_decode_alloc (const char *in, size_t inlen,
67 char **out, size_t *outlen);
68diff -Naur msmtp-1.4.12.orig/gnulib/Makefile.am msmtp-1.4.12/gnulib/Makefile.am
69--- msmtp-1.4.12.orig/gnulib/Makefile.am
70+++ msmtp-1.4.12/gnulib/Makefile.am
71@@ -59,20 +59,18 @@
72
73 ## begin gnulib module crypto/hmac-md5
74
75+libgnu_a_SOURCES += hmac-md5.c
76
77 EXTRA_DIST += hmac-md5.c hmac.h
78
79-EXTRA_libgnu_a_SOURCES += hmac-md5.c
80-
81 ## end gnulib module crypto/hmac-md5
82
83 ## begin gnulib module crypto/md5
84
85+libgnu_a_SOURCES += md5.c
86
87 EXTRA_DIST += md5.c md5.h
88
89-EXTRA_libgnu_a_SOURCES += md5.c
90-
91 ## end gnulib module crypto/md5
92
93 ## begin gnulib module getdelim
94@@ -149,11 +147,10 @@
95
96 ## begin gnulib module memxor
97
98+libgnu_a_SOURCES += memxor.c
99
100 EXTRA_DIST += memxor.c memxor.h
101
102-EXTRA_libgnu_a_SOURCES += memxor.c
103-
104 ## end gnulib module memxor
105
106 ## begin gnulib module size_max
107@@ -219,47 +216,6 @@
108
109 ## end gnulib module stdint
110
111-## begin gnulib module stdio
112-
113-BUILT_SOURCES += stdio.h
114-
115-# We need the following in order to create <stdio.h> when the system
116-# doesn't have one that works with the given compiler.
117-stdio.h: stdio_.h
118- rm -f $@-t $@
119- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
120- sed -e 's|@''ABSOLUTE_STDIO_H''@|$(ABSOLUTE_STDIO_H)|g' \
121- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
122- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
123- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
124- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
125- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
126- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
127- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
128- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
129- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
130- -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
131- -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
132- -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
133- -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
134- -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
135- -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
136- -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
137- -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
138- -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
139- -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
140- -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
141- -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
142- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
143- < $(srcdir)/stdio_.h; \
144- } > $@-t
145- mv $@-t $@
146-MOSTLYCLEANFILES += stdio.h stdio.h-t
147-
148-EXTRA_DIST += stdio_.h
149-
150-## end gnulib module stdio
151-
152 ## begin gnulib module sys_socket
153
154 BUILT_SOURCES += $(SYS_SOCKET_H)
155@@ -302,40 +258,6 @@
156
157 ## end gnulib module sysexits
158
159-## begin gnulib module unistd
160-
161-BUILT_SOURCES += unistd.h
162-
163-# We need the following in order to create an empty placeholder for
164-# <unistd.h> when the system doesn't have one.
165-unistd.h: unistd_.h
166- rm -f $@-t $@
167- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
168- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
169- -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
170- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
171- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
172- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
173- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
174- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
175- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
176- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
177- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
178- -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
179- -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
180- -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
181- -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
182- -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
183- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
184- < $(srcdir)/unistd_.h; \
185- } > $@-t
186- mv $@-t $@
187-MOSTLYCLEANFILES += unistd.h unistd.h-t
188-
189-EXTRA_DIST += unistd_.h
190-
191-## end gnulib module unistd
192-
193 ## begin gnulib module vasnprintf
194
195
196@@ -375,11 +297,10 @@
197
198 ## begin gnulib module xalloc
199
200+libgnu_a_SOURCES += xmalloc.c
201
202 EXTRA_DIST += xalloc.h xmalloc.c
203
204-EXTRA_libgnu_a_SOURCES += xmalloc.c
205-
206 ## end gnulib module xalloc
207
208 ## begin gnulib module xsize
209diff -Naur msmtp-1.4.12.orig/gnulib/memxor.c msmtp-1.4.12/gnulib/memxor.c
210--- msmtp-1.4.12.orig/gnulib/memxor.c
211+++ msmtp-1.4.12/gnulib/memxor.c
212@@ -23,7 +23,7 @@
213 #include "memxor.h"
214
215 void *
216-memxor (void *restrict dest, const void *restrict src, size_t n)
217+memxor (void *dest, const void *src, size_t n)
218 {
219 char const *s = src;
220 char *d = dest;
221diff -Naur msmtp-1.4.12.orig/gnulib/memxor.h msmtp-1.4.12/gnulib/memxor.h
222--- msmtp-1.4.12.orig/gnulib/memxor.h
223+++ msmtp-1.4.12/gnulib/memxor.h
224@@ -26,6 +26,6 @@
225 /* Compute binary exclusive OR of memory areas DEST and SRC, putting
226 the result in DEST, of length N bytes. Returns a pointer to
227 DEST. */
228-void *memxor (void *restrict dest, const void *restrict src, size_t n);
229+void *memxor (void *dest, const void *src, size_t n);
230
231 #endif /* MEMXOR_H */
232diff -Naur msmtp-1.4.12.orig/gnulib/xsize.h msmtp-1.4.12/gnulib/xsize.h
233--- msmtp-1.4.12.orig/gnulib/xsize.h
234+++ msmtp-1.4.12/gnulib/xsize.h
235@@ -24,9 +24,7 @@
236
237 /* Get SIZE_MAX. */
238 #include <limits.h>
239-#if HAVE_STDINT_H
240 # include <stdint.h>
241-#endif
242
243 /* The size of memory objects is often computed through expressions of
244 type size_t. Example: