| 1 |
/* SPDX-License-Identifier: BSD-2-Clause */ |
| 2 |
/* Copyright 2016 The NASM Authors - All Rights Reserved */ |
| 3 |
|
| 4 |
/* |
| 5 |
* config/msvc.h |
| 6 |
* |
| 7 |
* Compiler definitions for Microsoft Visual C++; |
| 8 |
* instead of unconfig.h. See config.h.in for the |
| 9 |
* variables which can be defined here. |
| 10 |
* |
| 11 |
* MSDN seems to have information back to Visual Studio 2003, so aim |
| 12 |
* for compatibility that far back. |
| 13 |
* |
| 14 |
* Relevant _MSC_VER values: |
| 15 |
* 1310 - Visual Studio 2003 |
| 16 |
* 1400 - Visual Studio 2005 |
| 17 |
* 1500 - Visual Studio 2008 |
| 18 |
* 1600 - Visual Studio 2010 |
| 19 |
* 1700 - Visual Studio 2012 |
| 20 |
* 1800 - Visual Studio 2013 |
| 21 |
* 1900 - Visual Studio 2015 |
| 22 |
* 1910 - Visual Studio 2017 |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifndef NASM_CONFIG_MSVC_H |
| 26 |
#define NASM_CONFIG_MSVC_H |
| 27 |
|
| 28 |
/* Define to 1 if you have the <fcntl.h> header file. */ |
| 29 |
#define HAVE_FCNTL_H 1 |
| 30 |
|
| 31 |
/* Define to 1 if you have the <inttypes.h> header file. */ |
| 32 |
#if _MSC_VER >= 1800 |
| 33 |
# define HAVE_INTTYPES_H 1 |
| 34 |
#endif |
| 35 |
|
| 36 |
/* Define to 1 if you have the <io.h> header file. */ |
| 37 |
#define HAVE_IO_H 1 |
| 38 |
|
| 39 |
/* Define to 1 if you have the <stdlib.h> header file. */ |
| 40 |
#define HAVE_STDLIB_H 1 |
| 41 |
|
| 42 |
/* Define to 1 if you have the <string.h> header file. */ |
| 43 |
#define HAVE_STRING_H 1 |
| 44 |
|
| 45 |
/* Define to 1 if you have the <sys/stat.h> header file. */ |
| 46 |
#define HAVE_SYS_STAT_H 1 |
| 47 |
|
| 48 |
/* Define to 1 if you have the <sys/types.h> header file. */ |
| 49 |
#define HAVE_SYS_TYPES_H 1 |
| 50 |
|
| 51 |
/* Define to 1 if you have the `access' function. */ |
| 52 |
#define HAVE_ACCESS 1 |
| 53 |
#if _MSC_VER < 1400 |
| 54 |
# define access _access |
| 55 |
#endif |
| 56 |
|
| 57 |
/* Define to 1 if you have the `fileno' function. */ |
| 58 |
#define HAVE_FILENO 1 |
| 59 |
#if _MSC_VER < 1400 |
| 60 |
# define fileno _fileno |
| 61 |
#endif |
| 62 |
|
| 63 |
/* Define to 1 if you have the `snprintf' function. */ |
| 64 |
#define HAVE_SNPRINTF 1 |
| 65 |
#if _MSC_VER < 1900 |
| 66 |
# define snprintf _snprintf |
| 67 |
#endif |
| 68 |
|
| 69 |
/* Define to 1 if you have the `_chsize' function. */ |
| 70 |
#define HAVE__CHSIZE 1 |
| 71 |
|
| 72 |
/* Define to 1 if you have the `_chsize_s' function. */ |
| 73 |
#if _MSC_VER >= 1400 |
| 74 |
# define HAVE__CHSIZE_S 1 |
| 75 |
#endif |
| 76 |
|
| 77 |
/* Define to 1 if you have the `_filelengthi64' function. */ |
| 78 |
#define HAVE__FILELENGTHI64 1 |
| 79 |
|
| 80 |
/* Define to 1 if you have the `_fseeki64' function. */ |
| 81 |
#define HAVE__FSEEKI64 1 |
| 82 |
|
| 83 |
/* Define to 1 if you have the `_fullpath' function. */ |
| 84 |
#define HAVE__FULLPATH 1 |
| 85 |
|
| 86 |
/* Define to 1 if the system has the type `struct _stati64'. */ |
| 87 |
#define HAVE_STRUCT__STATI64 |
| 88 |
|
| 89 |
/* Define to 1 if you have the `_stati64' function. */ |
| 90 |
#define HAVE__STATI64 1 |
| 91 |
|
| 92 |
/* Define to 1 if you have the `_fstati64' function. */ |
| 93 |
#define HAVE__FSTATI64 1 |
| 94 |
|
| 95 |
/* Define to 1 if stdbool.h conforms to C99. */ |
| 96 |
#if _MSC_VER >= 1800 |
| 97 |
# define HAVE_STDBOOL_H 1 |
| 98 |
#endif |
| 99 |
|
| 100 |
/* Define to 1 if you have the `stricmp' function. */ |
| 101 |
#define HAVE_STRICMP 1 |
| 102 |
/* Define to 1 if you have the declaration of `stricmp', and to 0 if you |
| 103 |
don't. */ |
| 104 |
#define HAVE_DECL_STRICMP 1 |
| 105 |
#if _MSC_VER < 1400 |
| 106 |
# define stricmp _stricmp |
| 107 |
#endif |
| 108 |
|
| 109 |
/* Define to 1 if you have the `strnicmp' function. */ |
| 110 |
#define HAVE_STRNICMP 1 |
| 111 |
/* Define to 1 if you have the declaration of `strnicmp', and to 0 if you |
| 112 |
don't. */ |
| 113 |
#define HAVE_DECL_STRNICMP 1 |
| 114 |
#if _MSC_VER < 1400 |
| 115 |
# define strnicmp _strnicmp |
| 116 |
#endif |
| 117 |
|
| 118 |
#if _MSC_VER >= 1400 |
| 119 |
/* Define to 1 if you have the `strnlen' function. */ |
| 120 |
# define HAVE_STRNLEN 1 |
| 121 |
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you |
| 122 |
don't. */ |
| 123 |
# define HAVE_DECL_STRNLEN 1 |
| 124 |
#endif |
| 125 |
|
| 126 |
/* Define to 1 if the system has the type `uintptr_t'. */ |
| 127 |
#if _MSC_VER >= 1900 |
| 128 |
# define HAVE_UINTPTR_T 1 |
| 129 |
#else |
| 130 |
/* Define to the type of an unsigned integer type wide enough to hold a |
| 131 |
pointer, if such a type exists, and if the system does not define it. */ |
| 132 |
# define uintptr_t size_t |
| 133 |
#endif |
| 134 |
|
| 135 |
/* Define to 1 if you have the `vsnprintf' function. */ |
| 136 |
#define HAVE_VSNPRINTF 1 |
| 137 |
#if _MSC_VER < 1400 |
| 138 |
# define vsnprint _vsnprintf |
| 139 |
#endif |
| 140 |
|
| 141 |
/* Define to 1 if the system has the type `_Bool'. */ |
| 142 |
#if _MSC_VER >= 1900 |
| 143 |
# define HAVE__BOOL 1 |
| 144 |
#endif |
| 145 |
|
| 146 |
/* Define to 1 if you have the ANSI C header files. */ |
| 147 |
#define STDC_HEADERS 1 |
| 148 |
|
| 149 |
/* Define to 1 if your processor stores words with the least significant byte |
| 150 |
first (like Intel and VAX, unlike Motorola and SPARC). */ |
| 151 |
#define WORDS_LITTLEENDIAN 1 |
| 152 |
|
| 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 |
|
| 157 |
/* Define to the equivalent of the C99 'restrict' keyword, or to |
| 158 |
nothing if this is not supported. Do not define if restrict is |
| 159 |
supported directly. */ |
| 160 |
#if _MSC_VER >= 1700 |
| 161 |
#define restrict __restrict |
| 162 |
#else |
| 163 |
#define restrict |
| 164 |
#endif |
| 165 |
|
| 166 |
#endif /* NASM_CONFIG_MSVC_H */ |