summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-09-13 13:04:14 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-09-13 13:04:14 +0000
commit1685e9fa9dc52d96938b4579327863db8ccbae03 (patch)
treed38ffed0c65c4e9beebb927fe370b9fb480fa72c
parent572550ca7fffd7ee0d9f5aff011b1e2630fcbd83 (diff)
Verifier l'initialisation de unix_error_exn.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/unix/unixsupport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c
index 20053eaa9..cd8920d0d 100644
--- a/otherlibs/unix/unixsupport.c
+++ b/otherlibs/unix/unixsupport.c
@@ -238,7 +238,7 @@ int error_table[] = {
EHOSTUNREACH, ELOOP /*, EUNKNOWNERR */
};
-static value unix_error_exn;
+static value unix_error_exn = 0;
value unix_register_error(exnval)
value exnval;
@@ -255,6 +255,8 @@ void unix_error(errcode, cmdname, cmdarg)
{
value res;
Push_roots(r, 2);
+ if (unix_error_exn == 0)
+ invalid_argument("Exception Unix.Unix_error not initialized, must link unix.cma");
#define name r[0]
#define arg r[1]
arg = cmdarg == Nothing ? copy_string("") : cmdarg;