This has likely been broken (for me) for a bit, but I only checked the logs from my build script today, after trying to build on a new WIn10 laptop...
FWIW, the 64-bit build is fine, which possibly explains why I never noticed there was an issue: The build machine runs a different gcc variant for the 32-bit and 64-bit targets, for obscure historical reasons...
...
The crux is this code, added to fluid.cxx in 1.4:
// returns fileno(FILE*):// (file must be open, i.e. _fpt must be non-null)// *FIXME* we should find a better solution for the 'fileno' issueint fileno() const {#ifdef _MSC_VERreturn _fileno(_fpt); // suppress MSVC warning#elsereturn ::fileno(_fpt);#endif} // non null if file is open
Which chokes on my 32-bit build because the "stdio.h" in that system defines: [...]
On 9/27/21 11:17 AM, Albrecht Schlosser wrote:
We can probably fix this by renaming our own 'fileno' method to 'filno' to avoid the name clash..
When we commit, fluid_fileno() might be a better name, since
it's fluid specific.
Or perhaps we need a driver and a public fl_fileno()..?
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/20E0399E-036F-43AB-ABA9-9BA918D87E06%40gmail.com.
Can you #undef fileno?I agree that working around Microsoft stupidities are best done with a local patch, and not unnecessarily changing the code that works on other platforms (ie don't rename fileno!)
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/3f0e889c-716e-4da9-bd80-4d1098aac0abn%40googlegroups.com.
OK, tested with the patch (copied below) and that seems fine - built and worked OK with both the 32 and 64-bit mingw targets.
Went with "get_fileno" for the "replacement" name, as I felt that described what it was doing and would not collide with the macro #define.
I also had to remove the "::" from line 1360 to get this to compile.