Thank you for your answers and for taking care of this.
While building as a DLL might be useful, it's easy to plug the static lib into an
existing project and build the DLL yourself, so I wouldn't consider it important.
Regards,
Timo
-----Ursprüngliche Nachricht-----
Von: Hyperscan [mailto:hyperscan-bounces@lists.01.org] Im Auftrag von Barr, Matthew
Gesendet: Montag, 11. April 2016 09:08
An: Hyperscan regular expression matching library <hyperscan(a)lists.01.org>
Betreff: Re: [Hyperscan] Hyperscan build on VS / x86
From: Hyperscan [mailto:hyperscan-bounces@lists.01.org] On Behalf Of Timo Kreuzer
I recently created a bugreport for hyperscan
(
https://github.com/01org/hyperscan/issues/14) with some VS / x86 compilation fixes.
Thanks for these - we haven't had a lot of interest from Windows users until recently,
so fixing the 32-bit library had fallen off our radar.
I just wanted to know what the status on this one is. It would be
great, if someone could have a look and the more straightforward patches could get
applied, so that we can reduce our diff. I'm happy to address any requests for
changes/improvements or concerns.
I'm in the process of working through these diffs, and should have some commits to
push through to the develop branch soon. Some of the patches we can just apply, but for
some I'll have to change a few things to work with all of our target platforms.
Other issues have come up in testing on Windows, though, which I'm still working on.
One thing I noticed was that offsets, limits are always 64 bit. Is
there a specific reason to not use a size_t? Using size_t could fix most of the alignment
issues (passing aligned 64 bit values as parameters on x86).
64bit offsets are part of the API, as Hyperscan has to be able to support stream sizes
that wouldn't fit in 32 bits. Also we must avoid using size_t for anything that might
end up in a pattern database structure, as it may change size between 32-bit and 64-bit
platforms.
I did investigate our use of the u64a type, and as you pointed out, it does appear that
forcing the alignment on Windows is unnecessary as structs are already 8-byte aligned.
This isn't the case on other platforms, however. Changing our use of the type
throughout the codebase is quite invasive, so in the short term we will probably just
change the typedef for Windows builds.
One question for you: at the moment we only build static libraries (.lib) on Windows,
would it be useful if we added the ability to build Hyperscan as a DLL? This is another
thing we haven't had demand for, so have delayed doing the work.
Regards,
Matt.