_cygwin.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_CYGWIN
  7. #define _INC_CYGWIN
  8. #ifndef __CYGWIN__
  9. #error Only Cygwin target is supported!
  10. #endif
  11. /* This includes the Cygwin gcc definitions for types like wchar_t or size_t. */
  12. #include <stddef.h>
  13. /* Make sure that POSIX types are not defined by _mingw.h if we're building
  14. for a Cygwin target. In this case we have to make sure to use the types
  15. defined by the Cygwin/newlib headers. */
  16. #define _SIZE_T_DEFINED
  17. #define _SSIZE_T_DEFINED
  18. #define _INTPTR_T_DEFINED
  19. #define _UINTPTR_T_DEFINED
  20. #define _PTRDIFF_T_DEFINED
  21. #define _WCHAR_T_DEFINED
  22. #define _WCTYPE_T_DEFINED
  23. #define _TIME_T_DEFINED
  24. /* _WIN64 is defined by the compiler specs when targeting Windows.
  25. The Cygwin-targeting gcc does not define it by default, same as
  26. with _WIN32. Therefore we set it here. The result is that _WIN64
  27. is only defined if Windows headers are included. */
  28. #ifdef __x86_64__
  29. #define _WIN64
  30. #endif
  31. #endif /* _INC_CYGWIN */