header for C - unistd.h

P

Pasacco

Dear

I need to modify a program that is written by other people, and I see
#include <unistd.h>
#include <zlib.h>

which is not a standard C++ header.

Could someone kindly tell me which header files in C++ are compatible
with the above?

Thankyou in advance
 
M

Malte Starostik

Pasacco said:
Dear

I need to modify a program that is written by other people, and I see
#include <unistd.h>
#include <zlib.h>

which is not a standard C++ header.
Right, they are OS (unistd.h) and library (zlib.h) specific.
Could someone kindly tell me which header files in C++ are compatible
with the above?
There are various C++ wrappers for zlib that you could use, GIYF.
I don't know of any wrapper for all of unistd.h but then, it's not
really needed. I'm not aware of any variant of that header that doesn't
have an extern "C" around all function declarations if compiled by a C++
compiler. If you're worried by the fact that it's platform-specific,
you'd have to go through the code, check what functions of unistd.h it
uses and replace them with portable alternatives.

Cheers,
Malte
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top