msvc.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /* ----------------------------------------------------------------------- *
  2. *
  3. * Copyright 2016 The NASM Authors - All Rights Reserved
  4. * See the file AUTHORS included with the NASM distribution for
  5. * the specific copyright holders.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following
  9. * conditions are met:
  10. *
  11. * * Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * * Redistributions in binary form must reproduce the above
  14. * copyright notice, this list of conditions and the following
  15. * disclaimer in the documentation and/or other materials provided
  16. * with the distribution.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  19. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  20. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  23. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  25. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  26. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  28. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. * ----------------------------------------------------------------------- */
  33. /*
  34. * config/msvc.h
  35. *
  36. * Compiler definitions for Microsoft Visual C++;
  37. * instead of unconfig.h. See config.h.in for the
  38. * variables which can be defined here.
  39. *
  40. * MSDN seems to have information back to Visual Studio 2003, so aim
  41. * for compatibility that far back.
  42. *
  43. * Relevant _MSC_VER values:
  44. * 1310 - Visual Studio 2003
  45. * 1400 - Visual Studio 2005
  46. * 1500 - Visual Studio 2008
  47. * 1600 - Visual Studio 2010
  48. * 1700 - Visual Studio 2012
  49. * 1800 - Visual Studio 2013
  50. * 1900 - Visual Studio 2015
  51. * 1910 - Visual Studio 2017
  52. */
  53. #ifndef NASM_CONFIG_MSVC_H
  54. #define NASM_CONFIG_MSVC_H
  55. /* Define to 1 if you have the <fcntl.h> header file. */
  56. #define HAVE_FCNTL_H 1
  57. /* Define to 1 if you have the <inttypes.h> header file. */
  58. #if _MSC_VER >= 1800
  59. # define HAVE_INTTYPES_H 1
  60. #endif
  61. /* Define to 1 if you have the <io.h> header file. */
  62. #define HAVE_IO_H 1
  63. /* Define to 1 if you have the <stdlib.h> header file. */
  64. #define HAVE_STDLIB_H 1
  65. /* Define to 1 if you have the <string.h> header file. */
  66. #define HAVE_STRING_H 1
  67. /* Define to 1 if you have the <sys/stat.h> header file. */
  68. #define HAVE_SYS_STAT_H 1
  69. /* Define to 1 if you have the <sys/types.h> header file. */
  70. #define HAVE_SYS_TYPES_H 1
  71. /* Define to 1 if you have the `access' function. */
  72. #define HAVE_ACCESS 1
  73. #if _MSC_VER < 1400
  74. # define access _access
  75. #endif
  76. /* Define to 1 if you have the `fileno' function. */
  77. #define HAVE_FILENO 1
  78. #if _MSC_VER < 1400
  79. # define fileno _fileno
  80. #endif
  81. /* Define to 1 if you have the `snprintf' function. */
  82. #define HAVE_SNPRINTF 1
  83. #if _MSC_VER < 1900
  84. # define snprintf _snprintf
  85. #endif
  86. /* Define to 1 if you have the `_chsize' function. */
  87. #define HAVE__CHSIZE 1
  88. /* Define to 1 if you have the `_chsize_s' function. */
  89. #if _MSC_VER >= 1400
  90. # define HAVE__CHSIZE_S 1
  91. #endif
  92. /* Define to 1 if you have the `_filelengthi64' function. */
  93. #define HAVE__FILELENGTHI64 1
  94. /* Define to 1 if you have the `_fseeki64' function. */
  95. #define HAVE__FSEEKI64 1
  96. /* Define to 1 if you have the `_fullpath' function. */
  97. #define HAVE__FULLPATH 1
  98. /* Define to 1 if the system has the type `struct _stati64'. */
  99. #define HAVE_STRUCT__STATI64
  100. /* Define to 1 if you have the `_stati64' function. */
  101. #define HAVE__STATI64 1
  102. /* Define to 1 if you have the `_fstati64' function. */
  103. #define HAVE__FSTATI64 1
  104. /* Define to 1 if stdbool.h conforms to C99. */
  105. #if _MSC_VER >= 1800
  106. # define HAVE_STDBOOL_H 1
  107. #endif
  108. /* Define to 1 if you have the `stricmp' function. */
  109. #define HAVE_STRICMP 1
  110. /* Define to 1 if you have the declaration of `stricmp', and to 0 if you
  111. don't. */
  112. #define HAVE_DECL_STRICMP 1
  113. #if _MSC_VER < 1400
  114. # define stricmp _stricmp
  115. #endif
  116. /* Define to 1 if you have the `strnicmp' function. */
  117. #define HAVE_STRNICMP 1
  118. /* Define to 1 if you have the declaration of `strnicmp', and to 0 if you
  119. don't. */
  120. #define HAVE_DECL_STRNICMP 1
  121. #if _MSC_VER < 1400
  122. # define strnicmp _strnicmp
  123. #endif
  124. #if _MSC_VER >= 1400
  125. /* Define to 1 if you have the `strnlen' function. */
  126. # define HAVE_STRNLEN 1
  127. /* Define to 1 if you have the declaration of `strnlen', and to 0 if you
  128. don't. */
  129. # define HAVE_DECL_STRNLEN 1
  130. #endif
  131. /* Define to 1 if the system has the type `uintptr_t'. */
  132. #if _MSC_VER >= 1900
  133. # define HAVE_UINTPTR_T 1
  134. #else
  135. /* Define to the type of an unsigned integer type wide enough to hold a
  136. pointer, if such a type exists, and if the system does not define it. */
  137. # define uintptr_t size_t
  138. #endif
  139. /* Define to 1 if you have the `vsnprintf' function. */
  140. #define HAVE_VSNPRINTF 1
  141. #if _MSC_VER < 1400
  142. # define vsnprint _vsnprintf
  143. #endif
  144. /* Define to 1 if the system has the type `_Bool'. */
  145. #if _MSC_VER >= 1900
  146. # define HAVE__BOOL 1
  147. #endif
  148. /* Define to 1 if you have the ANSI C header files. */
  149. #define STDC_HEADERS 1
  150. /* Define to 1 if your processor stores words with the least significant byte
  151. first (like Intel and VAX, unlike Motorola and SPARC). */
  152. #define WORDS_LITTLEENDIAN 1
  153. /* Define to `__inline__' or `__inline' if that's what the C compiler
  154. calls it, or to nothing if 'inline' is not supported under any name. */
  155. #define inline __inline
  156. /* Define to the equivalent of the C99 'restrict' keyword, or to
  157. nothing if this is not supported. Do not define if restrict is
  158. supported directly. */
  159. #if _MSC_VER >= 1700
  160. #define restrict __restrict
  161. #else
  162. #define restrict
  163. #endif
  164. #endif /* NASM_CONFIG_MSVC_H */