You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7691 Reporter: Bertrand.Jeannet Status: closed (set by @alainfrisch on 2017-12-14T16:16:05Z) Resolution: not a bug Priority: normal Severity: major Version: 4.06.0 Category: platform support (windows, cross-compilation, etc) Monitored by:@nojb@gasche
Bug description
The function caml_win32_rename in byterun/win32.c uses the function MoveFileEx, which is not Unicode aware, instead of MoveFileExW which is.
This looks like a bug in 4.06, since caml_sys_rename (byterun/sys.c) converts filenames (assumed to be UTF-8) to 16-bits unicode before calling caml_win32_rename.
The text was updated successfully, but these errors were encountered:
AFAICS there is no problem: the OCaml runtime system is compiled with the C preprocessor macro UNICODE defined, which makes MoveFileEx equal to MoveFileExW.
Note that since the arguments are of type WCHAR *, we would get a compiler error if MoveFileEx actually pointed to MoveFileExA (which takes char * arguments).
Everything seems to be ok. In addition to static checking of types by the C compiler, the testsuite also exercise Sys.rename, so such a bad bug would have been caught.
Original bug ID: 7691
Reporter: Bertrand.Jeannet
Status: closed (set by @alainfrisch on 2017-12-14T16:16:05Z)
Resolution: not a bug
Priority: normal
Severity: major
Version: 4.06.0
Category: platform support (windows, cross-compilation, etc)
Monitored by: @nojb @gasche
Bug description
The function caml_win32_rename in byterun/win32.c uses the function MoveFileEx, which is not Unicode aware, instead of MoveFileExW which is.
This looks like a bug in 4.06, since caml_sys_rename (byterun/sys.c) converts filenames (assumed to be UTF-8) to 16-bits unicode before calling caml_win32_rename.
The text was updated successfully, but these errors were encountered: