famzah / popen-noshell

A much faster popen() and system() implementation for Linux
68 stars 13 forks source link

Use __cplusplus guard #14

Closed jbglaw closed 6 years ago

jbglaw commented 6 years ago

Hi!

With automated build systems, the popen_noshell.c is built with C bindings, but the header file might be read by a C++ compiler (and thus create C++ mangled symbol names.)

This small patch forces a C++ compiler to use the proper C symbols. That will enable to link the C code with a C++ compiler/linker, and will still work then the C code is actually compiled with a C++ compiler.

Thanks, Jan-Benedict

famzah commented 6 years ago

Jan-Benedict, thank you for your contribution.