aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.Windows2
-rw-r--r--lib/filter.c5
-rw-r--r--lib/internal.h4
3 files changed, 8 insertions, 3 deletions
diff --git a/README.Windows b/README.Windows
index 2bef240..7a5ccab 100644
--- a/README.Windows
+++ b/README.Windows
@@ -21,7 +21,7 @@ users to access config space even with SeTcbPrivilege.
To compile this port, run following command:
- make CROSS_COMPILE=i586-mingw32msvc- HOST=i386-windows ZLIB=no IDSDIR=""
+ make CROSS_COMPILE=i586-mingw32msvc- HOST=i586-windows ZLIB=no IDSDIR=""
To build 64-bit version, run:
diff --git a/lib/filter.c b/lib/filter.c
index 7038451..86486d3 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -76,6 +76,11 @@ parse_hex_field(char *str, int *outp, unsigned int *maskp, unsigned int max)
if (!field_defined(str))
return 1; // and keep the defaults
+ // Historically, filters allowed writing hexadecimal numbers with leading "0x".
+ // This was never intentional nor documented, but some people relied on it.
+ if (!maskp && str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
+ str += 2;
+
while (*str)
{
int c = *str++;
diff --git a/lib/internal.h b/lib/internal.h
index ed0e94f..e9e413e 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -15,12 +15,12 @@
// optimizations is happy to optimize them away, leading to linker failures.
#define VERSIONED_ABI __attribute__((used)) PCI_ABI
#ifdef __APPLE__
-#define STATIC_ALIAS(_decl, _for) _decl PCI_ABI { return _for; }
+#define STATIC_ALIAS(_decl, _for) _decl VERSIONED_ABI { return _for; }
#define DEFINE_ALIAS(_decl, _for)
#define SYMBOL_VERSION(_int, _ext)
#else
#define STATIC_ALIAS(_decl, _for)
-#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for)))
+#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for))) VERSIONED_ABI
#ifdef _WIN32
/* GCC does not support asm .symver directive for Windows targets, so define new external global function symbol as alias to internal symbol */
#define SYMBOL_VERSION(_int, _ext) asm(".globl\t" PCI_STRINGIFY(__MINGW_USYMBOL(_ext)) "\n\t" \