cmStandardLexer.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmStandardLexer_h
  11. #define cmStandardLexer_h
  12. /* Disable some warnings. */
  13. #if defined(_MSC_VER)
  14. # pragma warning ( disable : 4127 )
  15. # pragma warning ( disable : 4131 )
  16. # pragma warning ( disable : 4244 )
  17. # pragma warning ( disable : 4251 )
  18. # pragma warning ( disable : 4267 )
  19. # pragma warning ( disable : 4305 )
  20. # pragma warning ( disable : 4309 )
  21. # pragma warning ( disable : 4706 )
  22. # pragma warning ( disable : 4786 )
  23. #endif
  24. #if defined(__BORLANDC__)
  25. # pragma warn -8008 /* condition always returns true */
  26. # pragma warn -8066 /* unreachable code */
  27. #endif
  28. /* Borland system header defines these macros without first undef-ing them. */
  29. #if defined(__BORLANDC__) && __BORLANDC__ >= 0x580
  30. # undef INT8_MIN
  31. # undef INT16_MIN
  32. # undef INT32_MIN
  33. # undef INT8_MAX
  34. # undef INT16_MAX
  35. # undef INT32_MAX
  36. # undef UINT8_MAX
  37. # undef UINT16_MAX
  38. # undef UINT32_MAX
  39. # include <stdint.h>
  40. #endif
  41. /* Make sure SGI termios does not define ECHO differently. */
  42. #if defined(__sgi) && !defined(__GNUC__)
  43. # include <sys/termios.h>
  44. # undef ECHO
  45. #endif
  46. /* Define isatty on windows. */
  47. #if defined(_WIN32) && !defined(__CYGWIN__)
  48. # include <io.h>
  49. # if defined( _MSC_VER )
  50. # define isatty _isatty
  51. # endif
  52. # define YY_NO_UNISTD_H 1
  53. #endif
  54. /* Make sure malloc and free are available on QNX. */
  55. #ifdef __QNX__
  56. # include <malloc.h>
  57. #endif
  58. /* Disable features we do not need. */
  59. #define YY_NEVER_INTERACTIVE 1
  60. #define YY_NO_INPUT 1
  61. #define YY_NO_UNPUT 1
  62. #define ECHO
  63. #endif