Isn't __cplusplus defined for all C++ compilers?

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

This is pretty common in library header files at least.

 - Stig

On Mon, 2002-12-02 at 16:18, J Smith wrote:
> Taking a few comments into consideration, here's a new patch for adding C++ 
> code-generating abilities to ext_skel. The new patch doesn't use a separate 
> skeleton.cpp file. Instead, it adds some lines like 
> 
> /* __begin_extern_c__ */
> /* __end_extern_c__ */
> 
> to skeleton.c and lets ext_skel either replace them with the proper C++ 
> stuff or get rid of it altogether. I didn't want to make the extname.c 
> output any more complicated with #ifdef __cplusplus preprocessor nonsense, 
> 'cause having extension first-timers asking why there's C++ stuff in their 
> C file would suck.
> 
> Another slight change to skeleton.c just gets rid of the string named 
> "string" and replaces it with "str". This is just to get rid of any 
> conflict that might come up if someone #includes the C++ string library in 
> their extension, so they don't need to worry about C-string named "string" 
> being confused with the C++ data type "string".
> 
> Comments?
> 
> J
> 
> 
> ______________________________________________________________________
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to