]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/sysdep.h
Names: Fixed a rare bug in loading of pci.ids
[pciutils.git] / lib / sysdep.h
index c6c248eac740e8c7cd11c6612f1702d7feec34eb..750203573f006dd1b088a00e0ec4f788ece2ee15 100644 (file)
@@ -3,7 +3,9 @@
  *
  *     Copyright (c) 1997--2020 Martin Mares <mj@ucw.cz>
  *
- *     Can be freely distributed and used under the terms of the GNU GPL.
+ *     Can be freely distributed and used under the terms of the GNU GPL v2+
+ *
+ *     SPDX-License-Identifier: GPL-2.0-or-later
  */
 
 #ifdef __GNUC__
@@ -22,6 +24,11 @@ typedef u16 word;
 
 #ifdef PCI_OS_WINDOWS
 #define strcasecmp _strcmpi
+#define strncasecmp _strnicmp
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#endif
 #endif
 
 #ifdef PCI_HAVE_LINUX_BYTEORDER_H
@@ -66,7 +73,6 @@ typedef u16 word;
   #define BIG_ENDIAN 4321
   #define LITTLE_ENDIAN        1234
   #define BYTE_ORDER LITTLE_ENDIAN
-  #define snprintf _snprintf
 #endif
 #endif