weeding out c++ keywords from sys/sys

Christoph Mallon christoph.mallon at gmx.de
Sun Feb 15 10:12:05 PST 2009


Michael Butler schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I know that using a "wrapper", something like:
> 
> #ifdef __cplusplus
> namespace __whatever
> {
>   extern "C"
>   {
> #endif
> 
> 	[ .. bunch of C prototypes .. ]
> 
> #ifdef __cplusplus
> }
> #endif
> 
>  .. stops C++ from mangling the prototyped functions so they'll link
> correctly but does it temporarily disable the "reserved word" tests?
> Should it? ;-)

No, it doesn't. extern $STRING (the standard only requires "C" and 
"C++", but there can be more) just changes the linkage of declarations 
(name mangling, calling convention).


More information about the freebsd-current mailing list