Updated included headers to support compilation on Windows (using Visual C++)

- most of posix related functions and constants in unistd.h can be
  found in io.h in Visual C++
- introduced src/compat/msvc.h to adjust for compiler differences (and
  avoid updating code with #ifdef blocks for Windows support)
- removed some included headers that are not needed (both on Unix and
  Windows builds)
This commit is contained in:
Eduardo Arias
2024-04-23 11:46:29 -03:00
parent c8056483f7
commit a48856822c
33 changed files with 130 additions and 12 deletions

View File

@@ -4952,7 +4952,11 @@ static std::stack<int> YY_PREVIOUS_STATE;
* The user has a chance to override it with an option.
*/
/* %if-c-only */
#ifndef WIN32
#include <unistd.h>
#else
#include <io.h>
#endif
/* %endif */
/* %if-c++-only */
/* %endif */