mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
fix: use non-deprecated unlink function on windows (#1311)
This commit is contained in:
parent
a4f8041288
commit
5a449b0919
@ -55,7 +55,10 @@ module are wrappers around the C standard library.")
|
|||||||
(register rewind (Fn [(Ptr FILE)] ()) "rewind")
|
(register rewind (Fn [(Ptr FILE)] ()) "rewind")
|
||||||
(private unlink-)
|
(private unlink-)
|
||||||
(hidden unlink-)
|
(hidden unlink-)
|
||||||
(register unlink- (Fn [(Ptr CChar)] Int) "unlink")
|
(register unlink- (Fn [(Ptr CChar)] Int) "unlink")
|
||||||
|
(windows-only
|
||||||
|
; override unlink for windows
|
||||||
|
(register unlink- (Fn [(Ptr CChar)] Int) "_unlink"))
|
||||||
(doc unlink "unlinks a file, i.e. deletes it (thin wrapper for POSIX api in <unistd.h>).")
|
(doc unlink "unlinks a file, i.e. deletes it (thin wrapper for POSIX api in <unistd.h>).")
|
||||||
(defn unlink [file-name]
|
(defn unlink [file-name]
|
||||||
(unlink- (String.cstr file-name)) )
|
(unlink- (String.cstr file-name)) )
|
||||||
|
Loading…
Reference in New Issue
Block a user