diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
commit | 5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch) | |
tree | f3a6e5b5c38263fe527e6275ff95425f12637226 /byterun/sys.c | |
parent | 8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff) | |
download | ocaml-gcaml.tar.gz |
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/sys.c')
-rw-r--r-- | byterun/sys.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/byterun/sys.c b/byterun/sys.c index 96d0c7bb2a..c5f5c60e14 100644 --- a/byterun/sys.c +++ b/byterun/sys.c @@ -51,32 +51,11 @@ extern int errno; #endif -#ifdef HAS_STRERROR - -#ifndef _WIN32 -extern char * strerror(int); -#endif - static char * error_message(void) { return strerror(errno); } -#else - -extern int sys_nerr; -extern char * sys_errlist []; - -static char * error_message(void) -{ - if (errno < 0 || errno >= sys_nerr) - return "unknown error"; - else - return sys_errlist[errno]; -} - -#endif /* HAS_STRERROR */ - #ifndef EAGAIN #define EAGAIN (-1) #endif @@ -106,6 +85,7 @@ CAMLexport void caml_sys_error(value arg) } caml_raise_sys_error(str); } + CAMLnoreturn; } CAMLprim value caml_sys_exit(value retcode) @@ -179,7 +159,7 @@ CAMLprim value caml_sys_remove(value name) CAMLprim value caml_sys_rename(value oldname, value newname) { if (rename(String_val(oldname), String_val(newname)) != 0) - caml_sys_error(oldname); + caml_sys_error(NO_ARG); return Val_unit; } |