unistd.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2016-2017 Savoir-faire Linux Inc.
  3. *
  4. * Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #pragma once
  21. #ifndef __STRICT_ANSI__
  22. #include <stdlib.h>
  23. #include <process.h>
  24. #include <direct.h>
  25. #include <fcntl.h>
  26. #include <io.h>
  27. #define R_OK 4
  28. #define W_OK 2
  29. #define F_OK 0
  30. #ifndef STDIN_FILENO
  31. #define STDIN_FILENO 0
  32. #endif
  33. #ifndef STDOUT_FILENO
  34. #define STDOUT_FILENO 1
  35. #endif
  36. #ifndef STDERR_FILENO
  37. #define STDERR_FILENO 2
  38. #endif
  39. #define srandom srand
  40. #define random rand
  41. #define inline __inline
  42. typedef int mode_t;
  43. #include <BaseTsd.h>
  44. #endif