media-gfx/gimp: kill for now, too complicated
[sgilles-overlay.git] / x11-drivers / xf86-video-virtualbox / files / xf86-video-virtualbox-5.0.20-remove-references-to-sys-cdefs.h.patch
blob8381bf58f15e021d258395b6f7c0a39aefb5dc37
1 From 003653f67ebe951b0210a82ac07c5dd772757944 Mon Sep 17 00:00:00 2001
2 From: "S. Gilles" <sgilles@math.umd.edu>
3 Date: Wed, 15 Jun 2016 02:31:35 +0000
4 Subject: [PATCH] Remove references to sys/cdefs.h
6 ---
7 src/VBox/Additions/freebsd/drm/vboxvideo_drm.c | 2 +-
8 .../StdLib/Include/Arm/machine/byte_swap.h | 8 +-
9 .../Firmware/StdLib/Include/Arm/machine/frame.h | 8 +-
10 .../StdLib/Include/Ia32/machine/byte_swap.h | 8 +-
11 .../Firmware/StdLib/Include/Ipf/machine/setjmp.h | 2 +-
12 .../StdLib/Include/X64/machine/byte_swap.h | 8 +-
13 .../EFI/Firmware/StdLib/Include/arpa/inet.h | 8 +-
14 .../EFI/Firmware/StdLib/Include/arpa/nameser.h | 8 +-
15 .../Devices/EFI/Firmware/StdLib/Include/ctype.h | 8 +-
16 .../Devices/EFI/Firmware/StdLib/Include/dirent.h | 10 ++-
17 .../Devices/EFI/Firmware/StdLib/Include/glob.h | 10 ++-
18 .../Devices/EFI/Firmware/StdLib/Include/inttypes.h | 8 +-
19 .../Devices/EFI/Firmware/StdLib/Include/langinfo.h | 8 +-
20 .../Devices/EFI/Firmware/StdLib/Include/locale.h | 8 +-
21 .../Devices/EFI/Firmware/StdLib/Include/math.h | 8 +-
22 .../EFI/Firmware/StdLib/Include/net/if_dl.h | 8 +-
23 .../Devices/EFI/Firmware/StdLib/Include/netdb.h | 18 +++--
24 .../EFI/Firmware/StdLib/Include/netinet6/in6.h | 8 +-
25 .../Devices/EFI/Firmware/StdLib/Include/netns/ns.h | 10 ++-
26 .../Devices/EFI/Firmware/StdLib/Include/nl_types.h | 8 +-
27 src/VBox/Devices/EFI/Firmware/StdLib/Include/pwd.h | 8 +-
28 .../Devices/EFI/Firmware/StdLib/Include/resolv.h | 10 ++-
29 .../Devices/EFI/Firmware/StdLib/Include/signal.h | 8 +-
30 .../Devices/EFI/Firmware/StdLib/Include/stdio.h | 88 ++++++++++++++++------
31 .../Devices/EFI/Firmware/StdLib/Include/stdlib.h | 8 +-
32 .../Devices/EFI/Firmware/StdLib/Include/string.h | 8 +-
33 .../EFI/Firmware/StdLib/Include/stringlist.h | 10 ++-
34 .../Devices/EFI/Firmware/StdLib/Include/strings.h | 8 +-
35 .../EFI/Firmware/StdLib/Include/sys/EfiSysCall.h | 8 +-
36 .../EFI/Firmware/StdLib/Include/sys/_ctype.h | 8 +-
37 .../EFI/Firmware/StdLib/Include/sys/bswap.h | 8 +-
38 .../EFI/Firmware/StdLib/Include/sys/endian.h | 8 +-
39 .../EFI/Firmware/StdLib/Include/sys/fcntl.h | 8 +-
40 .../Firmware/StdLib/Include/sys/float_ieee754.h | 8 +-
41 .../EFI/Firmware/StdLib/Include/sys/ioctl.h | 8 +-
42 .../Devices/EFI/Firmware/StdLib/Include/sys/poll.h | 8 +-
43 .../EFI/Firmware/StdLib/Include/sys/resource.h | 8 +-
44 .../EFI/Firmware/StdLib/Include/sys/select.h | 8 +-
45 .../EFI/Firmware/StdLib/Include/sys/signal.h | 8 +-
46 .../EFI/Firmware/StdLib/Include/sys/socket.h | 16 +++-
47 .../Devices/EFI/Firmware/StdLib/Include/sys/stat.h | 8 +-
48 .../EFI/Firmware/StdLib/Include/sys/sysctl.h | 8 +-
49 .../EFI/Firmware/StdLib/Include/sys/termios.h | 8 +-
50 .../Devices/EFI/Firmware/StdLib/Include/sys/time.h | 8 +-
51 .../Devices/EFI/Firmware/StdLib/Include/sys/uio.h | 8 +-
52 .../Devices/EFI/Firmware/StdLib/Include/sys/wait.h | 8 +-
53 .../Devices/EFI/Firmware/StdLib/Include/unistd.h | 8 +-
54 .../Devices/EFI/Firmware/StdLib/Include/utime.h | 10 ++-
55 .../Devices/EFI/Firmware/StdLib/Include/wctype.h | 8 +-
56 .../EFI/Firmware/StdLib/LibC/Locale/ctypeio.h | 8 +-
57 .../EFI/Firmware/StdLib/LibC/Main/bswap16.c | 2 +-
58 .../EFI/Firmware/StdLib/LibC/Main/bswap32.c | 2 +-
59 .../EFI/Firmware/StdLib/LibC/Main/bswap64.c | 2 +-
60 .../EFI/Firmware/StdLib/LibC/String/strlcat.c | 2 +-
61 .../EFI/Firmware/StdLib/LibC/String/strlcpy.c | 2 +-
62 .../EFI/Firmware/StdLib/LibC/String/strncasecmp.c | 2 +-
63 .../EFI/Firmware/StdLib/LibC/String/strsep.c | 2 +-
64 .../EFI/Firmware/StdLib/LibC/Time/TimeVals.h | 8 +-
65 .../EFI/Firmware/StdLib/LibC/Time/strptime.c | 2 +-
66 .../EFI/Firmware/StdLib/PosixLib/Gen/closedir.c | 2 +-
67 .../EFI/Firmware/StdLib/PosixLib/Gen/dirname.c | 2 +-
68 .../EFI/Firmware/StdLib/PosixLib/Gen/opendir.c | 2 +-
69 .../EFI/Firmware/StdLib/PosixLib/Gen/readdir.c | 2 +-
70 .../EFI/Firmware/StdLib/PosixLib/Glob/glob.c | 2 +-
71 .../StdLib/PosixLib/Stringlist/stringlist.c | 2 +-
72 .../Include/Device/Console.h | 8 +-
73 .../Include/Device/Device.h | 8 +-
74 .../StdLibPrivateInternalFiles/Include/extern.h | 8 +-
75 .../StdLibPrivateInternalFiles/Include/kfile.h | 16 +++-
76 .../StdLibPrivateInternalFiles/Include/reentrant.h | 40 +++++++---
77 .../Devices/Network/slirp/bsd/amd64/in_cksum.c | 2 +-
78 .../Network/slirp/bsd/amd64/include/in_cksum.h | 2 +-
79 src/VBox/Devices/Network/slirp/bsd/i386/in_cksum.c | 2 +-
80 .../Network/slirp/bsd/i386/include/in_cksum.h | 2 +-
81 .../Devices/Network/slirp/bsd/kern/kern_mbuf.c | 2 +-
82 .../Devices/Network/slirp/bsd/kern/subr_sbuf.c | 2 +-
83 .../Devices/Network/slirp/bsd/kern/uipc_mbuf.c | 2 +-
84 .../Devices/Network/slirp/bsd/kern/uipc_mbuf2.c | 2 +-
85 src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h | 8 +-
86 src/VBox/Devices/Network/slirp/libalias/alias.c | 2 +-
87 .../Devices/Network/slirp/libalias/alias_cuseeme.c | 2 +-
88 src/VBox/Devices/Network/slirp/libalias/alias_db.c | 2 +-
89 .../Devices/Network/slirp/libalias/alias_dummy.c | 2 +-
90 .../Devices/Network/slirp/libalias/alias_ftp.c | 2 +-
91 .../Devices/Network/slirp/libalias/alias_irc.c | 2 +-
92 .../Devices/Network/slirp/libalias/alias_mod.c | 2 +-
93 .../Devices/Network/slirp/libalias/alias_nbt.c | 2 +-
94 .../Devices/Network/slirp/libalias/alias_old.c | 2 +-
95 .../Devices/Network/slirp/libalias/alias_pptp.c | 2 +-
96 .../Devices/Network/slirp/libalias/alias_proxy.c | 2 +-
97 .../Devices/Network/slirp/libalias/alias_smedia.c | 2 +-
98 .../Devices/Network/slirp/libalias/alias_util.c | 2 +-
99 src/VBox/Runtime/common/checksum/crc32.cpp | 2 +-
100 src/VBox/Runtime/common/math/gcc/adddi3.c | 2 +-
101 src/VBox/Runtime/common/math/gcc/anddi3.c | 2 +-
102 src/VBox/Runtime/common/math/gcc/ashldi3.c | 2 +-
103 src/VBox/Runtime/common/math/gcc/ashrdi3.c | 2 +-
104 src/VBox/Runtime/common/math/gcc/cmpdi2.c | 2 +-
105 src/VBox/Runtime/common/math/gcc/divdi3.c | 2 +-
106 src/VBox/Runtime/common/math/gcc/iordi3.c | 2 +-
107 src/VBox/Runtime/common/math/gcc/lshldi3.c | 2 +-
108 src/VBox/Runtime/common/math/gcc/lshrdi3.c | 2 +-
109 src/VBox/Runtime/common/math/gcc/moddi3.c | 2 +-
110 src/VBox/Runtime/common/math/gcc/muldi3.c | 2 +-
111 src/VBox/Runtime/common/math/gcc/negdi2.c | 2 +-
112 src/VBox/Runtime/common/math/gcc/notdi2.c | 2 +-
113 src/VBox/Runtime/common/math/gcc/qdivrem.c | 2 +-
114 src/VBox/Runtime/common/math/gcc/subdi3.c | 2 +-
115 src/VBox/Runtime/common/math/gcc/ucmpdi2.c | 2 +-
116 src/VBox/Runtime/common/math/gcc/udivdi3.c | 2 +-
117 src/VBox/Runtime/common/math/gcc/umoddi3.c | 2 +-
118 src/VBox/Runtime/common/math/gcc/xordi3.c | 2 +-
119 src/VBox/Runtime/common/math/x86/fenv-x86.c | 2 +-
120 .../libxml2-2.9.2/macos/src/libxml2_GUSIConfig.cp | 18 +++--
121 114 files changed, 510 insertions(+), 214 deletions(-)
123 diff --git a/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c b/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
124 index 9d6a3db..d5843c9 100644
125 --- a/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
126 +++ b/src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
127 @@ -51,7 +51,7 @@
131 -#include <sys/cdefs.h>
133 __FBSDID("$FreeBSD$");
135 #include "dev/drm/drmP.h"
136 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/byte_swap.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/byte_swap.h
137 index 3eaaea5..d5f5296 100644
138 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/byte_swap.h
139 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/byte_swap.h
140 @@ -32,7 +32,9 @@
142 #ifdef __GNUC__
143 #include <sys/types.h>
144 -__BEGIN_DECLS
145 +#ifdef __cplusplus
146 + extern "C" {
147 +#endif
149 #define __BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable
150 static __inline uint32_t
151 @@ -57,7 +59,9 @@ __byte_swap_u16_variable(uint16_t v)
152 return (v);
155 -__END_DECLS
156 +#ifdef __cplusplus
158 +#endif
159 #endif
161 #endif /* _ARM_BYTE_SWAP_H_ */
162 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/frame.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/frame.h
163 index 65d2227..505c392 100644
164 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/frame.h
165 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Arm/machine/frame.h
166 @@ -109,10 +109,14 @@ struct saframe {
169 #ifdef _KERNEL
170 -__BEGIN_DECLS
171 +#ifdef __cplusplus
172 + extern "C" {
173 +#endif
174 void sendsig_sigcontext(const ksiginfo_t *, const sigset_t *);
175 void *getframe(struct lwp *, int, int *);
176 -__END_DECLS
177 +#ifdef __cplusplus
179 +#endif
180 #define process_frame(l) ((l)->l_addr->u_pcb.pcb_tf)
181 #endif
183 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ia32/machine/byte_swap.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ia32/machine/byte_swap.h
184 index 17cc4ed..c3d54ca 100644
185 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ia32/machine/byte_swap.h
186 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ia32/machine/byte_swap.h
187 @@ -47,7 +47,9 @@
189 #ifdef __GNUC__
190 #include <sys/types.h>
191 -__BEGIN_DECLS
192 +#ifdef __cplusplus
193 + extern "C" {
194 +#endif
196 #define __BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable
197 static __inline uint32_t __byte_swap_u32_variable(uint32_t);
198 @@ -73,7 +75,9 @@ __byte_swap_u16_variable(uint16_t x)
199 return (x);
202 -__END_DECLS
203 +#ifdef __cplusplus
205 +#endif
206 #endif
208 #endif /* !_I386_BYTE_SWAP_H_ */
209 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ipf/machine/setjmp.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ipf/machine/setjmp.h
210 index 00746a2..00c6aa6 100644
211 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ipf/machine/setjmp.h
212 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/Ipf/machine/setjmp.h
213 @@ -44,7 +44,7 @@
214 #ifndef _MACHINE_SETJMP_H_
215 #define _MACHINE_SETJMP_H_
217 -#include <sys/cdefs.h>
220 #define JMPBUF_ADDR_OF(buf, item) ((unsigned long)((char *)buf + item))
222 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/X64/machine/byte_swap.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/X64/machine/byte_swap.h
223 index 78cc7d8..eaf93fb 100644
224 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/X64/machine/byte_swap.h
225 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/X64/machine/byte_swap.h
226 @@ -45,7 +45,9 @@
228 #ifdef __GNUC__
229 #include <sys/types.h>
230 -__BEGIN_DECLS
231 +#ifdef __cplusplus
232 + extern "C" {
233 +#endif
235 #define __BYTE_SWAP_U32_VARIABLE __byte_swap_u32_variable
236 static __inline uint32_t __byte_swap_u32_variable(uint32_t);
237 @@ -65,7 +67,9 @@ __byte_swap_u16_variable(uint16_t x)
238 return (x);
241 -__END_DECLS
242 +#ifdef __cplusplus
244 +#endif
245 #endif
247 #endif /* !_AMD64_BYTE_SWAP_H_ */
248 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/inet.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/inet.h
249 index 92496bb..f681c1f 100644
250 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/inet.h
251 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/inet.h
252 @@ -76,7 +76,9 @@ typedef __socklen_t socklen_t;
253 #endif
254 #endif /* _POSIX_C_SOURCE >= 200112 || XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */
256 -__BEGIN_DECLS
257 +#ifdef __cplusplus
258 + extern "C" {
259 +#endif
260 in_addr_t inet_addr(const char *);
261 in_addr_t inet_lnaof(struct in_addr);
262 struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
263 @@ -100,6 +102,8 @@ int inet_cidr_pton(int, const char *, void *, int *);
264 u_int inet_nsap_addr(const char *, u_char *, int);
265 char *inet_nsap_ntoa(int, const u_char *, char *);
266 #endif
267 -__END_DECLS
268 +#ifdef __cplusplus
270 +#endif
272 #endif /* _ARPA_INET_H_ */
273 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/nameser.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/nameser.h
274 index 1bbffc5..6e8e6e7 100644
275 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/nameser.h
276 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/arpa/nameser.h
277 @@ -535,7 +535,9 @@ typedef enum __ns_cert_types {
278 #define ns_makecanon __ns_makecanon
279 #define ns_samename __ns_samename
281 -__BEGIN_DECLS
282 +#ifdef __cplusplus
283 + extern "C" {
284 +#endif
285 uint16_t ns_get16(const u_char *);
286 uint32_t ns_get32(const u_char *);
287 void ns_put16(uint16_t, u_char *);
288 @@ -589,7 +591,9 @@ int ns_samedomain(const char *, const char *);
289 int ns_subdomain(const char *, const char *);
290 int ns_makecanon(const char *, char *, size_t);
291 int ns_samename(const char *, const char *);
292 -__END_DECLS
293 +#ifdef __cplusplus
295 +#endif
297 #ifdef BIND_4_COMPAT
298 #include <arpa/nameser_compat.h>
299 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/ctype.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/ctype.h
300 index e752759..e679afc 100644
301 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/ctype.h
302 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/ctype.h
303 @@ -29,7 +29,9 @@
304 #include <sys/EfiCdefs.h>
305 #include <sys/_ctype.h>
307 -__BEGIN_DECLS
308 +#ifdef __cplusplus
309 + extern "C" {
310 +#endif
311 // Declarations for the classification Functions
313 /** The isalnum function tests for any character for which isalpha or isdigit
314 @@ -213,7 +215,9 @@ int tolower(int c);
316 int toupper(int c);
318 -__END_DECLS
319 +#ifdef __cplusplus
321 +#endif
323 /** Character Classification Macros.
324 Undefine individually or define NO_CTYPE_MACROS, before including <ctype.h>,
325 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/dirent.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/dirent.h
326 index e83a9dd..0cf48d4 100644
327 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/dirent.h
328 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/dirent.h
329 @@ -77,9 +77,11 @@ struct _dirdesc {
330 #define DTF_REWIND 0x0004 /* rewind after reading union stack */
331 #define __DTF_READALL 0x0008 /* everything has been read */
333 -#include <sys/cdefs.h>
335 -__BEGIN_DECLS
337 +#ifdef __cplusplus
338 + extern "C" {
339 +#endif
340 int closedir(DIR *);
341 void rewinddir(DIR *);
343 @@ -100,7 +102,9 @@ __BEGIN_DECLS
344 //#endif
346 //int alphasort(const void *, const void *);
347 -__END_DECLS
348 +#ifdef __cplusplus
350 +#endif
353 #endif /* _DIRENT_H_ */
354 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/glob.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/glob.h
355 index fe759e8..0ff0d3d 100644
356 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/glob.h
357 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/glob.h
358 @@ -37,7 +37,7 @@
359 #ifndef _GLOB_H_
360 #define _GLOB_H_
362 -#include <sys/cdefs.h>
364 #include <sys/featuretest.h>
365 #include <sys/types.h>
366 #include <sys/stat.h>
367 @@ -98,12 +98,16 @@ typedef struct {
368 #define GLOB_ABEND GLOB_ABORTED /* source compatibility */
369 #endif
371 -__BEGIN_DECLS
372 +#ifdef __cplusplus
373 + extern "C" {
374 +#endif
375 #ifndef __LIBC12_SOURCE__
376 int glob(const char * __restrict, int,
377 int (*)(const char *, int), glob_t * __restrict) __RENAME(__glob30);
378 void globfree(glob_t *) __RENAME(__globfree30);
379 #endif
380 -__END_DECLS
381 +#ifdef __cplusplus
383 +#endif
385 #endif /* !_GLOB_H_ */
386 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/inttypes.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/inttypes.h
387 index abdeb4e..8eec9cf 100644
388 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/inttypes.h
389 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/inttypes.h
390 @@ -49,7 +49,9 @@
391 #undef _BSD_WCHAR_T_
392 #endif
394 -__BEGIN_DECLS
395 +#ifdef __cplusplus
396 + extern "C" {
397 +#endif
398 intmax_t strtoimax(const char * __restrict,
399 char ** __restrict, int);
400 uintmax_t strtoumax(const char * __restrict,
401 @@ -58,6 +60,8 @@ intmax_t wcstoimax(const wchar_t * __restrict,
402 wchar_t ** __restrict, int);
403 uintmax_t wcstoumax(const wchar_t * __restrict,
404 wchar_t ** __restrict, int);
405 -__END_DECLS
406 +#ifdef __cplusplus
408 +#endif
410 #endif /* !_INTTYPES_H_ */
411 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/langinfo.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/langinfo.h
412 index 9543afc..50a8de9 100644
413 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/langinfo.h
414 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/langinfo.h
415 @@ -84,8 +84,12 @@
417 #define ALT_DIGITS ((nl_item)56) /* Alternative symbols for digits */
419 -__BEGIN_DECLS
420 +#ifdef __cplusplus
421 + extern "C" {
422 +#endif
423 char *nl_langinfo(nl_item);
424 -__END_DECLS
425 +#ifdef __cplusplus
427 +#endif
429 #endif /* _LANGINFO_H_ */
430 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/locale.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/locale.h
431 index 1db1317..879e30f 100644
432 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/locale.h
433 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/locale.h
434 @@ -180,7 +180,9 @@ struct lconv {
435 setlocale or localeconv.
438 -__BEGIN_DECLS
439 +#ifdef __cplusplus
440 + extern "C" {
441 +#endif
442 #ifdef __SETLOCALE_SOURCE__
443 char *setlocale(int category, const char *locale);
444 char *__setlocale(int category, const char *locale);
445 @@ -189,6 +191,8 @@ __BEGIN_DECLS
446 #endif /* !__SETLOCALE_SOURCE__ */
447 struct lconv *localeconv(void);
448 char *__setlocale_mb_len_max_32(int category, const char *locale);
449 -__END_DECLS
450 +#ifdef __cplusplus
452 +#endif
454 #endif /* _LOCALE_H_ */
455 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/math.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/math.h
456 index 65e9f53..1e068d8 100644
457 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/math.h
458 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/math.h
459 @@ -99,7 +99,9 @@ extern const union __long_double_u __infinityl;
460 #define HUGE_VALL __infinityl.__val
461 /*@)*/
463 -__BEGIN_DECLS
464 +#ifdef __cplusplus
465 + extern "C" {
466 +#endif
468 * ANSI/POSIX
470 @@ -344,7 +346,9 @@ int __isnand(double);
471 #endif /* __HAVE_LONG_DOUBLE */
472 /*@}*/
474 -__END_DECLS
475 +#ifdef __cplusplus
477 +#endif
479 /**@{
480 Extensions provided by NetBSD but not required by the C95 standard.
481 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/net/if_dl.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/net/if_dl.h
482 index 83a7575..f874865 100644
483 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/net/if_dl.h
484 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/net/if_dl.h
485 @@ -76,10 +76,14 @@ struct sockaddr_dl {
487 #include <sys/EfiCdefs.h>
489 -__BEGIN_DECLS
490 +#ifdef __cplusplus
491 + extern "C" {
492 +#endif
493 void link_addr __P((const char *, struct sockaddr_dl *));
494 char *link_ntoa __P((const struct sockaddr_dl *));
495 -__END_DECLS
496 +#ifdef __cplusplus
498 +#endif
500 #endif /* !KERNEL */
502 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netdb.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netdb.h
503 index 7faf8ab..96b5181 100644
504 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netdb.h
505 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netdb.h
506 @@ -91,7 +91,7 @@
507 #include <machine/ansi.h>
508 #include <machine/endian_machdep.h>
509 #include <sys/ansi.h>
510 -#include <sys/cdefs.h>
512 #include <sys/featuretest.h>
513 #include <inttypes.h>
514 #include <paths.h>
515 @@ -109,9 +109,13 @@ typedef __socklen_t socklen_t;
516 #undef _BSD_SIZE_T_
517 #endif
519 -__BEGIN_DECLS
520 +#ifdef __cplusplus
521 + extern "C" {
522 +#endif
523 extern int h_errno;
524 -__END_DECLS
525 +#ifdef __cplusplus
527 +#endif
530 * Structures returned by network data base library. All addresses are
531 @@ -282,7 +286,9 @@ struct addrinfo {
532 #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */
533 #endif // 0 Not supported by UEFI
535 -__BEGIN_DECLS
536 +#ifdef __cplusplus
537 + extern "C" {
538 +#endif
539 void endhostent(void);
540 void endnetent(void);
541 void endprotoent(void);
542 @@ -334,6 +340,8 @@ const char *gai_strerror(int);
543 #endif
544 void setservent(int);
546 -__END_DECLS
547 +#ifdef __cplusplus
549 +#endif
551 #endif /* !_NETDB_H_ */
552 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netinet6/in6.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netinet6/in6.h
553 index 3a62318..427e4ba 100644
554 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netinet6/in6.h
555 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netinet6/in6.h
556 @@ -745,7 +745,9 @@ typedef _EFI_SIZE_T_ size_t;
558 #include <sys/EfiCdefs.h>
560 -__BEGIN_DECLS
561 +#ifdef __cplusplus
562 + extern "C" {
563 +#endif
564 struct cmsghdr;
566 extern int inet6_option_space (int);
567 @@ -785,7 +787,9 @@ extern int inet6_rth_add (void *, const struct in6_addr *);
568 extern int inet6_rth_reverse (const void *, void *);
569 extern int inet6_rth_segments (const void *);
570 extern struct in6_addr *inet6_rth_getaddr (const void *, int);
571 -__END_DECLS
572 +#ifdef __cplusplus
574 +#endif
575 #endif /* _NETBSD_SOURCE */
577 #endif /* !_NETINET6_IN6_H_ */
578 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netns/ns.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netns/ns.h
579 index 3ba7770..3968554 100644
580 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/netns/ns.h
581 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/netns/ns.h
582 @@ -145,12 +145,16 @@ union ns_net ns_broadnet;
583 u_short ns_cksum();
584 #else
586 -#include <sys/cdefs.h>
588 -__BEGIN_DECLS
590 +#ifdef __cplusplus
591 + extern "C" {
592 +#endif
593 extern struct ns_addr ns_addr (const char *);
594 extern char *ns_ntoa (struct ns_addr);
595 -__END_DECLS
596 +#ifdef __cplusplus
598 +#endif
600 #endif
602 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/nl_types.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/nl_types.h
603 index cd6c0d6..ffe603e 100644
604 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/nl_types.h
605 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/nl_types.h
606 @@ -88,11 +88,15 @@ typedef struct __nl_cat_d {
608 typedef LONG32 nl_item;
610 -__BEGIN_DECLS
611 +#ifdef __cplusplus
612 + extern "C" {
613 +#endif
614 nl_catd catopen(const char *, int);
615 char *catgets(nl_catd, int, int, const char *)
616 __attribute__((__format_arg__(4)));
617 int catclose(nl_catd);
618 -__END_DECLS
619 +#ifdef __cplusplus
621 +#endif
623 #endif /* _NL_TYPES_H_ */
624 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/pwd.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/pwd.h
625 index 0f852aa..cc092cc 100644
626 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/pwd.h
627 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/pwd.h
628 @@ -115,7 +115,9 @@ struct passwd {
629 time_t pw_expire; /* account expiration */
632 -__BEGIN_DECLS
633 +#ifdef __cplusplus
634 + extern "C" {
635 +#endif
636 struct passwd *getpwuid(uid_t);
637 struct passwd *getpwnam(const char *);
639 @@ -140,6 +142,8 @@ __BEGIN_DECLS
640 struct passwd * (*)(const char *),
641 struct passwd * (*)(uid_t));
642 #endif
643 -__END_DECLS
644 +#ifdef __cplusplus
646 +#endif
648 #endif /* !_PWD_H_ */
649 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/resolv.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/resolv.h
650 index 5f1a9be..1e53ac6 100644
651 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/resolv.h
652 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/resolv.h
653 @@ -60,7 +60,7 @@
654 #include <arpa/nameser.h>
655 #include <sys/param.h>
656 #include <sys/types.h>
657 -#include <sys/cdefs.h>
659 #include <stdio.h>
660 #include <paths.h>
662 @@ -230,7 +230,9 @@ extern const struct res_sym __p_type_syms[];
663 #define res_mkupdrec __res_mkupdrec
664 #define res_freeupdrec __res_freeupdrec
666 -__BEGIN_DECLS
667 +#ifdef __cplusplus
668 + extern "C" {
669 +#endif
670 int res_hnok __P((const char *));
671 int res_ownok __P((const char *));
672 int res_mailok __P((const char *));
673 @@ -288,6 +290,8 @@ int res_mkupdate __P((ns_updrec *, u_char *, int));
674 ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
675 void res_freeupdrec __P((ns_updrec *));
676 #endif
677 -__END_DECLS
678 +#ifdef __cplusplus
680 +#endif
682 #endif /* !_RESOLV_H_ */
683 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/signal.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/signal.h
684 index 80dfc5f..4b70536 100644
685 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/signal.h
686 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/signal.h
687 @@ -68,7 +68,9 @@
688 #define SIG_LAST __Sig_Last ///< One more than the largest signal number
689 /*@}*/
691 -__BEGIN_DECLS
692 +#ifdef __cplusplus
693 + extern "C" {
694 +#endif
696 /** Send a signal.
698 @@ -81,6 +83,8 @@ __BEGIN_DECLS
700 int raise(int sig);
702 -__END_DECLS
703 +#ifdef __cplusplus
705 +#endif
707 #endif /* _SIGNAL_H */
708 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdio.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdio.h
709 index 967f0e7..331101a 100644
710 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdio.h
711 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdio.h
712 @@ -254,9 +254,13 @@ typedef struct __sFILE {
713 fpos_t _offset; /**< current lseek offset */
714 } FILE;
716 -__BEGIN_DECLS
717 +#ifdef __cplusplus
718 + extern "C" {
719 +#endif
720 extern FILE __sF[];
721 -__END_DECLS
722 +#ifdef __cplusplus
724 +#endif
726 #define __SLBF 0x0001 /**< line buffered */
727 #define __SNBF 0x0002 /**< unbuffered */
728 @@ -324,7 +328,9 @@ __END_DECLS
729 #define stdout (&__sF[1]) /**< FILE reference for the STanDard OUTput stream. */
730 #define stderr (&__sF[2]) /**< FILE reference for the STanDard ERRor stream. */
732 -__BEGIN_DECLS
733 +#ifdef __cplusplus
734 + extern "C" {
735 +#endif
736 /* Functions defined in C95 standard. ###################################### */
738 /* ################ Operations on files. */
739 @@ -1446,19 +1452,27 @@ int ferror (FILE *Stream);
741 void perror (const char *String);
743 -__END_DECLS
744 +#ifdef __cplusplus
746 +#endif
749 * IEEE Std 1003.1-90
751 -__BEGIN_DECLS
752 +#ifdef __cplusplus
753 + extern "C" {
754 +#endif
755 FILE *fdopen(int, const char *);
756 -__END_DECLS
757 +#ifdef __cplusplus
759 +#endif
762 * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
764 -__BEGIN_DECLS
765 +#ifdef __cplusplus
766 + extern "C" {
767 +#endif
768 void flockfile (FILE *);
769 int ftrylockfile (FILE *);
770 void funlockfile (FILE *);
771 @@ -1466,30 +1480,42 @@ int getc_unlocked (FILE *);
772 int getchar_unlocked(void);
773 int putc_unlocked (int, FILE *);
774 int putchar_unlocked(int);
775 -__END_DECLS
776 +#ifdef __cplusplus
778 +#endif
781 * Functions defined in POSIX 1003.2 and XPG2 or later.
783 -__BEGIN_DECLS
784 +#ifdef __cplusplus
785 + extern "C" {
786 +#endif
787 int pclose (FILE *);
788 FILE *popen (const char *, const char *);
789 -__END_DECLS
790 +#ifdef __cplusplus
792 +#endif
795 * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
797 -__BEGIN_DECLS
798 +#ifdef __cplusplus
799 + extern "C" {
800 +#endif
801 int snprintf (char * __restrict, size_t, const char * __restrict, ...)
802 __attribute__((__format__(__printf__, 3, 4)));
803 int vsnprintf(char * __restrict, size_t, const char * __restrict, va_list)
804 __attribute__((__format__(__printf__, 3, 0)));
805 -__END_DECLS
806 +#ifdef __cplusplus
808 +#endif
811 * Functions defined in XPG4.2.
813 -__BEGIN_DECLS
814 +#ifdef __cplusplus
815 + extern "C" {
816 +#endif
817 //int getw(FILE *);
818 //int putw(int, FILE *);
819 char *mkdtemp(char *);
820 @@ -1497,7 +1523,9 @@ __BEGIN_DECLS
821 char *mktemp(char *);
823 char *tempnam(const char *, const char *);
824 -__END_DECLS
825 +#ifdef __cplusplus
827 +#endif
830 * X/Open CAE Specification Issue 5 Version 2
831 @@ -1507,10 +1535,14 @@ __END_DECLS
832 #define off_t __off_t
833 #endif /* off_t */
835 -__BEGIN_DECLS
836 +#ifdef __cplusplus
837 + extern "C" {
838 +#endif
839 int fseeko(FILE *, off_t, int);
840 off_t ftello(FILE *);
841 -__END_DECLS
842 +#ifdef __cplusplus
844 +#endif
847 * Routines that are purely local.
848 @@ -1521,7 +1553,9 @@ __END_DECLS
849 #define FPARSELN_UNESCREST 0x08
850 #define FPARSELN_UNESCALL 0x0f
852 -__BEGIN_DECLS
853 +#ifdef __cplusplus
854 + extern "C" {
855 +#endif
856 //int asprintf(char ** __restrict, const char * __restrict, ...)
857 // __attribute__((__format__(__printf__, 2, 3)));
858 char *fgetln(FILE * __restrict, size_t * __restrict);
859 @@ -1542,28 +1576,38 @@ __BEGIN_DECLS
860 __attribute__((__format__(__scanf__, 2, 0)));
861 //const char *fmtcheck(const char *, const char *)
862 // __attribute__((__format_arg__(2)));
863 -__END_DECLS
864 +#ifdef __cplusplus
866 +#endif
869 * Stdio function-access interface.
871 -__BEGIN_DECLS
872 +#ifdef __cplusplus
873 + extern "C" {
874 +#endif
875 FILE *funopen(const void *,
876 int (*)(void *, char *, int),
877 int (*)(void *, const char *, int),
878 fpos_t (*)(void *, fpos_t, int),
879 int (*)(void *));
880 -__END_DECLS
881 +#ifdef __cplusplus
883 +#endif
884 //#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
885 //#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
888 * Functions internal to the implementation.
890 -__BEGIN_DECLS
891 +#ifdef __cplusplus
892 + extern "C" {
893 +#endif
894 int __srget(FILE *);
895 int __swbuf(int, FILE *);
896 -__END_DECLS
897 +#ifdef __cplusplus
899 +#endif
902 * The __sfoo macros are here so that we can
903 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdlib.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdlib.h
904 index 2a3c814..0ef6cd4 100644
905 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdlib.h
906 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stdlib.h
907 @@ -176,7 +176,9 @@ typedef struct {
909 #define ATEXIT_MAX 32
911 -__BEGIN_DECLS
912 +#ifdef __cplusplus
913 + extern "C" {
914 +#endif
916 /* ################ Communication with the environment ################## */
918 @@ -890,6 +892,8 @@ const char * getprogname(void);
920 void setprogname(const char *progname);
922 -__END_DECLS
923 +#ifdef __cplusplus
925 +#endif
927 #endif /* _STDLIB_H */
928 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/string.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/string.h
929 index 9ebb21d..29bae2b 100644
930 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/string.h
931 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/string.h
932 @@ -93,7 +93,9 @@
933 #undef _BSD_SIZE_T_
934 #endif
936 -__BEGIN_DECLS
937 +#ifdef __cplusplus
938 + extern "C" {
939 +#endif
941 /* ################ Copying Functions ################################# */
943 @@ -488,6 +490,8 @@ strsep(
944 register const char *delim
947 -__END_DECLS
948 +#ifdef __cplusplus
950 +#endif
952 #endif /* _STRING_H */
953 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stringlist.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stringlist.h
954 index 22201e2..34717a6 100644
955 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/stringlist.h
956 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/stringlist.h
957 @@ -42,7 +42,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
959 #ifndef _STRINGLIST_H
960 #define _STRINGLIST_H
961 -#include <sys/cdefs.h>
963 #include <sys/types.h>
966 @@ -54,12 +54,16 @@ typedef struct _stringlist {
967 size_t sl_cur;
968 } StringList;
970 -__BEGIN_DECLS
971 +#ifdef __cplusplus
972 + extern "C" {
973 +#endif
974 StringList *sl_init(void);
975 int sl_add(StringList *, char *);
976 void sl_free(StringList *, int);
977 char *sl_find(StringList *, const char *);
978 int sl_delete(StringList *, const char *, int);
979 -__END_DECLS
980 +#ifdef __cplusplus
982 +#endif
984 #endif /* _STRINGLIST_H */
985 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/strings.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/strings.h
986 index 043ae6b..0a1faf3 100644
987 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/strings.h
988 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/strings.h
989 @@ -43,10 +43,14 @@
990 #include <machine/ansi.h>
991 #include <sys/featuretest.h>
993 -__BEGIN_DECLS
994 +#ifdef __cplusplus
995 + extern "C" {
996 +#endif
997 void bzero(void *, size_t);
998 int ffs(int);
999 -__END_DECLS
1000 +#ifdef __cplusplus
1002 +#endif
1004 #define index(x,y) strchr((x), (y))
1005 #define rindex(x,y) strrchr((x), (y))
1006 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/EfiSysCall.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/EfiSysCall.h
1007 index d748e6c..b3b715b 100644
1008 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/EfiSysCall.h
1009 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/EfiSysCall.h
1010 @@ -92,7 +92,9 @@ struct stat; /* Structure declared in <sys/stat.h> */
1011 #define VALID_CLOSED 0
1012 #define VALID_DONT_CARE -1
1014 -__BEGIN_DECLS
1015 +#ifdef __cplusplus
1016 + extern "C" {
1017 +#endif
1018 /* EFI versions of BSD system calls used in stdio */
1020 /** Close a file or device.
1021 @@ -331,6 +333,8 @@ __BEGIN_DECLS
1023 /* These system calls don't YET have EFI implementations. */
1024 int reboot (int, char *);
1025 -__END_DECLS
1026 +#ifdef __cplusplus
1028 +#endif
1030 #endif /* _EFI_SYS_CALL_H */
1031 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/_ctype.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/_ctype.h
1032 index 6a562fa..ba79897 100644
1033 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/_ctype.h
1034 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/_ctype.h
1035 @@ -17,13 +17,17 @@
1036 #error This file, <sys/_ctype.h>, may only be included by <ctype.h>.
1037 #endif
1039 -__BEGIN_DECLS
1040 +#ifdef __cplusplus
1041 + extern "C" {
1042 +#endif
1043 extern const UINT16 *_cClass; ///< Locale independent pointer to Character Classification Table.
1044 extern const UINT8 *_uConvT; ///< Locale independent pointer to Lowercase to Uppercase Conversion Table.
1045 extern const UINT8 *_lConvT; ///< Locale independent pointer to Uppercase to Lowercase Conversion Table.
1047 extern int __isCClass( int _c, unsigned int mask); ///< Internal character classification function.
1048 -__END_DECLS
1049 +#ifdef __cplusplus
1051 +#endif
1054 /** @{
1055 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/bswap.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/bswap.h
1056 index 9a8ce26..27ae034 100644
1057 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/bswap.h
1058 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/bswap.h
1059 @@ -11,7 +11,9 @@
1061 #include <machine/bswap.h>
1063 -__BEGIN_DECLS
1064 +#ifdef __cplusplus
1065 + extern "C" {
1066 +#endif
1067 /* Always declare the functions in case their address is taken (etc) */
1068 #if !defined(__BSWAP_RENAME)
1069 uint16_t bswap16(uint16_t) __attribute__((__const__));
1070 @@ -21,7 +23,9 @@ uint16_t bswap16(uint16_t) __RENAME(__bswap16) __attribute__((__const__));
1071 uint32_t bswap32(uint32_t) __RENAME(__bswap32) __attribute__((__const__));
1072 #endif
1073 uint64_t bswap64(uint64_t) __attribute__((__const__));
1074 -__END_DECLS
1075 +#ifdef __cplusplus
1077 +#endif
1079 #if defined(__GNUC__) && defined(__OPTIMIZE__)
1081 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/endian.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/endian.h
1082 index ab71a2c..0b67846 100644
1083 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/endian.h
1084 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/endian.h
1085 @@ -72,12 +72,16 @@ typedef __in_port_t in_port_t;
1086 #define in_port_t __in_port_t
1087 #endif
1089 -__BEGIN_DECLS
1090 +#ifdef __cplusplus
1091 + extern "C" {
1092 +#endif
1093 uint32_t htonl(uint32_t) __attribute__((__const__));
1094 uint16_t htons(uint16_t) __attribute__((__const__));
1095 uint32_t ntohl(uint32_t) __attribute__((__const__));
1096 uint16_t ntohs(uint16_t) __attribute__((__const__));
1097 -__END_DECLS
1098 +#ifdef __cplusplus
1100 +#endif
1102 #endif /* !_LOCORE */
1103 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
1104 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/fcntl.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/fcntl.h
1105 index 3abf2f0..ec22ab4 100644
1106 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/fcntl.h
1107 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/fcntl.h
1108 @@ -136,7 +136,9 @@
1110 #include <sys/EfiCdefs.h>
1112 -__BEGIN_DECLS
1113 +#ifdef __cplusplus
1114 + extern "C" {
1115 +#endif
1116 #ifndef __FCNTL_SYSCALLS_DECLARED
1117 #define __FCNTL_SYSCALLS_DECLARED
1119 @@ -193,6 +195,8 @@ __BEGIN_DECLS
1121 int fcntl(int, int, ...);
1122 #endif // __FCNTL_SYSCALLS_DECLARED
1123 -__END_DECLS
1124 +#ifdef __cplusplus
1126 +#endif
1128 #endif /* !_SYS_FCNTL_H_ */
1129 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/float_ieee754.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/float_ieee754.h
1130 index 7307587..d6573c8 100644
1131 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/float_ieee754.h
1132 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/float_ieee754.h
1133 @@ -49,9 +49,13 @@
1134 #include <sys/featuretest.h>
1136 #ifndef FLT_ROUNDS
1137 -__BEGIN_DECLS
1138 +#ifdef __cplusplus
1139 + extern "C" {
1140 +#endif
1141 extern int __flt_rounds(void);
1142 -__END_DECLS
1143 +#ifdef __cplusplus
1145 +#endif
1146 #define FLT_ROUNDS __flt_rounds()
1147 #endif
1149 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/ioctl.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/ioctl.h
1150 index dc46d24..421d2e1 100644
1151 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/ioctl.h
1152 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/ioctl.h
1153 @@ -95,7 +95,11 @@ struct ioctl_pt {
1155 #include <sys/EfiCdefs.h>
1157 -__BEGIN_DECLS
1158 +#ifdef __cplusplus
1159 + extern "C" {
1160 +#endif
1161 int ioctl(int, unsigned long, ...);
1162 -__END_DECLS
1163 +#ifdef __cplusplus
1165 +#endif
1166 #endif /* !_SYS_IOCTL_H_ */
1167 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/poll.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/poll.h
1168 index 4b4d520..b3f302e 100644
1169 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/poll.h
1170 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/poll.h
1171 @@ -84,8 +84,12 @@ struct pollfd {
1173 #define INFTIM -1
1175 -__BEGIN_DECLS
1176 +#ifdef __cplusplus
1177 + extern "C" {
1178 +#endif
1179 int poll(struct pollfd *, nfds_t, int);
1180 -__END_DECLS
1181 +#ifdef __cplusplus
1183 +#endif
1185 #endif /* !_SYS_POLL_H_ */
1186 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/resource.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/resource.h
1187 index 73f657e..2fac70e 100644
1188 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/resource.h
1189 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/resource.h
1190 @@ -131,13 +131,17 @@ int donice(struct lwp *, struct proc *, int);
1191 #else
1192 #include <sys/EfiCdefs.h>
1194 -__BEGIN_DECLS
1195 +#ifdef __cplusplus
1196 + extern "C" {
1197 +#endif
1198 int getpriority(int, id_t);
1199 int getrlimit(int, struct rlimit *);
1200 int getrusage(int, struct rusage *);
1201 int setpriority(int, id_t, int);
1202 int setrlimit(int, const struct rlimit *);
1203 -__END_DECLS
1204 +#ifdef __cplusplus
1206 +#endif
1208 #endif /* _KERNEL */
1209 #endif /* !_SYS_RESOURCE_H_ */
1210 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/select.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/select.h
1211 index 5d86468..43af9ea 100644
1212 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/select.h
1213 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/select.h
1214 @@ -41,12 +41,16 @@
1215 #include <sys/time.h>
1216 #include <time.h>
1218 -__BEGIN_DECLS
1219 +#ifdef __cplusplus
1220 + extern "C" {
1221 +#endif
1222 int pselect(int, fd_set * __restrict, fd_set * __restrict,
1223 fd_set * __restrict, const struct timespec * __restrict,
1224 const sigset_t * __restrict);
1225 int select(int, fd_set * __restrict, fd_set * __restrict,
1226 fd_set * __restrict, struct timeval * __restrict);
1227 -__END_DECLS
1228 +#ifdef __cplusplus
1230 +#endif
1232 #endif /* !_SYS_SELECT_H_ */
1233 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/signal.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/signal.h
1234 index 0a6071b..2c5d1f9 100644
1235 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/signal.h
1236 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/signal.h
1237 @@ -47,7 +47,9 @@ enum {
1238 /** The type of a signal handler function. **/
1239 typedef void __sighandler_t(int);
1241 -__BEGIN_DECLS
1242 +#ifdef __cplusplus
1243 + extern "C" {
1244 +#endif
1245 /** The signal function associates a "signal handler" with a signal number.
1247 For historical reasons; programs expect signal to be declared
1248 @@ -63,6 +65,8 @@ __BEGIN_DECLS
1250 __sighandler_t *signal(int sig, __sighandler_t *func);
1252 -__END_DECLS
1253 +#ifdef __cplusplus
1255 +#endif
1257 #endif /* _SYS_SIGNAL_H */
1258 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/socket.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/socket.h
1259 index 24ae21a..dc23e1c 100644
1260 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/socket.h
1261 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/socket.h
1262 @@ -534,13 +534,19 @@ struct cmsghdr {
1264 #include <sys/EfiCdefs.h>
1266 -__BEGIN_DECLS
1267 +#ifdef __cplusplus
1268 + extern "C" {
1269 +#endif
1270 int __cmsg_alignbytes(void);
1271 -__END_DECLS
1272 +#ifdef __cplusplus
1274 +#endif
1276 #ifndef _KERNEL
1278 -__BEGIN_DECLS
1279 +#ifdef __cplusplus
1280 + extern "C" {
1281 +#endif
1282 int accept(int, struct sockaddr * __restrict, socklen_t * __restrict);
1283 int bind(int, const struct sockaddr *, socklen_t);
1284 int connect(int, const struct sockaddr *, socklen_t);
1285 @@ -565,7 +571,9 @@ __RENAME(__socket30)
1286 #endif
1288 int socketpair(int, int, int, int *);
1289 -__END_DECLS
1290 +#ifdef __cplusplus
1292 +#endif
1293 #endif /* !_KERNEL */
1295 #endif /* !_SYS_SOCKET_H_ */
1296 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/stat.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/stat.h
1297 index c872086..1c8d810 100644
1298 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/stat.h
1299 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/stat.h
1300 @@ -169,7 +169,9 @@ struct stat {
1302 #include <sys/EfiCdefs.h>
1304 -__BEGIN_DECLS
1305 +#ifdef __cplusplus
1306 + extern "C" {
1307 +#endif
1308 #ifndef __STAT_SYSCALLS_DECLARED
1309 #define __STAT_SYSCALLS_DECLARED
1311 @@ -197,6 +199,8 @@ __BEGIN_DECLS
1313 int chmod (const char *, mode_t);
1314 #endif // __STAT_SYSCALLS_DECLARED
1315 -__END_DECLS
1316 +#ifdef __cplusplus
1318 +#endif
1320 #endif /* !_SYS_STAT_H_ */
1321 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/sysctl.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/sysctl.h
1322 index af62974..3708566 100644
1323 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/sysctl.h
1324 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/sysctl.h
1325 @@ -496,10 +496,14 @@ int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old,
1326 #else /* !KERNEL */
1327 #include <sys/EfiCdefs.h>
1329 -__BEGIN_DECLS
1330 +#ifdef __cplusplus
1331 + extern "C" {
1332 +#endif
1333 int sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
1334 int sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
1335 -__END_DECLS
1336 +#ifdef __cplusplus
1338 +#endif
1339 #endif /* KERNEL */
1341 #endif /* !_SYS_SYSCTL_H_ */
1342 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/termios.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/termios.h
1343 index 1c446dd..47a8f74 100644
1344 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/termios.h
1345 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/termios.h
1346 @@ -260,7 +260,9 @@ typedef __pid_t pid_t;
1347 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
1348 #include <sys/EfiCdefs.h>
1350 -__BEGIN_DECLS
1351 +#ifdef __cplusplus
1352 + extern "C" {
1353 +#endif
1354 speed_t cfgetispeed(const struct termios *);
1355 speed_t cfgetospeed(const struct termios *);
1356 int cfsetispeed(struct termios *, speed_t);
1357 @@ -280,7 +282,9 @@ pid_t tcgetsid(int);
1358 void cfmakeraw(struct termios *);
1359 int cfsetspeed(struct termios *, speed_t);
1360 #endif /* defined(_NETBSD_SOURCE) */
1361 -__END_DECLS
1362 +#ifdef __cplusplus
1364 +#endif
1366 #endif /* !_KERNEL */
1368 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/time.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/time.h
1369 index d3afb43..af02ec0 100644
1370 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/time.h
1371 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/time.h
1372 @@ -175,7 +175,9 @@ struct itimerspec {
1373 #include <time.h>
1375 /* Functions useful for dealing with EFI */
1376 -__BEGIN_DECLS
1377 +#ifdef __cplusplus
1378 + extern "C" {
1379 +#endif
1381 /* Convert an EFI_TIME structure into a time_t value. */
1382 time_t Efi2Time( EFI_TIME *EfiBDtime);
1383 @@ -195,6 +197,8 @@ int gettimeofday (struct timeval *tp, void *ignore);
1384 int getitimer (int which, struct itimerval *value);
1385 int setitimer (int which, const struct itimerval *value, struct itimerval *ovalue);
1387 -__END_DECLS
1388 +#ifdef __cplusplus
1390 +#endif
1392 #endif /* !_SYS_TIME_H_ */
1393 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/uio.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/uio.h
1394 index 1f88a5e..143f83a 100644
1395 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/uio.h
1396 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/uio.h
1397 @@ -109,14 +109,18 @@ void uio_setup_sysspace(struct uio *);
1398 #ifndef _KERNEL
1399 #include <sys/EfiCdefs.h>
1401 -__BEGIN_DECLS
1402 +#ifdef __cplusplus
1403 + extern "C" {
1404 +#endif
1405 #if defined(_NETBSD_SOURCE)
1406 ssize_t preadv(int, const struct iovec *, int, off_t);
1407 ssize_t pwritev(int, const struct iovec *, int, off_t);
1408 #endif /* _NETBSD_SOURCE */
1409 ssize_t readv(int, const struct iovec *, int);
1410 ssize_t writev(int, const struct iovec *, int);
1411 -__END_DECLS
1412 +#ifdef __cplusplus
1414 +#endif
1415 #else
1416 int ureadc(int, struct uio *);
1417 #endif /* !_KERNEL */
1418 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/wait.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/wait.h
1419 index ec33ad1..2335e3e 100644
1420 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/wait.h
1421 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/sys/wait.h
1422 @@ -155,7 +155,9 @@ union wait {
1424 #define WSTOPPED _WSTOPPED
1426 -__BEGIN_DECLS
1427 +#ifdef __cplusplus
1428 + extern "C" {
1429 +#endif
1430 pid_t wait(int *);
1432 #if 0 /* Normally declared here but not implemented for UEFI. */
1433 @@ -165,6 +167,8 @@ pid_t waitpid(pid_t, int *, int);
1434 pid_t wait3(int *, int, struct rusage *);
1435 pid_t wait4(pid_t, int *, int, struct rusage *);
1436 #endif
1437 -__END_DECLS
1438 +#ifdef __cplusplus
1440 +#endif
1442 #endif /* !_SYS_WAIT_H_ */
1443 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/unistd.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/unistd.h
1444 index c0d81d5..8540974 100644
1445 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/unistd.h
1446 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/unistd.h
1447 @@ -32,7 +32,9 @@
1448 #define R_OK 0x04 /* test for read permission */
1451 -__BEGIN_DECLS
1452 +#ifdef __cplusplus
1453 + extern "C" {
1454 +#endif
1455 int dup(int);
1456 int rename(const char *, const char *);
1458 @@ -237,6 +239,8 @@ int rresvport_af(int *, int);
1459 int iruserok_sa(const void *, int, int, const char *, const char *);
1460 #endif /* Unimplemented functions. */
1462 -__END_DECLS
1463 +#ifdef __cplusplus
1465 +#endif
1467 #endif /* !_UNISTD_H_ */
1468 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/utime.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/utime.h
1469 index dcbf69d..d04ebc4 100644
1470 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/utime.h
1471 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/utime.h
1472 @@ -43,7 +43,7 @@
1473 #ifndef _UTIME_H_
1474 #define _UTIME_H_
1476 -#include <sys/cdefs.h>
1478 #include <machine/ansi.h>
1479 #include <sys/time.h>
1481 @@ -58,9 +58,13 @@ struct utimbuf {
1482 time_t modtime; /* Modification time */
1485 -__BEGIN_DECLS
1486 +#ifdef __cplusplus
1487 + extern "C" {
1488 +#endif
1489 int utime (const char *path, const struct utimbuf *times);
1490 int utimes (const char *path, const struct timeval *times);
1491 -__END_DECLS
1492 +#ifdef __cplusplus
1494 +#endif
1496 #endif /* !_UTIME_H_ */
1497 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/Include/wctype.h b/src/VBox/Devices/EFI/Firmware/StdLib/Include/wctype.h
1498 index b11503f..b0ce3ba 100644
1499 --- a/src/VBox/Devices/EFI/Firmware/StdLib/Include/wctype.h
1500 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/Include/wctype.h
1501 @@ -120,7 +120,9 @@
1502 #define WEOF ((wint_t)-1)
1503 #endif
1505 -__BEGIN_DECLS
1506 +#ifdef __cplusplus
1507 + extern "C" {
1508 +#endif
1509 /** Test for any wide character for which iswalpha or iswdigit is TRUE.
1511 @param[in] WC The wide character to be classified.
1512 @@ -338,6 +340,8 @@ __BEGIN_DECLS
1513 @return Returns the mapped value of WC using the mapping selected by WTr.
1515 wint_t towctrans (wint_t WC, wctrans_t WTr);
1516 -__END_DECLS
1517 +#ifdef __cplusplus
1519 +#endif
1521 #endif /* _WCTYPE_H_ */
1522 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Locale/ctypeio.h b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Locale/ctypeio.h
1523 index cda0b24..fe03144 100644
1524 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Locale/ctypeio.h
1525 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Locale/ctypeio.h
1526 @@ -29,7 +29,11 @@
1527 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1530 -__BEGIN_DECLS
1531 +#ifdef __cplusplus
1532 + extern "C" {
1533 +#endif
1534 int __loadctype (const char *);
1535 int __savectype (const char *, unsigned short *, unsigned char *, unsigned char *);
1536 -__END_DECLS
1537 +#ifdef __cplusplus
1539 +#endif
1540 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap16.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap16.c
1541 index b8d5a3a..34dec6a 100644
1542 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap16.c
1543 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap16.c
1544 @@ -5,7 +5,7 @@
1545 * Public domain.
1548 -//#include <sys/cdefs.h>
1550 //#if defined(LIBC_SCCS) && !defined(lint)
1551 //__RCSID("$NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
1552 //#endif /* LIBC_SCCS and not lint */
1553 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap32.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap32.c
1554 index f815be8..78cc592 100644
1555 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap32.c
1556 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap32.c
1557 @@ -5,7 +5,7 @@
1558 * Public domain.
1561 -//#include <sys/cdefs.h>
1563 //#if defined(LIBC_SCCS) && !defined(lint)
1564 //__RCSID("$NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
1565 //#endif /* LIBC_SCCS and not lint */
1566 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap64.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap64.c
1567 index 2d9b12e..600e290 100644
1568 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap64.c
1569 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Main/bswap64.c
1570 @@ -5,7 +5,7 @@
1571 * Public domain.
1574 -//#include <sys/cdefs.h>
1576 //#if defined(LIBC_SCCS) && !defined(lint)
1577 //__RCSID("$NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
1578 //#endif /* LIBC_SCCS and not lint */
1579 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcat.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcat.c
1580 index 17e7cc4..17e5388 100644
1581 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcat.c
1582 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcat.c
1583 @@ -23,7 +23,7 @@
1584 #include "nbtool_config.h"
1585 #endif
1587 -#include <sys/cdefs.h>
1589 #if defined(LIBC_SCCS) && !defined(lint)
1590 __RCSID("$NetBSD: strlcat.c,v 1.3 2007/06/04 18:19:27 christos Exp $");
1591 #endif /* LIBC_SCCS and not lint */
1592 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcpy.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcpy.c
1593 index 5caa282..3b78ada 100644
1594 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcpy.c
1595 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strlcpy.c
1596 @@ -23,7 +23,7 @@
1597 #include "nbtool_config.h"
1598 #endif
1600 -#include <sys/cdefs.h>
1602 #if defined(LIBC_SCCS) && !defined(lint)
1603 __RCSID("$NetBSD: strlcpy.c,v 1.3 2007/06/04 18:19:27 christos Exp $");
1604 #endif /* LIBC_SCCS and not lint */
1605 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strncasecmp.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strncasecmp.c
1606 index 3e3128f..3abcfab 100644
1607 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strncasecmp.c
1608 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strncasecmp.c
1609 @@ -41,7 +41,7 @@
1610 strcasecmp.c 8.1 (Berkeley) 6/4/93
1612 #include <LibConfig.h>
1613 -#include <sys/cdefs.h>
1616 #if !defined(_KERNEL) && !defined(_STANDALONE)
1617 #include "namespace.h"
1618 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strsep.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strsep.c
1619 index a9e248d..ebd4f6d 100644
1620 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strsep.c
1621 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/String/strsep.c
1622 @@ -32,7 +32,7 @@
1624 #include <LibConfig.h>
1626 -#include <sys/cdefs.h>
1628 #include <string.h>
1629 #include <stdio.h>
1631 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/TimeVals.h b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/TimeVals.h
1632 index 6e6371f..58ce21e 100644
1633 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/TimeVals.h
1634 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/TimeVals.h
1635 @@ -109,9 +109,13 @@ struct rule {
1636 #define DAY_OF_YEAR 1 /* n - day of year */
1637 #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */
1639 -__BEGIN_DECLS
1640 +#ifdef __cplusplus
1641 + extern "C" {
1642 +#endif
1643 extern void gmtload(struct state * const sp);
1644 extern void tzset(void);
1645 -__END_DECLS
1646 +#ifdef __cplusplus
1648 +#endif
1650 #endif /* _TIMEVAL_H */
1651 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/strptime.c b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/strptime.c
1652 index 5f65fd2..2ed1b86 100644
1653 --- a/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/strptime.c
1654 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Time/strptime.c
1655 @@ -48,7 +48,7 @@
1657 #include <LibConfig.h>
1659 -#include <sys/cdefs.h>
1662 #include "namespace.h"
1663 #include <time.h>
1664 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/closedir.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/closedir.c
1665 index 9852115..66a7f85 100644
1666 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/closedir.c
1667 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/closedir.c
1668 @@ -40,7 +40,7 @@
1669 NetBSD: closedir.c,v 1.15 2006/05/17 20:36:50 christos Exp
1670 closedir.c 8.1 (Berkeley) 6/10/93
1672 -#include <sys/cdefs.h>
1675 #include <namespace.h>
1676 #include <reentrant.h>
1677 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/dirname.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/dirname.c
1678 index c2a0c34..1e858da 100644
1679 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/dirname.c
1680 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/dirname.c
1681 @@ -39,7 +39,7 @@
1682 NetBSD: dirname.c,v 1.10 2008/05/10 22:39:40 christos Exp
1684 #include <LibConfig.h>
1685 -#include <sys/cdefs.h>
1688 #include <limits.h>
1689 #include <ctype.h>
1690 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/opendir.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/opendir.c
1691 index 106cfaa..8d79124 100644
1692 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/opendir.c
1693 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/opendir.c
1694 @@ -40,7 +40,7 @@
1695 NetBSD: opendir.c,v 1.33 2008/01/10 09:49:04 elad Exp
1696 opendir.c 8.7 (Berkeley) 12/10/94
1698 -#include <sys/cdefs.h>
1701 #include <namespace.h>
1702 #include <reentrant.h>
1703 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/readdir.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/readdir.c
1704 index 459cf02..07ac692 100644
1705 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/readdir.c
1706 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Gen/readdir.c
1707 @@ -40,7 +40,7 @@
1708 NetBSD: readdir.c,v 1.24 2008/05/04 18:53:26 tonnerre Exp
1709 readdir.c 8.3 (Berkeley) 9/29/94
1711 -#include <sys/cdefs.h>
1714 #include <namespace.h>
1715 #include <reentrant.h>
1716 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Glob/glob.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Glob/glob.c
1717 index e8c244b..713b03d 100644
1718 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Glob/glob.c
1719 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Glob/glob.c
1720 @@ -72,7 +72,7 @@
1722 #include <LibConfig.h>
1724 -#include <sys/cdefs.h>
1727 #include <sys/param.h>
1728 #include <sys/stat.h>
1729 diff --git a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Stringlist/stringlist.c b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Stringlist/stringlist.c
1730 index 94383fa..0ee242e 100644
1731 --- a/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Stringlist/stringlist.c
1732 +++ b/src/VBox/Devices/EFI/Firmware/StdLib/PosixLib/Stringlist/stringlist.c
1733 @@ -31,7 +31,7 @@
1734 #pragma warning ( disable : 4018 )
1735 #endif
1737 -#include <sys/cdefs.h>
1739 #if defined(LIBC_SCCS) && !defined(lint)
1740 __RCSID("$NetBSD: stringlist.c,v 1.13 2008/04/28 20:22:59 martin Exp $");
1741 #endif /* LIBC_SCCS and not lint */
1742 diff --git a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Console.h b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Console.h
1743 index 5c7ca43..3e9eeb2 100644
1744 --- a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Console.h
1745 +++ b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Console.h
1746 @@ -46,7 +46,9 @@ typedef struct {
1747 UINT32 Reserved_2; // Force the struct to be a multiple of 8-bytes long
1748 } ConInstance;
1750 -__BEGIN_DECLS
1751 +#ifdef __cplusplus
1752 + extern "C" {
1753 +#endif
1756 EFIAPI
1757 @@ -58,6 +60,8 @@ da_ConOpen(
1758 IN CHAR16 *MPath
1761 -__END_DECLS
1762 +#ifdef __cplusplus
1764 +#endif
1766 #endif /* _DEVICE_UEFI_CONSOLE_H */
1767 diff --git a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Device.h b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Device.h
1768 index 3c3a00a..58a10a3 100644
1769 --- a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Device.h
1770 +++ b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/Device/Device.h
1771 @@ -35,7 +35,9 @@ typedef struct _Device_Node {
1772 UINT32 OpModes; ///< Supported modes of operation
1773 } DeviceNode;
1775 -__BEGIN_DECLS
1776 +#ifdef __cplusplus
1777 + extern "C" {
1778 +#endif
1780 extern LIST_ENTRY daDeviceList; ///< List of registered devices.
1781 extern DeviceNode *daDefaultDevice; ///< Device to use if nothing else found
1782 @@ -211,6 +213,8 @@ GetFileNameFromPath(
1783 const wchar_t *Path
1786 -__END_DECLS
1787 +#ifdef __cplusplus
1789 +#endif
1791 #endif /* __DEV_UTILITY_H__ */
1792 diff --git a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/extern.h b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/extern.h
1793 index e41d27b..c9d4926 100644
1794 --- a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/extern.h
1795 +++ b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/extern.h
1796 @@ -31,7 +31,9 @@
1797 #include <Uefi.h>
1798 #include <time.h>
1800 -__BEGIN_DECLS
1801 +#ifdef __cplusplus
1802 + extern "C" {
1803 +#endif
1804 extern char *__minbrk;
1805 int __getcwd(char *, size_t);
1806 int __getlogin(char *, size_t);
1807 @@ -66,4 +68,6 @@ int __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);
1808 void Efi2Tm( EFI_TIME *ET, struct tm *BT);
1809 time_t Efi2Time( EFI_TIME *EfiBDtime);
1811 -__END_DECLS
1812 +#ifdef __cplusplus
1814 +#endif
1815 diff --git a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/kfile.h b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/kfile.h
1816 index 279858b..376a4ed 100644
1817 --- a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/kfile.h
1818 +++ b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/kfile.h
1819 @@ -147,7 +147,9 @@ do { \
1821 #define FOF_UPDATE_OFFSET 0x01 /* update the file offset */
1823 -__BEGIN_DECLS
1824 +#ifdef __cplusplus
1825 + extern "C" {
1826 +#endif
1828 int fdcreate (CHAR16 *, UINT32, UINT32, BOOLEAN, VOID *, const struct fileops *);
1830 @@ -166,7 +168,9 @@ int EFIAPI fbadop_rmdir (struct __filedes *filp);
1831 int EFIAPI fbadop_mkdir (const char *path, __mode_t perms);
1832 int EFIAPI fbadop_rename (const char *from, const char *to);
1834 -__END_DECLS
1835 +#ifdef __cplusplus
1837 +#endif
1839 /* From the original file... */
1840 #if 0
1841 @@ -261,7 +265,9 @@ struct file {
1842 #define FILE_UNUSE(fp, l) FILE_UNUSE_WLOCK(fp, l, 0)
1843 #define FILE_UNUSE_HAVELOCK(fp, l) FILE_UNUSE_WLOCK(fp, l, 1)
1845 -__BEGIN_DECLS
1846 +#ifdef __cplusplus
1847 + extern "C" {
1848 +#endif
1849 //int dofileread (struct lwp *, int, struct file *, void *, size_t, off_t *, int, register_t *);
1850 //int dofilewrite (struct lwp *, int, struct file *, const void *, size_t, off_t *, int, register_t *);
1852 @@ -283,7 +289,9 @@ __BEGIN_DECLS
1853 //int fnullop_kqfilter(struct file *, struct knote *);
1854 //int fbadop_stat (struct file *, struct stat *, struct lwp *);
1855 //int fbadop_ioctl (struct file *, u_long, void *, struct lwp *);
1856 -__END_DECLS
1857 +#ifdef __cplusplus
1859 +#endif
1861 #endif
1863 diff --git a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/reentrant.h b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/reentrant.h
1864 index 15507eb..772627d 100644
1865 --- a/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/reentrant.h
1866 +++ b/src/VBox/Devices/EFI/Firmware/StdLibPrivateInternalFiles/Include/reentrant.h
1867 @@ -133,7 +133,9 @@
1869 #ifndef __LIBC_THREAD_STUBS
1871 -__BEGIN_DECLS
1872 +#ifdef __cplusplus
1873 + extern "C" {
1874 +#endif
1875 int __libc_mutex_init(mutex_t *, const mutexattr_t *);
1876 int __libc_mutex_lock(mutex_t *);
1877 int __libc_mutex_trylock(mutex_t *);
1878 @@ -143,7 +145,9 @@ int __libc_mutex_destroy(mutex_t *);
1879 int __libc_mutexattr_init(mutexattr_t *);
1880 int __libc_mutexattr_settype(mutexattr_t *, int);
1881 int __libc_mutexattr_destroy(mutexattr_t *);
1882 -__END_DECLS
1883 +#ifdef __cplusplus
1885 +#endif
1887 #define mutex_init(m, a) __libc_mutex_init((m), (a))
1888 #define mutex_lock(m) __libc_mutex_lock((m))
1889 @@ -155,14 +159,18 @@ __END_DECLS
1890 #define mutexattr_settype(ma, t) __libc_mutexattr_settype((ma), (t))
1891 #define mutexattr_destroy(ma) __libc_mutexattr_destroy((ma))
1893 -__BEGIN_DECLS
1894 +#ifdef __cplusplus
1895 + extern "C" {
1896 +#endif
1897 int __libc_cond_init(cond_t *, const condattr_t *);
1898 int __libc_cond_signal(cond_t *);
1899 int __libc_cond_broadcast(cond_t *);
1900 int __libc_cond_wait(cond_t *, mutex_t *);
1901 int __libc_cond_timedwait(cond_t *, mutex_t *, const struct timespec *);
1902 int __libc_cond_destroy(cond_t *);
1903 -__END_DECLS
1904 +#ifdef __cplusplus
1906 +#endif
1908 #define cond_init(c, t, a) __libc_cond_init((c), (a))
1909 #define cond_signal(c) __libc_cond_signal((c))
1910 @@ -171,7 +179,9 @@ __END_DECLS
1911 #define cond_timedwait(c, m, t) __libc_cond_timedwait((c), (m), (t))
1912 #define cond_destroy(c) __libc_cond_destroy((c))
1914 -__BEGIN_DECLS
1915 +#ifdef __cplusplus
1916 + extern "C" {
1917 +#endif
1918 int __libc_rwlock_init(rwlock_t *, const rwlockattr_t *);
1919 int __libc_rwlock_rdlock(rwlock_t *);
1920 int __libc_rwlock_wrlock(rwlock_t *);
1921 @@ -179,7 +189,9 @@ int __libc_rwlock_tryrdlock(rwlock_t *);
1922 int __libc_rwlock_trywrlock(rwlock_t *);
1923 int __libc_rwlock_unlock(rwlock_t *);
1924 int __libc_rwlock_destroy(rwlock_t *);
1925 -__END_DECLS
1926 +#ifdef __cplusplus
1928 +#endif
1930 #define rwlock_init(l, a) __libc_rwlock_init((l), (a))
1931 #define rwlock_rdlock(l) __libc_rwlock_rdlock((l))
1932 @@ -189,19 +201,25 @@ __END_DECLS
1933 #define rwlock_unlock(l) __libc_rwlock_unlock((l))
1934 #define rwlock_destroy(l) __libc_rwlock_destroy((l))
1936 -__BEGIN_DECLS
1937 +#ifdef __cplusplus
1938 + extern "C" {
1939 +#endif
1940 int __libc_thr_keycreate(thread_key_t *, void (*)(void *));
1941 int __libc_thr_setspecific(thread_key_t, const void *);
1942 void *__libc_thr_getspecific(thread_key_t);
1943 int __libc_thr_keydelete(thread_key_t);
1944 -__END_DECLS
1945 +#ifdef __cplusplus
1947 +#endif
1949 #define thr_keycreate(k, d) __libc_thr_keycreate((k), (d))
1950 #define thr_setspecific(k, p) __libc_thr_setspecific((k), (p))
1951 #define thr_getspecific(k) __libc_thr_getspecific((k))
1952 #define thr_keydelete(k) __libc_thr_keydelete((k))
1954 -__BEGIN_DECLS
1955 +#ifdef __cplusplus
1956 + extern "C" {
1957 +#endif
1958 int __libc_thr_once(once_t *, void (*)(void));
1959 int __libc_thr_sigsetmask(int, const sigset_t *, sigset_t *);
1960 thr_t __libc_thr_self(void);
1961 @@ -213,7 +231,9 @@ int *__libc_thr_errno(void);
1962 int __libc_thr_setcancelstate(int, int *);
1964 extern int __isthreaded;
1965 -__END_DECLS
1966 +#ifdef __cplusplus
1968 +#endif
1970 #define thr_once(o, f) __libc_thr_once((o), (f))
1971 #define thr_sigsetmask(f, n, o) __libc_thr_sigsetmask((f), (n), (o))
1972 diff --git a/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c b/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
1973 index 2c87158..a7474f0 100644
1974 --- a/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
1975 +++ b/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c
1976 @@ -38,7 +38,7 @@
1979 #ifndef VBOX
1980 -#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
1981 + /* RCS ID & Copyright macro defns */
1982 __FBSDID("$FreeBSD: src/sys/amd64/amd64/in_cksum.c,v 1.5.20.1 2009/04/15 03:14:26 kensmith Exp $");
1984 #include <sys/param.h>
1985 diff --git a/src/VBox/Devices/Network/slirp/bsd/amd64/include/in_cksum.h b/src/VBox/Devices/Network/slirp/bsd/amd64/include/in_cksum.h
1986 index 47a4565..7e6c0eb 100644
1987 --- a/src/VBox/Devices/Network/slirp/bsd/amd64/include/in_cksum.h
1988 +++ b/src/VBox/Devices/Network/slirp/bsd/amd64/include/in_cksum.h
1989 @@ -40,7 +40,7 @@
1990 #error this file needs sys/cdefs.h as a prerequisite
1991 #endif
1993 -#include <sys/cdefs.h>
1995 #else
1996 # include "slirp.h"
1997 #endif
1998 diff --git a/src/VBox/Devices/Network/slirp/bsd/i386/in_cksum.c b/src/VBox/Devices/Network/slirp/bsd/i386/in_cksum.c
1999 index 2be7063..8c3b013 100644
2000 --- a/src/VBox/Devices/Network/slirp/bsd/i386/in_cksum.c
2001 +++ b/src/VBox/Devices/Network/slirp/bsd/i386/in_cksum.c
2002 @@ -31,7 +31,7 @@
2005 #ifndef VBOX
2006 -#include <sys/cdefs.h>
2008 __FBSDID("$FreeBSD: src/sys/i386/i386/in_cksum.c,v 1.28.10.1.6.1 2009/04/15 03:14:26 kensmith Exp $");
2011 diff --git a/src/VBox/Devices/Network/slirp/bsd/i386/include/in_cksum.h b/src/VBox/Devices/Network/slirp/bsd/i386/include/in_cksum.h
2012 index 0d20d19..4712984 100644
2013 --- a/src/VBox/Devices/Network/slirp/bsd/i386/include/in_cksum.h
2014 +++ b/src/VBox/Devices/Network/slirp/bsd/i386/include/in_cksum.h
2015 @@ -44,7 +44,7 @@
2016 * MP safe (alfred)
2019 -#include <sys/cdefs.h>
2021 #else
2022 # include "slirp.h"
2023 #endif
2024 diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c b/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
2025 index dbcba93..3c51812 100644
2026 --- a/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
2027 +++ b/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
2028 @@ -26,7 +26,7 @@
2031 #ifndef VBOX
2032 -#include <sys/cdefs.h>
2034 __FBSDID("$FreeBSD: src/sys/kern/kern_mbuf.c,v 1.32.2.5.2.1 2009/04/15 03:14:26 kensmith Exp $");
2036 #include "opt_mac.h"
2037 diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/subr_sbuf.c b/src/VBox/Devices/Network/slirp/bsd/kern/subr_sbuf.c
2038 index e434b3d..ecc2daa 100644
2039 --- a/src/VBox/Devices/Network/slirp/bsd/kern/subr_sbuf.c
2040 +++ b/src/VBox/Devices/Network/slirp/bsd/kern/subr_sbuf.c
2041 @@ -27,7 +27,7 @@
2044 #ifndef VBOX
2045 -#include <sys/cdefs.h>
2047 __FBSDID("$FreeBSD: src/sys/kern/subr_sbuf.c,v 1.30.8.1 2009/04/15 03:14:26 kensmith Exp $");
2049 #include <sys/param.h>
2050 diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
2051 index ee968bf..c1ad5b9 100644
2052 --- a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
2053 +++ b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c
2054 @@ -30,7 +30,7 @@
2057 #ifndef VBOX
2058 -#include <sys/cdefs.h>
2060 __FBSDID("$FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.174.2.3.2.1 2009/04/15 03:14:26 kensmith Exp $");
2062 #include "opt_mac.h"
2063 diff --git a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c
2064 index 5f3abde..fc8f09e 100644
2065 --- a/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c
2066 +++ b/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c
2067 @@ -60,7 +60,7 @@
2068 * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95
2070 #ifndef VBOX
2071 -#include <sys/cdefs.h>
2073 __FBSDID("$FreeBSD: src/sys/kern/uipc_mbuf2.c,v 1.33.8.1 2009/04/15 03:14:26 kensmith Exp $");
2075 /*#define PULLDOWN_DEBUG*/
2076 diff --git a/src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h b/src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h
2077 index 3f59c46..f5ca6b3 100644
2078 --- a/src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h
2079 +++ b/src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h
2080 @@ -55,7 +55,9 @@ struct sbuf {
2081 int s_flags; /* flags */
2084 -__BEGIN_DECLS
2085 +#ifdef __cplusplus
2086 + extern "C" {
2087 +#endif
2089 * API functions
2091 @@ -90,6 +92,8 @@ struct sbuf *sbuf_uionew(struct sbuf *, struct uio *, int *);
2092 int sbuf_bcopyin(struct sbuf *, const void *, size_t);
2093 int sbuf_copyin(struct sbuf *, const void *, size_t);
2094 #endif
2095 -__END_DECLS
2096 +#ifdef __cplusplus
2098 +#endif
2100 #endif
2101 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias.c b/src/VBox/Devices/Network/slirp/libalias/alias.c
2102 index 0b2100a..69fa656 100644
2103 --- a/src/VBox/Devices/Network/slirp/libalias/alias.c
2104 +++ b/src/VBox/Devices/Network/slirp/libalias/alias.c
2105 @@ -24,7 +24,7 @@
2106 * SUCH DAMAGE.
2108 #ifndef VBOX
2109 -#include <sys/cdefs.h>
2111 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias.c,v 1.58.2.1.4.1 2009/04/15 03:14:26 kensmith Exp $");
2112 #endif
2114 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_cuseeme.c b/src/VBox/Devices/Network/slirp/libalias/alias_cuseeme.c
2115 index 9b5c6a5..b0d3977 100644
2116 --- a/src/VBox/Devices/Network/slirp/libalias/alias_cuseeme.c
2117 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_cuseeme.c
2118 @@ -26,7 +26,7 @@
2119 * SUCH DAMAGE.
2122 -#include <sys/cdefs.h>
2124 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_cuseeme.c,v 1.13.8.1 2009/04/15 03:14:26 kensmith Exp $");
2126 #ifdef _KERNEL
2127 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_db.c b/src/VBox/Devices/Network/slirp/libalias/alias_db.c
2128 index 7a37dc8..f6fbbbd 100644
2129 --- a/src/VBox/Devices/Network/slirp/libalias/alias_db.c
2130 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_db.c
2131 @@ -25,7 +25,7 @@
2134 #ifndef VBOX
2135 -#include <sys/cdefs.h>
2137 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_db.c,v 1.71.2.2.4.1 2009/04/15 03:14:26 kensmith Exp $");
2138 #endif
2140 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_dummy.c b/src/VBox/Devices/Network/slirp/libalias/alias_dummy.c
2141 index 31220c5..156031c 100644
2142 --- a/src/VBox/Devices/Network/slirp/libalias/alias_dummy.c
2143 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_dummy.c
2144 @@ -24,7 +24,7 @@
2145 * SUCH DAMAGE.
2148 -#include <sys/cdefs.h>
2150 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_dummy.c,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $");
2153 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c b/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
2154 index 64596be..0e5d294 100644
2155 --- a/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
2156 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
2157 @@ -25,7 +25,7 @@
2160 #ifndef VBOX
2161 -#include <sys/cdefs.h>
2163 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_ftp.c,v 1.29.2.1.4.1 2009/04/15 03:14:26 kensmith Exp $");
2166 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_irc.c b/src/VBox/Devices/Network/slirp/libalias/alias_irc.c
2167 index d552133..67079c7 100644
2168 --- a/src/VBox/Devices/Network/slirp/libalias/alias_irc.c
2169 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_irc.c
2170 @@ -24,7 +24,7 @@
2171 * SUCH DAMAGE.
2174 -#include <sys/cdefs.h>
2176 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_irc.c,v 1.23.2.2.4.1 2009/04/15 03:14:26 kensmith Exp $");
2178 /* Alias_irc.c intercepts packages contain IRC CTCP commands, and
2179 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_mod.c b/src/VBox/Devices/Network/slirp/libalias/alias_mod.c
2180 index 4423bc3..ae9c804 100644
2181 --- a/src/VBox/Devices/Network/slirp/libalias/alias_mod.c
2182 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_mod.c
2183 @@ -25,7 +25,7 @@
2186 #ifndef VBOX
2187 -#include <sys/cdefs.h>
2189 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_mod.c,v 1.3.8.1 2009/04/15 03:14:26 kensmith Exp $");
2191 #ifdef _KERNEL
2192 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c b/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
2193 index 221b4cd..934037a 100644
2194 --- a/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
2195 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
2196 @@ -29,7 +29,7 @@
2199 #ifndef VBOX
2200 -#include <sys/cdefs.h>
2202 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_nbt.c,v 1.20.8.1 2009/04/15 03:14:26 kensmith Exp $");
2205 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_old.c b/src/VBox/Devices/Network/slirp/libalias/alias_old.c
2206 index 7a85be1..f45f5ef 100644
2207 --- a/src/VBox/Devices/Network/slirp/libalias/alias_old.c
2208 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_old.c
2209 @@ -24,7 +24,7 @@
2210 * SUCH DAMAGE.
2213 -#include <sys/cdefs.h>
2215 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_old.c,v 1.8.8.1 2009/04/15 03:14:26 kensmith Exp $");
2217 #ifdef _KERNEL
2218 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_pptp.c b/src/VBox/Devices/Network/slirp/libalias/alias_pptp.c
2219 index 601e87a..6b80baf 100644
2220 --- a/src/VBox/Devices/Network/slirp/libalias/alias_pptp.c
2221 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_pptp.c
2222 @@ -36,7 +36,7 @@
2223 * Author: Erik Salander <erik@whistle.com>
2226 -#include <sys/cdefs.h>
2228 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_pptp.c,v 1.15.8.1 2009/04/15 03:14:26 kensmith Exp $");
2230 /* Includes */
2231 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c b/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
2232 index edbbe0e..5f94149 100644
2233 --- a/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
2234 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c
2235 @@ -25,7 +25,7 @@
2238 #ifndef VBOX
2239 -#include <sys/cdefs.h>
2241 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_proxy.c,v 1.31.8.1 2009/04/15 03:14:26 kensmith Exp $");
2243 /* file: alias_proxy.c
2244 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_smedia.c b/src/VBox/Devices/Network/slirp/libalias/alias_smedia.c
2245 index 7596956..66311f7 100644
2246 --- a/src/VBox/Devices/Network/slirp/libalias/alias_smedia.c
2247 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_smedia.c
2248 @@ -63,7 +63,7 @@
2249 * <junichi@junichi.org>
2252 -#include <sys/cdefs.h>
2254 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_smedia.c,v 1.17.8.1 2009/04/15 03:14:26 kensmith Exp $");
2257 diff --git a/src/VBox/Devices/Network/slirp/libalias/alias_util.c b/src/VBox/Devices/Network/slirp/libalias/alias_util.c
2258 index 9a0310d..483d584 100644
2259 --- a/src/VBox/Devices/Network/slirp/libalias/alias_util.c
2260 +++ b/src/VBox/Devices/Network/slirp/libalias/alias_util.c
2261 @@ -25,7 +25,7 @@
2264 #ifndef VBOX
2265 -#include <sys/cdefs.h>
2267 __FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_util.c,v 1.20.8.1 2009/04/15 03:14:26 kensmith Exp $");
2270 diff --git a/src/VBox/Runtime/common/checksum/crc32.cpp b/src/VBox/Runtime/common/checksum/crc32.cpp
2271 index bae5647..d7c4288 100644
2272 --- a/src/VBox/Runtime/common/checksum/crc32.cpp
2273 +++ b/src/VBox/Runtime/common/checksum/crc32.cpp
2274 @@ -68,7 +68,7 @@
2277 #if 0
2278 -#include <sys/cdefs.h>
2280 __FBSDID("$FreeBSD: src/sys/libkern/crc32.c,v 1.2 2003/06/11 05:23:04 obrien Exp $");
2282 #include <sys/param.h>
2283 diff --git a/src/VBox/Runtime/common/math/gcc/adddi3.c b/src/VBox/Runtime/common/math/gcc/adddi3.c
2284 index ce2b1d8..7971d7e 100644
2285 --- a/src/VBox/Runtime/common/math/gcc/adddi3.c
2286 +++ b/src/VBox/Runtime/common/math/gcc/adddi3.c
2287 @@ -33,7 +33,7 @@
2288 * SUCH DAMAGE.
2291 -/*#include <sys/cdefs.h>
2293 #if defined(LIBC_SCCS) && !defined(lint)
2294 #if 0
2295 static char sccsid[] = "@(#)adddi3.c 8.1 (Berkeley) 6/4/93";
2296 diff --git a/src/VBox/Runtime/common/math/gcc/anddi3.c b/src/VBox/Runtime/common/math/gcc/anddi3.c
2297 index 2f35ced..0dc17b0 100644
2298 --- a/src/VBox/Runtime/common/math/gcc/anddi3.c
2299 +++ b/src/VBox/Runtime/common/math/gcc/anddi3.c
2300 @@ -33,7 +33,7 @@
2301 * SUCH DAMAGE.
2304 -/*#include <sys/cdefs.h>
2306 #if defined(LIBC_SCCS) && !defined(lint)
2307 #if 0
2308 static char sccsid[] = "@(#)anddi3.c 8.1 (Berkeley) 6/4/93";
2309 diff --git a/src/VBox/Runtime/common/math/gcc/ashldi3.c b/src/VBox/Runtime/common/math/gcc/ashldi3.c
2310 index e7df3c1..5b02003 100644
2311 --- a/src/VBox/Runtime/common/math/gcc/ashldi3.c
2312 +++ b/src/VBox/Runtime/common/math/gcc/ashldi3.c
2313 @@ -33,7 +33,7 @@
2314 * SUCH DAMAGE.
2317 -/*#include <sys/cdefs.h>
2319 #if defined(LIBC_SCCS) && !defined(lint)
2320 #if 0
2321 static char sccsid[] = "@(#)ashldi3.c 8.1 (Berkeley) 6/4/93";
2322 diff --git a/src/VBox/Runtime/common/math/gcc/ashrdi3.c b/src/VBox/Runtime/common/math/gcc/ashrdi3.c
2323 index aaa1c71..7c37209 100644
2324 --- a/src/VBox/Runtime/common/math/gcc/ashrdi3.c
2325 +++ b/src/VBox/Runtime/common/math/gcc/ashrdi3.c
2326 @@ -33,7 +33,7 @@
2327 * SUCH DAMAGE.
2330 -/*#include <sys/cdefs.h>
2332 #if defined(LIBC_SCCS) && !defined(lint)
2333 #if 0
2334 static char sccsid[] = "@(#)ashrdi3.c 8.1 (Berkeley) 6/4/93";
2335 diff --git a/src/VBox/Runtime/common/math/gcc/cmpdi2.c b/src/VBox/Runtime/common/math/gcc/cmpdi2.c
2336 index c876eb4..5999d2a 100644
2337 --- a/src/VBox/Runtime/common/math/gcc/cmpdi2.c
2338 +++ b/src/VBox/Runtime/common/math/gcc/cmpdi2.c
2339 @@ -33,7 +33,7 @@
2340 * SUCH DAMAGE.
2343 -/*#include <sys/cdefs.h>
2345 #if defined(LIBC_SCCS) && !defined(lint)
2346 #if 0
2347 static char sccsid[] = "@(#)cmpdi2.c 8.1 (Berkeley) 6/4/93";
2348 diff --git a/src/VBox/Runtime/common/math/gcc/divdi3.c b/src/VBox/Runtime/common/math/gcc/divdi3.c
2349 index eecc17a..73148d4 100644
2350 --- a/src/VBox/Runtime/common/math/gcc/divdi3.c
2351 +++ b/src/VBox/Runtime/common/math/gcc/divdi3.c
2352 @@ -33,7 +33,7 @@
2353 * SUCH DAMAGE.
2356 -/*#include <sys/cdefs.h>
2358 #if defined(LIBC_SCCS) && !defined(lint)
2359 #if 0
2360 static char sccsid[] = "@(#)divdi3.c 8.1 (Berkeley) 6/4/93";
2361 diff --git a/src/VBox/Runtime/common/math/gcc/iordi3.c b/src/VBox/Runtime/common/math/gcc/iordi3.c
2362 index 3d0a7ed..a35bbb6 100644
2363 --- a/src/VBox/Runtime/common/math/gcc/iordi3.c
2364 +++ b/src/VBox/Runtime/common/math/gcc/iordi3.c
2365 @@ -33,7 +33,7 @@
2366 * SUCH DAMAGE.
2369 -/*#include <sys/cdefs.h>
2371 #if defined(LIBC_SCCS) && !defined(lint)
2372 #if 0
2373 static char sccsid[] = "@(#)iordi3.c 8.1 (Berkeley) 6/4/93";
2374 diff --git a/src/VBox/Runtime/common/math/gcc/lshldi3.c b/src/VBox/Runtime/common/math/gcc/lshldi3.c
2375 index 611cb08..ced7586 100644
2376 --- a/src/VBox/Runtime/common/math/gcc/lshldi3.c
2377 +++ b/src/VBox/Runtime/common/math/gcc/lshldi3.c
2378 @@ -33,7 +33,7 @@
2379 * SUCH DAMAGE.
2382 -/*#include <sys/cdefs.h>
2384 #if defined(LIBC_SCCS) && !defined(lint)
2385 #if 0
2386 static char sccsid[] = "@(#)lshldi3.c 8.1 (Berkeley) 6/4/93";
2387 diff --git a/src/VBox/Runtime/common/math/gcc/lshrdi3.c b/src/VBox/Runtime/common/math/gcc/lshrdi3.c
2388 index 3dba60c..76e4e5e 100644
2389 --- a/src/VBox/Runtime/common/math/gcc/lshrdi3.c
2390 +++ b/src/VBox/Runtime/common/math/gcc/lshrdi3.c
2391 @@ -33,7 +33,7 @@
2392 * SUCH DAMAGE.
2395 -/*#include <sys/cdefs.h>
2397 #if defined(LIBC_SCCS) && !defined(lint)
2398 #if 0
2399 static char sccsid[] = "@(#)lshrdi3.c 8.1 (Berkeley) 6/4/93";
2400 diff --git a/src/VBox/Runtime/common/math/gcc/moddi3.c b/src/VBox/Runtime/common/math/gcc/moddi3.c
2401 index 764ea01..19d0fee 100644
2402 --- a/src/VBox/Runtime/common/math/gcc/moddi3.c
2403 +++ b/src/VBox/Runtime/common/math/gcc/moddi3.c
2404 @@ -33,7 +33,7 @@
2405 * SUCH DAMAGE.
2408 -/*#include <sys/cdefs.h>
2410 #if defined(LIBC_SCCS) && !defined(lint)
2411 #if 0
2412 static char sccsid[] = "@(#)moddi3.c 8.1 (Berkeley) 6/4/93";
2413 diff --git a/src/VBox/Runtime/common/math/gcc/muldi3.c b/src/VBox/Runtime/common/math/gcc/muldi3.c
2414 index 370ef3d..baa8cdb 100644
2415 --- a/src/VBox/Runtime/common/math/gcc/muldi3.c
2416 +++ b/src/VBox/Runtime/common/math/gcc/muldi3.c
2417 @@ -33,7 +33,7 @@
2418 * SUCH DAMAGE.
2421 -/*#include <sys/cdefs.h>
2423 #if defined(LIBC_SCCS) && !defined(lint)
2424 #if 0
2425 static char sccsid[] = "@(#)muldi3.c 8.1 (Berkeley) 6/4/93";
2426 diff --git a/src/VBox/Runtime/common/math/gcc/negdi2.c b/src/VBox/Runtime/common/math/gcc/negdi2.c
2427 index 2eafcff..d8acd5a 100644
2428 --- a/src/VBox/Runtime/common/math/gcc/negdi2.c
2429 +++ b/src/VBox/Runtime/common/math/gcc/negdi2.c
2430 @@ -33,7 +33,7 @@
2431 * SUCH DAMAGE.
2434 -/*#include <sys/cdefs.h>
2436 #if defined(LIBC_SCCS) && !defined(lint)
2437 #if 0
2438 static char sccsid[] = "@(#)negdi2.c 8.1 (Berkeley) 6/4/93";
2439 diff --git a/src/VBox/Runtime/common/math/gcc/notdi2.c b/src/VBox/Runtime/common/math/gcc/notdi2.c
2440 index c671e03..c9d8ae3 100644
2441 --- a/src/VBox/Runtime/common/math/gcc/notdi2.c
2442 +++ b/src/VBox/Runtime/common/math/gcc/notdi2.c
2443 @@ -33,7 +33,7 @@
2444 * SUCH DAMAGE.
2447 -/*#include <sys/cdefs.h>
2449 #if defined(LIBC_SCCS) && !defined(lint)
2450 #if 0
2451 static char sccsid[] = "@(#)notdi2.c 8.1 (Berkeley) 6/4/93";
2452 diff --git a/src/VBox/Runtime/common/math/gcc/qdivrem.c b/src/VBox/Runtime/common/math/gcc/qdivrem.c
2453 index 7ca2d38..7f5809c 100644
2454 --- a/src/VBox/Runtime/common/math/gcc/qdivrem.c
2455 +++ b/src/VBox/Runtime/common/math/gcc/qdivrem.c
2456 @@ -33,7 +33,7 @@
2457 * SUCH DAMAGE.
2460 -/*#include <sys/cdefs.h>
2462 #if defined(LIBC_SCCS) && !defined(lint)
2463 #if 0
2464 static char sccsid[] = "@(#)qdivrem.c 8.1 (Berkeley) 6/4/93";
2465 diff --git a/src/VBox/Runtime/common/math/gcc/subdi3.c b/src/VBox/Runtime/common/math/gcc/subdi3.c
2466 index 2751acc..15d46a1 100644
2467 --- a/src/VBox/Runtime/common/math/gcc/subdi3.c
2468 +++ b/src/VBox/Runtime/common/math/gcc/subdi3.c
2469 @@ -33,7 +33,7 @@
2470 * SUCH DAMAGE.
2473 -/*#include <sys/cdefs.h>
2475 #if defined(LIBC_SCCS) && !defined(lint)
2476 #if 0
2477 static char sccsid[] = "@(#)subdi3.c 8.1 (Berkeley) 6/4/93";
2478 diff --git a/src/VBox/Runtime/common/math/gcc/ucmpdi2.c b/src/VBox/Runtime/common/math/gcc/ucmpdi2.c
2479 index 47d7916..2cdebfc 100644
2480 --- a/src/VBox/Runtime/common/math/gcc/ucmpdi2.c
2481 +++ b/src/VBox/Runtime/common/math/gcc/ucmpdi2.c
2482 @@ -33,7 +33,7 @@
2483 * SUCH DAMAGE.
2486 -/*#include <sys/cdefs.h>
2488 #if defined(LIBC_SCCS) && !defined(lint)
2489 #if 0
2490 static char sccsid[] = "@(#)ucmpdi2.c 8.1 (Berkeley) 6/4/93";
2491 diff --git a/src/VBox/Runtime/common/math/gcc/udivdi3.c b/src/VBox/Runtime/common/math/gcc/udivdi3.c
2492 index 9069f4d..6cd1e97 100644
2493 --- a/src/VBox/Runtime/common/math/gcc/udivdi3.c
2494 +++ b/src/VBox/Runtime/common/math/gcc/udivdi3.c
2495 @@ -33,7 +33,7 @@
2496 * SUCH DAMAGE.
2499 -/*#include <sys/cdefs.h>
2501 #if defined(LIBC_SCCS) && !defined(lint)
2502 #if 0
2503 static char sccsid[] = "@(#)udivdi3.c 8.1 (Berkeley) 6/4/93";
2504 diff --git a/src/VBox/Runtime/common/math/gcc/umoddi3.c b/src/VBox/Runtime/common/math/gcc/umoddi3.c
2505 index 2e65eca..eaa3de4 100644
2506 --- a/src/VBox/Runtime/common/math/gcc/umoddi3.c
2507 +++ b/src/VBox/Runtime/common/math/gcc/umoddi3.c
2508 @@ -33,7 +33,7 @@
2509 * SUCH DAMAGE.
2512 -/*#include <sys/cdefs.h>
2514 #if defined(LIBC_SCCS) && !defined(lint)
2515 #if 0
2516 static char sccsid[] = "@(#)umoddi3.c 8.1 (Berkeley) 6/4/93";
2517 diff --git a/src/VBox/Runtime/common/math/gcc/xordi3.c b/src/VBox/Runtime/common/math/gcc/xordi3.c
2518 index aa5db22..68e79a9 100644
2519 --- a/src/VBox/Runtime/common/math/gcc/xordi3.c
2520 +++ b/src/VBox/Runtime/common/math/gcc/xordi3.c
2521 @@ -33,7 +33,7 @@
2522 * SUCH DAMAGE.
2525 -/*#include <sys/cdefs.h>
2527 #if defined(LIBC_SCCS) && !defined(lint)
2528 #if 0
2529 static char sccsid[] = "@(#)xordi3.c 8.1 (Berkeley) 6/4/93";
2530 diff --git a/src/VBox/Runtime/common/math/x86/fenv-x86.c b/src/VBox/Runtime/common/math/x86/fenv-x86.c
2531 index 58c9184..9eb4a73 100644
2532 --- a/src/VBox/Runtime/common/math/x86/fenv-x86.c
2533 +++ b/src/VBox/Runtime/common/math/x86/fenv-x86.c
2534 @@ -27,7 +27,7 @@
2537 /*#include "namespace.h"
2538 -#include <sys/cdefs.h>
2540 #include <sys/types.h>
2541 #include <machine/npx.h>
2542 #include "fenv.h"*/
2543 diff --git a/src/libs/libxml2-2.9.2/macos/src/libxml2_GUSIConfig.cp b/src/libs/libxml2-2.9.2/macos/src/libxml2_GUSIConfig.cp
2544 index 519c48f..6b516d6 100644
2545 --- a/src/libs/libxml2-2.9.2/macos/src/libxml2_GUSIConfig.cp
2546 +++ b/src/libs/libxml2-2.9.2/macos/src/libxml2_GUSIConfig.cp
2547 @@ -8,11 +8,13 @@
2549 #define GUSI_SOURCE
2550 #include <GUSIConfig.h>
2551 -#include <sys/cdefs.h>
2554 /* Declarations of Socket Factories */
2556 -__BEGIN_DECLS
2557 +#ifdef __cplusplus
2558 + extern "C" {
2559 +#endif
2560 void GUSIwithInetSockets();
2561 void GUSIwithLocalSockets();
2562 void GUSIwithMTInetSockets();
2563 @@ -23,7 +25,9 @@ void GUSIwithOTTcpSockets();
2564 void GUSIwithOTUdpSockets();
2565 void GUSIwithPPCSockets();
2566 void GUSISetupFactories();
2567 -__END_DECLS
2568 +#ifdef __cplusplus
2570 +#endif
2572 /* Configure Socket Factories */
2574 @@ -40,10 +44,14 @@ void GUSISetupFactories()
2576 /* Declarations of File Devices */
2578 -__BEGIN_DECLS
2579 +#ifdef __cplusplus
2580 + extern "C" {
2581 +#endif
2582 void GUSIwithNullSockets();
2583 void GUSISetupDevices();
2584 -__END_DECLS
2585 +#ifdef __cplusplus
2587 +#endif
2589 /* Configure File Devices */
2592 2.8.4