Skip to content

Commit

Permalink
separate getErrno for node
Browse files Browse the repository at this point in the history
  • Loading branch information
dunhamsteve committed Feb 23, 2025
1 parent 69705be commit 0cfcd5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/base/System/Errno.idr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module System.Errno
%default total

%foreign "C:idris2_getErrno, libidris2_support, idris_support.h"
"node:support:fileErrno,support_system_file"
"node:support:getErrno,support_system"
prim__getErrno : PrimIO Int

%foreign "C:idris2_strerror, libidris2_support, idris_support.h"
Expand Down
3 changes: 3 additions & 0 deletions support/js/support_system.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ function support_system_unsetEnv(name) {
return 0
}

function support_system_getErrno() {
return process.__lasterr===undefined?0:process.__lasterr.errno || 0
}

0 comments on commit 0cfcd5d

Please sign in to comment.