diff options
Diffstat (limited to 'meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch')
-rw-r--r-- | meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch | 363 |
1 files changed, 363 insertions, 0 deletions
diff --git a/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch new file mode 100644 index 0000000000..e97e30e846 --- /dev/null +++ b/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch | |||
@@ -0,0 +1,363 @@ | |||
1 | From 88adbe1a855b7aa95bd925c80ed83c86f3fc42e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 6 Nov 2016 09:39:31 -0800 | ||
4 | Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | include/bsd/err.h | 10 ++++++++-- | ||
11 | include/bsd/libutil.h | 10 ++++++++-- | ||
12 | include/bsd/md5.h | 10 ++++++++-- | ||
13 | include/bsd/nlist.h | 10 ++++++++-- | ||
14 | include/bsd/readpassphrase.h | 10 ++++++++-- | ||
15 | include/bsd/stdio.h | 10 ++++++++-- | ||
16 | include/bsd/stdlib.h | 10 ++++++++-- | ||
17 | include/bsd/string.h | 10 ++++++++-- | ||
18 | include/bsd/stringlist.h | 10 ++++++++-- | ||
19 | include/bsd/unistd.h | 10 ++++++++-- | ||
20 | include/bsd/vis.h | 10 ++++++++-- | ||
21 | include/bsd/wchar.h | 10 ++++++++-- | ||
22 | src/hash/sha512.h | 10 ++++++++-- | ||
23 | 13 files changed, 104 insertions(+), 26 deletions(-) | ||
24 | |||
25 | diff --git a/include/bsd/err.h b/include/bsd/err.h | ||
26 | index 12fd051..43dfc32 100644 | ||
27 | --- a/include/bsd/err.h | ||
28 | +++ b/include/bsd/err.h | ||
29 | @@ -42,7 +42,10 @@ | ||
30 | |||
31 | #include <stdarg.h> | ||
32 | |||
33 | -__BEGIN_DECLS | ||
34 | +/* __BEGIN_DECLS */ | ||
35 | +#ifdef __cplusplus | ||
36 | +extern "C" { | ||
37 | +#endif | ||
38 | void warnc(int code, const char *format, ...) | ||
39 | __printflike(2, 3); | ||
40 | void vwarnc(int code, const char *format, va_list ap) | ||
41 | @@ -51,6 +54,9 @@ void errc(int status, int code, const char *format, ...) | ||
42 | __printflike(3, 4); | ||
43 | void verrc(int status, int code, const char *format, va_list ap) | ||
44 | __printflike(3, 0); | ||
45 | -__END_DECLS | ||
46 | +#ifdef __cplusplus | ||
47 | +} | ||
48 | +#endif | ||
49 | +/* __END_DECLS */ | ||
50 | |||
51 | #endif | ||
52 | diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h | ||
53 | index ebb6160..28b919d 100644 | ||
54 | --- a/include/bsd/libutil.h | ||
55 | +++ b/include/bsd/libutil.h | ||
56 | @@ -53,7 +53,10 @@ struct pidfh { | ||
57 | ino_t pf_ino; | ||
58 | }; | ||
59 | |||
60 | -__BEGIN_DECLS | ||
61 | +/* __BEGIN_DECLS */ | ||
62 | +#ifdef __cplusplus | ||
63 | +extern "C" { | ||
64 | +#endif | ||
65 | int humanize_number(char *buf, size_t len, int64_t bytes, | ||
66 | const char *suffix, int scale, int flags); | ||
67 | int expand_number(const char *_buf, uint64_t *_num); | ||
68 | @@ -66,7 +69,10 @@ int pidfile_close(struct pidfh *pfh); | ||
69 | int pidfile_remove(struct pidfh *pfh); | ||
70 | |||
71 | char *fparseln(FILE *, size_t *, size_t *, const char[3], int); | ||
72 | -__END_DECLS | ||
73 | +#ifdef __cplusplus | ||
74 | +} | ||
75 | +#endif | ||
76 | +/* __END_DECLS */ | ||
77 | |||
78 | /* humanize_number(3) */ | ||
79 | #define HN_DECIMAL 0x01 | ||
80 | diff --git a/include/bsd/md5.h b/include/bsd/md5.h | ||
81 | index 9a75fad..3531fd6 100644 | ||
82 | --- a/include/bsd/md5.h | ||
83 | +++ b/include/bsd/md5.h | ||
84 | @@ -30,7 +30,10 @@ typedef struct MD5Context { | ||
85 | #include <sys/cdefs.h> | ||
86 | #include <sys/types.h> | ||
87 | |||
88 | -__BEGIN_DECLS | ||
89 | +/* __BEGIN_DECLS */ | ||
90 | +#ifdef __cplusplus | ||
91 | +extern "C" { | ||
92 | +#endif | ||
93 | void MD5Init(MD5_CTX *); | ||
94 | void MD5Update(MD5_CTX *, const uint8_t *, size_t) | ||
95 | __attribute__((__bounded__(__string__,2,3))); | ||
96 | @@ -49,6 +52,9 @@ char *MD5FileChunk(const char *, char *, off_t, off_t) | ||
97 | char *MD5Data(const uint8_t *, size_t, char *) | ||
98 | __attribute__((__bounded__(__string__,1,2))) | ||
99 | __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH))); | ||
100 | -__END_DECLS | ||
101 | +#ifdef __cplusplus | ||
102 | +} | ||
103 | +#endif | ||
104 | +/* __END_DECLS */ | ||
105 | |||
106 | #endif /* _MD5_H_ */ | ||
107 | diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h | ||
108 | index 2730237..0389ab7 100644 | ||
109 | --- a/include/bsd/nlist.h | ||
110 | +++ b/include/bsd/nlist.h | ||
111 | @@ -30,8 +30,14 @@ | ||
112 | #include <sys/cdefs.h> | ||
113 | #include <a.out.h> | ||
114 | |||
115 | -__BEGIN_DECLS | ||
116 | +/* __BEGIN_DECLS */ | ||
117 | +#ifdef __cplusplus | ||
118 | +extern "C" { | ||
119 | +#endif | ||
120 | extern int nlist(const char *filename, struct nlist *list); | ||
121 | -__END_DECLS | ||
122 | +#ifdef __cplusplus | ||
123 | +} | ||
124 | +#endif | ||
125 | +/* __END_DECLS */ | ||
126 | |||
127 | #endif | ||
128 | diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h | ||
129 | index e1dacc3..76e0d33 100644 | ||
130 | --- a/include/bsd/readpassphrase.h | ||
131 | +++ b/include/bsd/readpassphrase.h | ||
132 | @@ -34,8 +34,14 @@ | ||
133 | #include <sys/cdefs.h> | ||
134 | #include <sys/types.h> | ||
135 | |||
136 | -__BEGIN_DECLS | ||
137 | +/* __BEGIN_DECLS */ | ||
138 | +#ifdef __cplusplus | ||
139 | +extern "C" { | ||
140 | +#endif | ||
141 | char * readpassphrase(const char *, char *, size_t, int); | ||
142 | -__END_DECLS | ||
143 | +#ifdef __cplusplus | ||
144 | +} | ||
145 | +#endif | ||
146 | +/* __END_DECLS */ | ||
147 | |||
148 | #endif /* !_READPASSPHRASE_H_ */ | ||
149 | diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h | ||
150 | index 7697425..b5b3efd 100644 | ||
151 | --- a/include/bsd/stdio.h | ||
152 | +++ b/include/bsd/stdio.h | ||
153 | @@ -41,7 +41,10 @@ | ||
154 | #include <sys/cdefs.h> | ||
155 | #include <sys/types.h> | ||
156 | |||
157 | -__BEGIN_DECLS | ||
158 | +/* __BEGIN_DECLS */ | ||
159 | +#ifdef __cplusplus | ||
160 | +extern "C" { | ||
161 | +#endif | ||
162 | const char *fmtcheck(const char *, const char *); | ||
163 | |||
164 | /* XXX: The function requires cooperation from the system libc to store the | ||
165 | @@ -69,7 +72,10 @@ FILE *funopen(const void *cookie, | ||
166 | #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL) | ||
167 | |||
168 | int fpurge(FILE *fp); | ||
169 | -__END_DECLS | ||
170 | +#ifdef __cplusplus | ||
171 | +} | ||
172 | +#endif | ||
173 | +/* __END_DECLS */ | ||
174 | |||
175 | #endif | ||
176 | #endif | ||
177 | diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h | ||
178 | index 0604cad..b9f0515 100644 | ||
179 | --- a/include/bsd/stdlib.h | ||
180 | +++ b/include/bsd/stdlib.h | ||
181 | @@ -46,7 +46,10 @@ | ||
182 | #include <sys/stat.h> | ||
183 | #include <stdint.h> | ||
184 | |||
185 | -__BEGIN_DECLS | ||
186 | +/* __BEGIN_DECLS */ | ||
187 | +#ifdef __cplusplus | ||
188 | +extern "C" { | ||
189 | +#endif | ||
190 | uint32_t arc4random(void); | ||
191 | void arc4random_stir(void); | ||
192 | void arc4random_addrandom(u_char *dat, int datlen); | ||
193 | @@ -73,6 +76,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval, | ||
194 | const char **errstr); | ||
195 | |||
196 | char *getbsize(int *headerlenp, long *blocksizep); | ||
197 | -__END_DECLS | ||
198 | +#ifdef __cplusplus | ||
199 | +} | ||
200 | +#endif | ||
201 | +/* __END_DECLS */ | ||
202 | |||
203 | #endif | ||
204 | diff --git a/include/bsd/string.h b/include/bsd/string.h | ||
205 | index ee2f953..fbf8c54 100644 | ||
206 | --- a/include/bsd/string.h | ||
207 | +++ b/include/bsd/string.h | ||
208 | @@ -36,13 +36,19 @@ | ||
209 | #include <sys/cdefs.h> | ||
210 | #include <sys/types.h> | ||
211 | |||
212 | -__BEGIN_DECLS | ||
213 | +/* __BEGIN_DECLS */ | ||
214 | +#ifdef __cplusplus | ||
215 | +extern "C" { | ||
216 | +#endif | ||
217 | size_t strlcpy(char *dst, const char *src, size_t siz); | ||
218 | size_t strlcat(char *dst, const char *src, size_t siz); | ||
219 | char *strnstr(const char *str, const char *find, size_t str_len); | ||
220 | void strmode(mode_t mode, char *str); | ||
221 | |||
222 | void explicit_bzero(void *buf, size_t len); | ||
223 | -__END_DECLS | ||
224 | +#ifdef __cplusplus | ||
225 | +} | ||
226 | +#endif | ||
227 | +/* __END_DECLS */ | ||
228 | |||
229 | #endif | ||
230 | diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h | ||
231 | index e3c42e9..40d0a52 100644 | ||
232 | --- a/include/bsd/stringlist.h | ||
233 | +++ b/include/bsd/stringlist.h | ||
234 | @@ -43,12 +43,18 @@ typedef struct _stringlist { | ||
235 | size_t sl_cur; | ||
236 | } StringList; | ||
237 | |||
238 | -__BEGIN_DECLS | ||
239 | +/* __BEGIN_DECLS */ | ||
240 | +#ifdef __cplusplus | ||
241 | +extern "C" { | ||
242 | +#endif | ||
243 | StringList *sl_init(void); | ||
244 | int sl_add(StringList *, char *); | ||
245 | void sl_free(StringList *, int); | ||
246 | char *sl_find(StringList *, const char *); | ||
247 | int sl_delete(StringList *, const char *, int); | ||
248 | -__END_DECLS | ||
249 | +#ifdef __cplusplus | ||
250 | +} | ||
251 | +#endif | ||
252 | +/* __END_DECLS */ | ||
253 | |||
254 | #endif /* _STRINGLIST_H */ | ||
255 | diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h | ||
256 | index 1f9c5f8..5b2f4c7 100644 | ||
257 | --- a/include/bsd/unistd.h | ||
258 | +++ b/include/bsd/unistd.h | ||
259 | @@ -45,7 +45,10 @@ | ||
260 | #define S_ISTXT S_ISVTX | ||
261 | #endif | ||
262 | |||
263 | -__BEGIN_DECLS | ||
264 | +/* __BEGIN_DECLS */ | ||
265 | +#ifdef __cplusplus | ||
266 | +extern "C" { | ||
267 | +#endif | ||
268 | extern int optreset; | ||
269 | |||
270 | #ifdef LIBBSD_OVERLAY | ||
271 | @@ -68,6 +71,9 @@ void setproctitle(const char *fmt, ...) | ||
272 | __printflike(1, 2); | ||
273 | |||
274 | int getpeereid(int s, uid_t *euid, gid_t *egid); | ||
275 | -__END_DECLS | ||
276 | +#ifdef __cplusplus | ||
277 | +} | ||
278 | +#endif | ||
279 | +/* __END_DECLS */ | ||
280 | |||
281 | #endif | ||
282 | diff --git a/include/bsd/vis.h b/include/bsd/vis.h | ||
283 | index 835d2d6..63c951e 100644 | ||
284 | --- a/include/bsd/vis.h | ||
285 | +++ b/include/bsd/vis.h | ||
286 | @@ -74,7 +74,10 @@ | ||
287 | |||
288 | #include <sys/cdefs.h> | ||
289 | |||
290 | -__BEGIN_DECLS | ||
291 | +/* __BEGIN_DECLS */ | ||
292 | +#ifdef __cplusplus | ||
293 | +extern "C" { | ||
294 | +#endif | ||
295 | char *vis(char *, int, int, int); | ||
296 | int strvis(char *, const char *, int); | ||
297 | int strvisx(char *, const char *, size_t, int); | ||
298 | @@ -83,6 +86,9 @@ int strunvis(char *, const char *); | ||
299 | int strunvisx(char *, const char *, int); | ||
300 | ssize_t strnunvis(char *, const char *, size_t); | ||
301 | int unvis(char *, int, int *, int); | ||
302 | -__END_DECLS | ||
303 | +#ifdef __cplusplus | ||
304 | +} | ||
305 | +#endif | ||
306 | +/* __END_DECLS */ | ||
307 | |||
308 | #endif /* !_VIS_H_ */ | ||
309 | diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h | ||
310 | index 33a500e..aa70742 100644 | ||
311 | --- a/include/bsd/wchar.h | ||
312 | +++ b/include/bsd/wchar.h | ||
313 | @@ -43,12 +43,18 @@ | ||
314 | #include <sys/cdefs.h> | ||
315 | #include <sys/types.h> | ||
316 | |||
317 | -__BEGIN_DECLS | ||
318 | +/* __BEGIN_DECLS */ | ||
319 | +#ifdef __cplusplus | ||
320 | +extern "C" { | ||
321 | +#endif | ||
322 | wchar_t *fgetwln(FILE *stream, size_t *len); | ||
323 | |||
324 | size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); | ||
325 | size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); | ||
326 | -__END_DECLS | ||
327 | +#ifdef __cplusplus | ||
328 | +} | ||
329 | +#endif | ||
330 | +/* __END_DECLS */ | ||
331 | |||
332 | #endif | ||
333 | #endif | ||
334 | diff --git a/src/hash/sha512.h b/src/hash/sha512.h | ||
335 | index 4f368a1..27ddc24 100644 | ||
336 | --- a/src/hash/sha512.h | ||
337 | +++ b/src/hash/sha512.h | ||
338 | @@ -39,7 +39,10 @@ typedef struct SHA512Context { | ||
339 | unsigned char buf[128]; | ||
340 | } SHA512_CTX; | ||
341 | |||
342 | -__BEGIN_DECLS | ||
343 | +/* __BEGIN_DECLS */ | ||
344 | +#ifdef __cplusplus | ||
345 | +extern "C" { | ||
346 | +#endif | ||
347 | |||
348 | void SHA512_Init(SHA512_CTX *); | ||
349 | void SHA512_Update(SHA512_CTX *, const void *, size_t); | ||
350 | @@ -48,6 +51,9 @@ char *SHA512_End(SHA512_CTX *, char *); | ||
351 | char *SHA512_File(const char *, char *); | ||
352 | char *SHA512_FileChunk(const char *, char *, off_t, off_t); | ||
353 | char *SHA512_Data(const void *, unsigned int, char *); | ||
354 | -__END_DECLS | ||
355 | +#ifdef __cplusplus | ||
356 | +} | ||
357 | +#endif | ||
358 | +/* __END_DECLS */ | ||
359 | |||
360 | #endif /* !_SHA512_H_ */ | ||
361 | -- | ||
362 | 2.10.2 | ||
363 | |||