View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000296||file||General||public||2021-10-24 10:21||2021-10-28 16:39|
|Summary||0000296: Problems building file-5.41 with MinGW on MS-Windows|
|Description||I've built the latest version 5.41 of file natively on MS-Windows using MinGW tools. (Yes, version 5.41; the bug tracker doesn't allow to select that version when reporting an issue.)|
I've found several problems while building, described below. Let me know if you want me to attach proposed patches for any of those.
First, there are multiple compilation warnings due to C99 formatted output features, like the '#' flag and the %z or %j descriptors. (file.h has portability macros for taking care of that, but they are not used everywhere, and don't cover the '#' flag, for example.)
Next, compress.c triggers several warnings because variables and functions used only if HAVE_FORK are declared or defined without that conditional, so they are unused in a build without HAVE_FORK.
The function 'sread' uses 'ioctl' for sockets and pipes, but that cannot compile on Windows, and won't work even if tweaked (e.g., 'select' doesn't work on Windows pipes). So this needs to be #ifdef'ed away. Same for calls to 'fcntl' in funcs.c.
In magic.c, I added support for the HOME environment variable on MS-Windows. While this variable is not normally set on Windows, many users of ported Unix software have it set, so it is useful to support that.
The function 'unreadable_info' in magic.c calls 'access' with X_OK, which doesn't work well, or not at all, on MS-Windows, so I replaced it with a simple test of the file's extension to detect executables based on that.
Thanks for developing this package.
|Tags||No tags attached.|
|2021-10-24 10:21||eliz||New Issue|
|2021-10-28 15:35||christos||Assigned To||=> christos|
|2021-10-28 15:35||christos||Status||new => assigned|
|2021-10-28 15:36||christos||Status||assigned => feedback|
|2021-10-28 15:36||christos||Note Added: 0003657|
|2021-10-28 16:39||eliz||File Added: DIFFS.mingw|
|2021-10-28 16:39||eliz||Note Added: 0003665|
|2021-10-28 16:39||eliz||Status||feedback => assigned|