fix-windows-build.patch 612 B

12345678910111213141516171819202122232425262728
  1. --- a/main.cpp
  2. +++ b/main.cpp
  3. @@ -24,9 +24,10 @@
  4. #include <stdio.h>
  5. #include <iostream>
  6. #include <fstream>
  7. -#include <unistd.h>
  8. +#ifndef _WIN32
  9. +# include <unistd.h>
  10. +#endif
  11. #include <sstream>
  12. -#include <unistd.h>
  13. #include <sys/types.h>
  14. #include <sys/stat.h>
  15. #include <fcntl.h>
  16. --- a/parsedata.cpp
  17. +++ b/parsedata.cpp
  18. @@ -120,6 +120,10 @@ Key makeFsmKeyHex( char *str, const InputLoc &loc, ParseData *pd )
  19. return Key( (long)ul );
  20. }
  21. +#ifdef _MSC_VER
  22. +# define strtoll _strtoi64
  23. +#endif
  24. +
  25. Key makeFsmKeyDec( char *str, const InputLoc &loc, ParseData *pd )
  26. {
  27. if ( keyOps->alphType->isSigned ) {