]> mj.ucw.cz Git - pciutils.git/commitdiff
libpci: i386-io-windows.h: Fix MinGW build with pre-4.00 MSVCRT runtime library
authorPali Rohár <pali@kernel.org>
Sun, 27 Feb 2022 19:02:37 +0000 (20:02 +0100)
committerMartin Mareš <mj@ucw.cz>
Fri, 15 Apr 2022 21:57:52 +0000 (23:57 +0200)
Like CRTDLL library, pre-4.00 MSVCRT runtime library does not provide I/O port functions.

lib/i386-io-windows.h

index 9cd9cd95498481297b7f7dee6d17b05f6338f245..e32ecb2de7e6b84c2f2b71a716a32d13daffb35e 100644 (file)
 #define _inp(x) __inbyte(x)
 #define _inpw(x) __inword(x)
 #define _inpd(x) __indword(x)
-#elif defined(__CRTDLL__)
+#elif defined(__CRTDLL__) || (defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x400)
 /*
- * Old 32-bit CRTDLL library does not provide I/O port functions. As this
- * library exists only in 32-bit mode variant, implement I/O port functions
- * via 32-bit inline assembly.
+ * Old 32-bit CRTDLL library and pre-4.00 MSVCRT library do not provide I/O
+ * port functions. As these libraries exist only in 32-bit mode variant,
+ * implement I/O port functions via 32-bit inline assembly.
  */
 static inline int _outp(unsigned short port, int databyte)
 {