-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
32-bit build succeeds, throws exceptions at runtime about integer length #9
Comments
Unfortunately I don't have a 32-bit machine to test it on, but if you manage to solve the problem, pull requests are very much appreciated. The first thing I'd try is changing inline bool IS_32BIT_INT(double num) {
return floor(num) == num && num < 2147483648.0 && num >= -2147483648.0;
} The |
Thanks! Will try it out—if you want, you can actually run 32-bit NodeJS on any version of Windows. Microsoft did a great job with backward compatibility. (we actually don't bother shipping a 64-bit version of the app.) Will keep you posted. |
Fix macros.h to support ia32 on Windows (#9)
Hey! I know these issues are bordering on the obscure, but I'm still fighting with the Windows builds of N1. We target
ia32
instead ofx64
on Windows because it's more widely supported, and it looks like there are some casting warnings at compile time that result in the module not working when the app runs. I believe this issue is only reproducible if you're targeting a 32-bit architecture.Here are a few of the warnings:
When you run the app, it complains about the 32-bit integers:
If you have a Windows machine, you can reproduce this by running this to build. I'm not 100% sure the warnings are causing the issue, but they seem like a very likely culprit. I wonder if there just need to be different types used here: https://github.com/bengotow/better-sqlite3/blame/n1-1.3.6/src/util/macros.h#L32
The text was updated successfully, but these errors were encountered: