Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unthreaded NFFT needs the libwinpthread #13

Open
michaelquellmalz opened this issue Mar 17, 2016 · 4 comments
Open

Unthreaded NFFT needs the libwinpthread #13

michaelquellmalz opened this issue Mar 17, 2016 · 4 comments

Comments

@michaelquellmalz
Copy link
Member

michaelquellmalz commented Mar 17, 2016

In Windows, when the NFFT is compiled without multicore support (OpenMP), the produced binaries still require the libwinpthread-1.dll to run. The only function they need from this dll is clock_gettime.

@jenskeiner
Copy link
Contributor

Any suggestion how we can fix that in our code?

@tvolkmer
Copy link
Contributor

tvolkmer commented Apr 7, 2016

The QueryPerformanceCounter (QPC) function looks promising and should be supported starting Windows 2000,
see MSDN: Acquiring high-resolution time stamps.

@tvolkmer
Copy link
Contributor

tvolkmer commented Apr 8, 2016

I tried to add a fix, but I'm unable to include the mingw windows.h in kernel/util/time.c

The main issue is that there is a conflicting typedef of the datatype INT:
Our infft.h defines typedef ptrdiff_t INT;
and inside windows.h (minwindef.h) there is the definition typedef int INT;

Currently, I have no idea how to fix this.

@ghisvail
Copy link
Contributor

ghisvail commented Aug 3, 2016

typedef ptrdiff_t NFFT_INT; + s/INT/NFFT_INT in the code base? Would probably require a soversion bump though.

Using such a generic name for the typedef was dangerous in the first place. People have been bitten by this before with libpng, libjpeg and many others legacy C-libraries. Unless there is a particular macro to be set before inclusion of the infamous windows.h to bypass the conflicting typedef, then I can't think of another option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants