Skip to content

Commit

Permalink
fix: use non-deprecated unlink function on windows (#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve authored Sep 16, 2021
1 parent a4f8041 commit 5a449b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/IO.carp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ module are wrappers around the C standard library.")
(register rewind (Fn [(Ptr FILE)] ()) "rewind")
(private 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>).")
(defn unlink [file-name]
(unlink- (String.cstr file-name)) )
Expand Down

0 comments on commit 5a449b0

Please sign in to comment.