summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorygrek <ygrek@autistici.org>2016-11-26 16:47:22 -0800
committerygrek <ygrek@autistici.org>2016-11-26 16:47:22 -0800
commit0589c0d1f7a095945b2e9e900564071778d25434 (patch)
tree57415c66c7ad4258602b70a43c84a7890e898805
parent99923f7b7a143c87acce616d13c79dd570ede84b (diff)
downloadocaml-0589c0d1f7a095945b2e9e900564071778d25434.tar.gz
unix: invalid_argument -> caml_invalid_argument
-rw-r--r--otherlibs/systhreads/st_posix.h2
-rw-r--r--otherlibs/unix/accept.c2
-rw-r--r--otherlibs/unix/addrofstr.c2
-rw-r--r--otherlibs/unix/bind.c2
-rw-r--r--otherlibs/unix/connect.c2
-rw-r--r--otherlibs/unix/fchmod.c2
-rw-r--r--otherlibs/unix/fchown.c2
-rw-r--r--otherlibs/unix/fcntl.c4
-rw-r--r--otherlibs/unix/ftruncate.c4
-rw-r--r--otherlibs/unix/getaddrinfo.c2
-rw-r--r--otherlibs/unix/getcwd.c2
-rw-r--r--otherlibs/unix/getgroups.c2
-rw-r--r--otherlibs/unix/gethost.c4
-rw-r--r--otherlibs/unix/gethostname.c2
-rw-r--r--otherlibs/unix/getnameinfo.c2
-rw-r--r--otherlibs/unix/getpeername.c2
-rw-r--r--otherlibs/unix/getproto.c4
-rw-r--r--otherlibs/unix/getserv.c4
-rw-r--r--otherlibs/unix/getsockname.c2
-rw-r--r--otherlibs/unix/gettimeofday.c2
-rw-r--r--otherlibs/unix/gmtime.c2
-rw-r--r--otherlibs/unix/initgroups.c2
-rw-r--r--otherlibs/unix/itimer.c4
-rw-r--r--otherlibs/unix/listen.c2
-rw-r--r--otherlibs/unix/lockf.c2
-rw-r--r--otherlibs/unix/mkfifo.c2
-rw-r--r--otherlibs/unix/putenv.c2
-rw-r--r--otherlibs/unix/rewinddir.c2
-rw-r--r--otherlibs/unix/select.c2
-rw-r--r--otherlibs/unix/sendrecv.c10
-rw-r--r--otherlibs/unix/setgroups.c2
-rw-r--r--otherlibs/unix/shutdown.c2
-rw-r--r--otherlibs/unix/signals.c6
-rw-r--r--otherlibs/unix/socket.c2
-rw-r--r--otherlibs/unix/socketpair.c2
-rw-r--r--otherlibs/unix/sockopt.c4
-rw-r--r--otherlibs/unix/strofaddr.c2
-rw-r--r--otherlibs/unix/symlink.c2
-rw-r--r--otherlibs/unix/termios.c14
-rw-r--r--otherlibs/unix/truncate.c4
-rw-r--r--otherlibs/unix/utimes.c2
-rw-r--r--otherlibs/unix/wait.c2
42 files changed, 62 insertions, 62 deletions
diff --git a/otherlibs/systhreads/st_posix.h b/otherlibs/systhreads/st_posix.h
index 8116dcf591..a751ff32e0 100644
--- a/otherlibs/systhreads/st_posix.h
+++ b/otherlibs/systhreads/st_posix.h
@@ -422,7 +422,7 @@ value caml_wait_signal(value sigs) /* ML */
st_check_error(retcode, "Thread.wait_signal");
return Val_int(caml_rev_convert_signal_number(signo));
#else
- invalid_argument("Thread.wait_signal not implemented");
+ caml_invalid_argument("Thread.wait_signal not implemented");
return Val_int(0); /* not reached */
#endif
}
diff --git a/otherlibs/unix/accept.c b/otherlibs/unix/accept.c
index ea95757130..a6aa553aa2 100644
--- a/otherlibs/unix/accept.c
+++ b/otherlibs/unix/accept.c
@@ -49,6 +49,6 @@ CAMLprim value unix_accept(value sock)
#else
CAMLprim value unix_accept(value sock)
-{ invalid_argument("accept not implemented"); }
+{ caml_invalid_argument("accept not implemented"); }
#endif
diff --git a/otherlibs/unix/addrofstr.c b/otherlibs/unix/addrofstr.c
index 91fc7b2c84..2325cb9ec3 100644
--- a/otherlibs/unix/addrofstr.c
+++ b/otherlibs/unix/addrofstr.c
@@ -92,6 +92,6 @@ CAMLprim value unix_inet_addr_of_string(value s)
#else
CAMLprim value unix_inet_addr_of_string(value s)
-{ invalid_argument("inet_addr_of_string not implemented"); }
+{ caml_invalid_argument("inet_addr_of_string not implemented"); }
#endif
diff --git a/otherlibs/unix/bind.c b/otherlibs/unix/bind.c
index 8849e6a9f5..73b24b061f 100644
--- a/otherlibs/unix/bind.c
+++ b/otherlibs/unix/bind.c
@@ -36,6 +36,6 @@ CAMLprim value unix_bind(value socket, value address)
#else
CAMLprim value unix_bind(value socket, value address)
-{ invalid_argument("bind not implemented"); }
+{ caml_invalid_argument("bind not implemented"); }
#endif
diff --git a/otherlibs/unix/connect.c b/otherlibs/unix/connect.c
index 0a21fbf783..8569ab4197 100644
--- a/otherlibs/unix/connect.c
+++ b/otherlibs/unix/connect.c
@@ -39,6 +39,6 @@ CAMLprim value unix_connect(value socket, value address)
#else
CAMLprim value unix_connect(value socket, value address)
-{ invalid_argument("connect not implemented"); }
+{ caml_invalid_argument("connect not implemented"); }
#endif
diff --git a/otherlibs/unix/fchmod.c b/otherlibs/unix/fchmod.c
index 5fe50c462d..49c7e8b019 100644
--- a/otherlibs/unix/fchmod.c
+++ b/otherlibs/unix/fchmod.c
@@ -35,6 +35,6 @@ CAMLprim value unix_fchmod(value fd, value perm)
#else
CAMLprim value unix_fchmod(value fd, value perm)
-{ invalid_argument("fchmod not implemented"); }
+{ caml_invalid_argument("fchmod not implemented"); }
#endif
diff --git a/otherlibs/unix/fchown.c b/otherlibs/unix/fchown.c
index c1d86d62bf..8e441967ad 100644
--- a/otherlibs/unix/fchown.c
+++ b/otherlibs/unix/fchown.c
@@ -33,6 +33,6 @@ CAMLprim value unix_fchown(value fd, value uid, value gid)
#else
CAMLprim value unix_fchown(value fd, value uid, value gid)
-{ invalid_argument("fchown not implemented"); }
+{ caml_invalid_argument("fchown not implemented"); }
#endif
diff --git a/otherlibs/unix/fcntl.c b/otherlibs/unix/fcntl.c
index 869534db7b..e721b15ed0 100644
--- a/otherlibs/unix/fcntl.c
+++ b/otherlibs/unix/fcntl.c
@@ -70,9 +70,9 @@ CAMLprim value unix_clear_close_on_exec(value fd)
#else
CAMLprim value unix_set_close_on_exec(value fd)
-{ invalid_argument("set_close_on_exec not implemented"); }
+{ caml_invalid_argument("set_close_on_exec not implemented"); }
CAMLprim value unix_clear_close_on_exec(value fd)
-{ invalid_argument("clear_close_on_exec not implemented"); }
+{ caml_invalid_argument("clear_close_on_exec not implemented"); }
#endif
diff --git a/otherlibs/unix/ftruncate.c b/otherlibs/unix/ftruncate.c
index 7c49f2d63c..335ffe08e4 100644
--- a/otherlibs/unix/ftruncate.c
+++ b/otherlibs/unix/ftruncate.c
@@ -51,9 +51,9 @@ CAMLprim value unix_ftruncate_64(value fd, value len)
#else
CAMLprim value unix_ftruncate(value fd, value len)
-{ invalid_argument("ftruncate not implemented"); }
+{ caml_invalid_argument("ftruncate not implemented"); }
CAMLprim value unix_ftruncate_64(value fd, value len)
-{ invalid_argument("ftruncate not implemented"); }
+{ caml_invalid_argument("ftruncate not implemented"); }
#endif
diff --git a/otherlibs/unix/getaddrinfo.c b/otherlibs/unix/getaddrinfo.c
index da0be9ad11..90c27dae9c 100644
--- a/otherlibs/unix/getaddrinfo.c
+++ b/otherlibs/unix/getaddrinfo.c
@@ -130,6 +130,6 @@ CAMLprim value unix_getaddrinfo(value vnode, value vserv, value vopts)
#else
CAMLprim value unix_getaddrinfo(value vnode, value vserv, value vopts)
-{ invalid_argument("getaddrinfo not implemented"); }
+{ caml_invalid_argument("getaddrinfo not implemented"); }
#endif
diff --git a/otherlibs/unix/getcwd.c b/otherlibs/unix/getcwd.c
index e87d7ded46..74c8a07f08 100644
--- a/otherlibs/unix/getcwd.c
+++ b/otherlibs/unix/getcwd.c
@@ -52,7 +52,7 @@ CAMLprim value unix_getcwd(value unit)
#else
CAMLprim value unix_getcwd(value unit)
-{ invalid_argument("getcwd not implemented"); }
+{ caml_invalid_argument("getcwd not implemented"); }
#endif
#endif
diff --git a/otherlibs/unix/getgroups.c b/otherlibs/unix/getgroups.c
index ead3a0cc46..4bccd69dca 100644
--- a/otherlibs/unix/getgroups.c
+++ b/otherlibs/unix/getgroups.c
@@ -44,6 +44,6 @@ CAMLprim value unix_getgroups(value unit)
#else
CAMLprim value unix_getgroups(value unit)
-{ invalid_argument("getgroups not implemented"); }
+{ caml_invalid_argument("getgroups not implemented"); }
#endif
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c
index c91f711495..1c1f5efa03 100644
--- a/otherlibs/unix/gethost.c
+++ b/otherlibs/unix/gethost.c
@@ -176,9 +176,9 @@ CAMLprim value unix_gethostbyname(value name)
#else
CAMLprim value unix_gethostbyaddr(value name)
-{ invalid_argument("gethostbyaddr not implemented"); }
+{ caml_invalid_argument("gethostbyaddr not implemented"); }
CAMLprim value unix_gethostbyname(value name)
-{ invalid_argument("gethostbyname not implemented"); }
+{ caml_invalid_argument("gethostbyname not implemented"); }
#endif
diff --git a/otherlibs/unix/gethostname.c b/otherlibs/unix/gethostname.c
index ed3b8a91c9..0552a448e5 100644
--- a/otherlibs/unix/gethostname.c
+++ b/otherlibs/unix/gethostname.c
@@ -50,7 +50,7 @@ CAMLprim value unix_gethostname(value unit)
#else
CAMLprim value unix_gethostname(value unit)
-{ invalid_argument("gethostname not implemented"); }
+{ caml_invalid_argument("gethostname not implemented"); }
#endif
#endif
diff --git a/otherlibs/unix/getnameinfo.c b/otherlibs/unix/getnameinfo.c
index 02f02ea4e3..cd2ec33619 100644
--- a/otherlibs/unix/getnameinfo.c
+++ b/otherlibs/unix/getnameinfo.c
@@ -62,6 +62,6 @@ CAMLprim value unix_getnameinfo(value vaddr, value vopts)
#else
CAMLprim value unix_getnameinfo(value vaddr, value vopts)
-{ invalid_argument("getnameinfo not implemented"); }
+{ caml_invalid_argument("getnameinfo not implemented"); }
#endif
diff --git a/otherlibs/unix/getpeername.c b/otherlibs/unix/getpeername.c
index 86108c335f..9390b55b6a 100644
--- a/otherlibs/unix/getpeername.c
+++ b/otherlibs/unix/getpeername.c
@@ -36,6 +36,6 @@ CAMLprim value unix_getpeername(value sock)
#else
CAMLprim value unix_getpeername(value sock)
-{ invalid_argument("getpeername not implemented"); }
+{ caml_invalid_argument("getpeername not implemented"); }
#endif
diff --git a/otherlibs/unix/getproto.c b/otherlibs/unix/getproto.c
index 24743cfe7a..d50c2d4a10 100644
--- a/otherlibs/unix/getproto.c
+++ b/otherlibs/unix/getproto.c
@@ -61,9 +61,9 @@ CAMLprim value unix_getprotobynumber(value proto)
#else
CAMLprim value unix_getprotobynumber(value proto)
-{ invalid_argument("getprotobynumber not implemented"); }
+{ caml_invalid_argument("getprotobynumber not implemented"); }
CAMLprim value unix_getprotobyname(value name)
-{ invalid_argument("getprotobyname not implemented"); }
+{ caml_invalid_argument("getprotobyname not implemented"); }
#endif
diff --git a/otherlibs/unix/getserv.c b/otherlibs/unix/getserv.c
index 507853d86f..9edfa8798c 100644
--- a/otherlibs/unix/getserv.c
+++ b/otherlibs/unix/getserv.c
@@ -69,9 +69,9 @@ CAMLprim value unix_getservbyport(value port, value proto)
#else
CAMLprim value unix_getservbyport(value port, value proto)
-{ invalid_argument("getservbyport not implemented"); }
+{ caml_invalid_argument("getservbyport not implemented"); }
CAMLprim value unix_getservbyname(value name, value proto)
-{ invalid_argument("getservbyname not implemented"); }
+{ caml_invalid_argument("getservbyname not implemented"); }
#endif
diff --git a/otherlibs/unix/getsockname.c b/otherlibs/unix/getsockname.c
index 008da87336..3544b25f82 100644
--- a/otherlibs/unix/getsockname.c
+++ b/otherlibs/unix/getsockname.c
@@ -36,6 +36,6 @@ CAMLprim value unix_getsockname(value sock)
#else
CAMLprim value unix_getsockname(value sock)
-{ invalid_argument("getsockname not implemented"); }
+{ caml_invalid_argument("getsockname not implemented"); }
#endif
diff --git a/otherlibs/unix/gettimeofday.c b/otherlibs/unix/gettimeofday.c
index 329c6e0cf3..609a9a827e 100644
--- a/otherlibs/unix/gettimeofday.c
+++ b/otherlibs/unix/gettimeofday.c
@@ -33,6 +33,6 @@ CAMLprim value unix_gettimeofday(value unit)
#else
CAMLprim value unix_gettimeofday(value unit)
-{ invalid_argument("gettimeofday not implemented"); }
+{ caml_invalid_argument("gettimeofday not implemented"); }
#endif
diff --git a/otherlibs/unix/gmtime.c b/otherlibs/unix/gmtime.c
index 0100f0babc..b0c2711ab3 100644
--- a/otherlibs/unix/gmtime.c
+++ b/otherlibs/unix/gmtime.c
@@ -90,6 +90,6 @@ CAMLprim value unix_mktime(value t)
#else
CAMLprim value unix_mktime(value t)
-{ invalid_argument("mktime not implemented"); }
+{ caml_invalid_argument("mktime not implemented"); }
#endif
diff --git a/otherlibs/unix/initgroups.c b/otherlibs/unix/initgroups.c
index 48fb532fd1..77be82f075 100644
--- a/otherlibs/unix/initgroups.c
+++ b/otherlibs/unix/initgroups.c
@@ -41,6 +41,6 @@ CAMLprim value unix_initgroups(value user, value group)
#else
CAMLprim value unix_initgroups(value user, value group)
-{ invalid_argument("initgroups not implemented"); }
+{ caml_invalid_argument("initgroups not implemented"); }
#endif
diff --git a/otherlibs/unix/itimer.c b/otherlibs/unix/itimer.c
index 77159b3f24..099937068a 100644
--- a/otherlibs/unix/itimer.c
+++ b/otherlibs/unix/itimer.c
@@ -68,8 +68,8 @@ CAMLprim value unix_getitimer(value which)
#else
CAMLprim value unix_setitimer(value which, value newval)
-{ invalid_argument("setitimer not implemented"); }
+{ caml_invalid_argument("setitimer not implemented"); }
CAMLprim value unix_getitimer(value which)
-{ invalid_argument("getitimer not implemented"); }
+{ caml_invalid_argument("getitimer not implemented"); }
#endif
diff --git a/otherlibs/unix/listen.c b/otherlibs/unix/listen.c
index 40b511b180..f5ac130df3 100644
--- a/otherlibs/unix/listen.c
+++ b/otherlibs/unix/listen.c
@@ -30,6 +30,6 @@ CAMLprim value unix_listen(value sock, value backlog)
#else
CAMLprim value unix_listen(value sock, value backlog)
-{ invalid_argument("listen not implemented"); }
+{ caml_invalid_argument("listen not implemented"); }
#endif
diff --git a/otherlibs/unix/lockf.c b/otherlibs/unix/lockf.c
index f27aafbc59..cdcc4afe3f 100644
--- a/otherlibs/unix/lockf.c
+++ b/otherlibs/unix/lockf.c
@@ -110,7 +110,7 @@ CAMLprim value unix_lockf(value fd, value cmd, value span)
#else
CAMLprim value unix_lockf(value fd, value cmd, value span)
-{ invalid_argument("lockf not implemented"); }
+{ caml_invalid_argument("lockf not implemented"); }
#endif
#endif
diff --git a/otherlibs/unix/mkfifo.c b/otherlibs/unix/mkfifo.c
index eb726ca5e2..4b97c1c45b 100644
--- a/otherlibs/unix/mkfifo.c
+++ b/otherlibs/unix/mkfifo.c
@@ -66,7 +66,7 @@ CAMLprim value unix_mkfifo(value path, value mode)
CAMLprim value unix_mkfifo(value path, value mode)
{
- invalid_argument("mkfifo not implemented");
+ caml_invalid_argument("mkfifo not implemented");
}
#endif
diff --git a/otherlibs/unix/putenv.c b/otherlibs/unix/putenv.c
index cbb6fa7b3a..f5709b699c 100644
--- a/otherlibs/unix/putenv.c
+++ b/otherlibs/unix/putenv.c
@@ -48,6 +48,6 @@ CAMLprim value unix_putenv(value name, value val)
#else
CAMLprim value unix_putenv(value name, value val)
-{ invalid_argument("putenv not implemented"); }
+{ caml_invalid_argument("putenv not implemented"); }
#endif
diff --git a/otherlibs/unix/rewinddir.c b/otherlibs/unix/rewinddir.c
index 2ebc1664de..e3f889f2b5 100644
--- a/otherlibs/unix/rewinddir.c
+++ b/otherlibs/unix/rewinddir.c
@@ -37,6 +37,6 @@ CAMLprim value unix_rewinddir(value vd)
#else
CAMLprim value unix_rewinddir(value d)
-{ invalid_argument("rewinddir not implemented"); }
+{ caml_invalid_argument("rewinddir not implemented"); }
#endif
diff --git a/otherlibs/unix/select.c b/otherlibs/unix/select.c
index 96e5be0b12..aaf3ddc76e 100644
--- a/otherlibs/unix/select.c
+++ b/otherlibs/unix/select.c
@@ -109,6 +109,6 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds,
CAMLprim value unix_select(value readfds, value writefds, value exceptfds,
value timeout)
-{ invalid_argument("select not implemented"); }
+{ caml_invalid_argument("select not implemented"); }
#endif
diff --git a/otherlibs/unix/sendrecv.c b/otherlibs/unix/sendrecv.c
index 4e7869585e..4b8e755461 100644
--- a/otherlibs/unix/sendrecv.c
+++ b/otherlibs/unix/sendrecv.c
@@ -128,21 +128,21 @@ CAMLprim value unix_sendto(value *argv, int argc)
CAMLprim value unix_recv(value sock, value buff, value ofs, value len,
value flags)
-{ invalid_argument("recv not implemented"); }
+{ caml_invalid_argument("recv not implemented"); }
CAMLprim value unix_recvfrom(value sock, value buff, value ofs, value len,
value flags)
-{ invalid_argument("recvfrom not implemented"); }
+{ caml_invalid_argument("recvfrom not implemented"); }
CAMLprim value unix_send(value sock, value buff, value ofs, value len,
value flags)
-{ invalid_argument("send not implemented"); }
+{ caml_invalid_argument("send not implemented"); }
CAMLprim value unix_sendto_native(value sock, value buff, value ofs, value len,
value flags, value dest)
-{ invalid_argument("sendto not implemented"); }
+{ caml_invalid_argument("sendto not implemented"); }
CAMLprim value unix_sendto(value *argv, int argc)
-{ invalid_argument("sendto not implemented"); }
+{ caml_invalid_argument("sendto not implemented"); }
#endif
diff --git a/otherlibs/unix/setgroups.c b/otherlibs/unix/setgroups.c
index eb8956f58b..6c63cce015 100644
--- a/otherlibs/unix/setgroups.c
+++ b/otherlibs/unix/setgroups.c
@@ -48,6 +48,6 @@ CAMLprim value unix_setgroups(value groups)
#else
CAMLprim value unix_setgroups(value groups)
-{ invalid_argument("setgroups not implemented"); }
+{ caml_invalid_argument("setgroups not implemented"); }
#endif
diff --git a/otherlibs/unix/shutdown.c b/otherlibs/unix/shutdown.c
index db7d7ad65c..6c0edd379c 100644
--- a/otherlibs/unix/shutdown.c
+++ b/otherlibs/unix/shutdown.c
@@ -35,6 +35,6 @@ CAMLprim value unix_shutdown(value sock, value cmd)
#else
CAMLprim value unix_shutdown(value sock, value cmd)
-{ invalid_argument("shutdown not implemented"); }
+{ caml_invalid_argument("shutdown not implemented"); }
#endif
diff --git a/otherlibs/unix/signals.c b/otherlibs/unix/signals.c
index e3649c035f..945e7d16dc 100644
--- a/otherlibs/unix/signals.c
+++ b/otherlibs/unix/signals.c
@@ -97,12 +97,12 @@ CAMLprim value unix_sigsuspend(value vset)
#else
CAMLprim value unix_sigprocmask(value vaction, value vset)
-{ invalid_argument("Unix.sigprocmask not available"); }
+{ caml_invalid_argument("Unix.sigprocmask not available"); }
CAMLprim value unix_sigpending(value unit)
-{ invalid_argument("Unix.sigpending not available"); }
+{ caml_invalid_argument("Unix.sigpending not available"); }
CAMLprim value unix_sigsuspend(value vset)
-{ invalid_argument("Unix.sigsuspend not available"); }
+{ caml_invalid_argument("Unix.sigsuspend not available"); }
#endif
diff --git a/otherlibs/unix/socket.c b/otherlibs/unix/socket.c
index 667381ed77..9329d40ffe 100644
--- a/otherlibs/unix/socket.c
+++ b/otherlibs/unix/socket.c
@@ -51,6 +51,6 @@ CAMLprim value unix_socket(value domain, value type, value proto)
#else
CAMLprim value unix_socket(value domain, value type, value proto)
-{ invalid_argument("socket not implemented"); }
+{ caml_invalid_argument("socket not implemented"); }
#endif
diff --git a/otherlibs/unix/socketpair.c b/otherlibs/unix/socketpair.c
index 9bb5fd1ec8..0f92f2e3ea 100644
--- a/otherlibs/unix/socketpair.c
+++ b/otherlibs/unix/socketpair.c
@@ -41,6 +41,6 @@ CAMLprim value unix_socketpair(value domain, value type, value proto)
#else
CAMLprim value unix_socketpair(value domain, value type, value proto)
-{ invalid_argument("socketpair not implemented"); }
+{ caml_invalid_argument("socketpair not implemented"); }
#endif
diff --git a/otherlibs/unix/sockopt.c b/otherlibs/unix/sockopt.c
index 999c78768a..d2961d09e9 100644
--- a/otherlibs/unix/sockopt.c
+++ b/otherlibs/unix/sockopt.c
@@ -293,9 +293,9 @@ CAMLprim value unix_setsockopt(value vty, value vsocket, value voption,
#else
CAMLprim value unix_getsockopt(value vty, value socket, value option)
-{ invalid_argument("getsockopt not implemented"); }
+{ caml_invalid_argument("getsockopt not implemented"); }
CAMLprim value unix_setsockopt(value vty, value socket, value option, value val)
-{ invalid_argument("setsockopt not implemented"); }
+{ caml_invalid_argument("setsockopt not implemented"); }
#endif
diff --git a/otherlibs/unix/strofaddr.c b/otherlibs/unix/strofaddr.c
index aacf34dfda..45675ad0bb 100644
--- a/otherlibs/unix/strofaddr.c
+++ b/otherlibs/unix/strofaddr.c
@@ -69,6 +69,6 @@ CAMLprim value unix_string_of_inet_addr(value a)
#else
CAMLprim value unix_string_of_inet_addr(value a)
-{ invalid_argument("string_of_inet_addr not implemented"); }
+{ caml_invalid_argument("string_of_inet_addr not implemented"); }
#endif
diff --git a/otherlibs/unix/symlink.c b/otherlibs/unix/symlink.c
index 72f9c21c0a..0bff3f6d70 100644
--- a/otherlibs/unix/symlink.c
+++ b/otherlibs/unix/symlink.c
@@ -50,7 +50,7 @@ CAMLprim value unix_has_symlink(value unit)
#else
CAMLprim value unix_symlink(value to_dir, value path1, value path2)
-{ invalid_argument("symlink not implemented"); }
+{ caml_invalid_argument("symlink not implemented"); }
CAMLprim value unix_has_symlink(value unit)
{
diff --git a/otherlibs/unix/termios.c b/otherlibs/unix/termios.c
index c14da68d61..b6a221ff46 100644
--- a/otherlibs/unix/termios.c
+++ b/otherlibs/unix/termios.c
@@ -333,7 +333,7 @@ CAMLprim value unix_tcsendbreak(value fd, value delay)
#if defined(__ANDROID__)
CAMLprim value unix_tcdrain(value fd)
-{ invalid_argument("tcdrain not implemented"); }
+{ caml_invalid_argument("tcdrain not implemented"); }
#else
CAMLprim value unix_tcdrain(value fd)
{
@@ -367,21 +367,21 @@ CAMLprim value unix_tcflow(value fd, value action)
#else
CAMLprim value unix_tcgetattr(value fd)
-{ invalid_argument("tcgetattr not implemented"); }
+{ caml_invalid_argument("tcgetattr not implemented"); }
CAMLprim value unix_tcsetattr(value fd, value when, value arg)
-{ invalid_argument("tcsetattr not implemented"); }
+{ caml_invalid_argument("tcsetattr not implemented"); }
CAMLprim value unix_tcsendbreak(value fd, value delay)
-{ invalid_argument("tcsendbreak not implemented"); }
+{ caml_invalid_argument("tcsendbreak not implemented"); }
CAMLprim value unix_tcdrain(value fd)
-{ invalid_argument("tcdrain not implemented"); }
+{ caml_invalid_argument("tcdrain not implemented"); }
CAMLprim value unix_tcflush(value fd, value queue)
-{ invalid_argument("tcflush not implemented"); }
+{ caml_invalid_argument("tcflush not implemented"); }
CAMLprim value unix_tcflow(value fd, value action)
-{ invalid_argument("tcflow not implemented"); }
+{ caml_invalid_argument("tcflow not implemented"); }
#endif
diff --git a/otherlibs/unix/truncate.c b/otherlibs/unix/truncate.c
index d2c6f125ac..4f333cbd9c 100644
--- a/otherlibs/unix/truncate.c
+++ b/otherlibs/unix/truncate.c
@@ -64,9 +64,9 @@ CAMLprim value unix_truncate_64(value path, value vlen)
#else
CAMLprim value unix_truncate(value path, value len)
-{ invalid_argument("truncate not implemented"); }
+{ caml_invalid_argument("truncate not implemented"); }
CAMLprim value unix_truncate_64(value path, value len)
-{ invalid_argument("truncate not implemented"); }
+{ caml_invalid_argument("truncate not implemented"); }
#endif
diff --git a/otherlibs/unix/utimes.c b/otherlibs/unix/utimes.c
index f5efd7d117..f60fbbcecd 100644
--- a/otherlibs/unix/utimes.c
+++ b/otherlibs/unix/utimes.c
@@ -90,6 +90,6 @@ CAMLprim value unix_utimes(value path, value atime, value mtime)
#else
CAMLprim value unix_utimes(value path, value atime, value mtime)
-{ invalid_argument("utimes not implemented"); }
+{ caml_invalid_argument("utimes not implemented"); }
#endif
diff --git a/otherlibs/unix/wait.c b/otherlibs/unix/wait.c
index 7c2cea10fa..448b3f3121 100644
--- a/otherlibs/unix/wait.c
+++ b/otherlibs/unix/wait.c
@@ -99,6 +99,6 @@ CAMLprim value unix_waitpid(value flags, value pid_req)
#else
CAMLprim value unix_waitpid(value flags, value pid_req)
-{ invalid_argument("waitpid not implemented"); }
+{ caml_invalid_argument("waitpid not implemented"); }
#endif