https://sourceware.org/bugzilla/show_bug.cgi?id=29947
Bug ID: 29947 Summary: libbfd real_fopen & libiberty unlink_if_ordinary functions are not handling Windows nul device correctly Product: binutils Version: 2.39 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: himalr at proton dot me Target Milestone: --- Created attachment 14541 --> https://sourceware.org/bugzilla/attachment.cgi?id=14541&action=edit Handle Windows nul device correctly. This bug affects gas when used as "as.exe -v -o nul" (or -o /dev/null) under msys2-mingw. Error message, Assembler messages: Fatal error: can't create nul: Invalid argument gcc.exe: error: nul: Permission denied I originally reported this to [MINGW-packages](https://github.com/msys2/MINGW-packages/issues/14725 and they asked me to report this here as well. This is my pull request https://github.com/msys2/MINGW-packages/pull/14775 I'm attaching those two patches here as well. The second one is for unlink_if_ordinary at libiberty/unlink-if-ordinary.c because under Windows/MINGW, S_ISREG returns true for null device. Please note that I'm not a C programmer so let me know if there are any issues with these patches. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.