[Mingw-users] Including library for unistd.h header
- Date: Thu, 29 Sep 2005 02:26:59 +0300
- From: Tor Lillqvist <tml@xxxxxx>
- Subject: [Mingw-users] Including library for unistd.h header
Juan Jose Costello Levien writes:
> I would like to know which .a file do I have to reference in order to build
> a source that includes a reference to unistd.h.
You mean mingw's <unistd.h>, or the <unistd.h> on some Unix system?
Remember that mingw does not provide any more Unix APIs than what the
Microsoft C runtime provides. (Well, actually it does, but only a bit
more, no "difficult" things.) The Microsoft C runtime provides Unixish
functions like open(), read(), close(), but not functions like
getuid(), getegid(), getppid().
Mingw's <unistd.h> exists only to reduce the need for ifdefs in source
code ported to Windows. It includes the headers <io.h> and <process.h>
which are traditional headers provided by Windows C compilers, and
which declare *some* of the same functions that you would have in a
Unix <unistd.h>, but not all by a long shot. (The only function
declared in mingw's <unistd.h> itself is ftruncate().)
You don't need to specify any library (.a file) to get the functions
declared in mingw's <unistd.h> (i.e., <io.h> and <process.h>, they are
in the C runtime which is linked in by default.
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
MinGW-users mailing list
You may change your MinGW Account Options or unsubscribe at: