From 65a264aa1fba38b52123fab084a8f7bab11bdd3b Mon Sep 17 00:00:00 2001 From: Phil Dawes Date: Fri, 21 Aug 2009 20:44:06 +0100 Subject: [PATCH] turned errno() methods back into functions since they should already be thread safe --- vm/io.cpp | 15 ++------------- vm/vm.hpp | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/vm/io.cpp b/vm/io.cpp index 47d964eaad..650afb8f8a 100755 --- a/vm/io.cpp +++ b/vm/io.cpp @@ -258,24 +258,13 @@ PRIMITIVE(fclose) /* This function is used by FFI I/O. Accessing the errno global directly is not portable, since on some libc's errno is not a global but a funky macro that reads thread-local storage. */ -int factorvm::err_no() +VM_C_API int err_no() { return errno; } -VM_C_API int err_no() -{ - return vm->err_no(); -} - -void factorvm::clear_err_no() +VM_C_API void clear_err_no() { errno = 0; } - -VM_C_API void clear_err_no() -{ - return vm->clear_err_no(); -} - } diff --git a/vm/vm.hpp b/vm/vm.hpp index 8372c3f0ba..1b0274e0b1 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -448,8 +448,6 @@ struct factorvm { inline void vmprim_fseek(); inline void vmprim_fflush(); inline void vmprim_fclose(); - int err_no(); - void clear_err_no(); //code_gc void clear_free_list(heap *heap);