Skip to content

Win32: modify g_open()/g_fopen() to allow removing/renaming of open files

Anselm Kruis requested to merge akruis/glib:akruis_glib#539 into master

This brings the semantic of open files more in line with POSIX. g_open() and g_fopen() now call CreateFileW directly. This change removes the support for MSVCRXX mode-string extensions for g_fopen().

The patch is mainly from Erik van Pienbroek (https://gitlab.gnome.org/GNOME/glib/uploads/45dc74911a79a0327f06f965bcb7ed0a/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch, attached to #539). I added a fix for text/binary mode.

Closes #539

Edited by Anselm Kruis

Merge request reports