platform/OS: Intel/Windows 2000 Compiler: Microsofts's MSVC 6.0 Unix-ish Tools: Latest cygwin
Problem: ------------- MSVC does not include the header file <unistd.h>. The "scanner.c" file generated by "scanner.l" using flex: (i.e. flex -vPdf_ -oscanner.c scanner.l) creates the directive: #include <unistd.h> in scanner.c Compiling fails due to not finding this include file... Notes: --------- I did search the archive and found some reference to this problem but not a solution.... My Solution: ------------------ I found the following conditional directive code to use and compiling was successful: #ifdef _MSC_VER #include <io.h> #define access _access #else #include <unistd.h> #endif Is this valid to use or what do you folks suggest? Is Microsoft's <io.h> a valid replacement for the UNIX <unistd.h> header file? Thanks in advance... Ronald W. Henderson Cognicase U.S.A. Inc.
