annotate src/build-msvctools/unistd.h @ 3337:8480924d2b85

[MSVC] Use POSIX compliant getopt version from mingw64. * src/build-msvctools/Makefile (getopt.c, getopt.h): Use versions from mingw64, as they're POSIX compliant. (posixcompat.lib): New target library, replaces dirent.lib and getopt.lib. (dirent.lib, getopt.lib): Removed targets. * src/build-msvctools/getopt.diff: Removed obsolete patch. * src/build-msvctools/cc-msvc.cc: Links against posixcompat.lib instead of dirent.lib * src/build-msvctools/unistd.h: Include getopt.h, for POSIX compliance.
author Michael Goffioul <michael.goffioul@gmail.com>
date Fri, 29 Nov 2013 18:46:45 -0500
parents f8299bb6c872
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3061
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
1 /* Emulation of unistd.h for Visual C++. */
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
2
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
3 #ifndef __unistd_h__
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
4 #define __unistd_h__ 1
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
5
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
6 #include <direct.h>
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
7 #include <process.h>
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
8 #include <io.h>
3337
8480924d2b85 [MSVC] Use POSIX compliant getopt version from mingw64.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3061
diff changeset
9 #include <getopt.h>
3061
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
10
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
11 #ifndef PATH_MAX
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
12 # define PATH_MAX 260
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
13 #endif
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
14
f8299bb6c872 Initial support for native MSVC compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
15 #endif