summaryrefslogtreecommitdiff
path: root/otherlibs/unix/write.c
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2016-11-17 11:03:09 +0100
committerDamien Doligez <damien.doligez@gmail.com>2016-11-17 11:03:09 +0100
commit13945a71ed2616df9a4672cfc83f8f450ec437a8 (patch)
tree81b76ce495fd56fae8b5ad42d028826ec3193360 /otherlibs/unix/write.c
parentc628d9c6e14b8a4e032b892e59343f77729da050 (diff)
downloadocaml-13945a71ed2616df9a4672cfc83f8f450ec437a8.tar.gz
Do not use the compatibility macros in the C stub code. (#892)
* Don't use the compatibility macros, neither in the C stub code nor in the testsuite. * Make sure compiler sources do not use deprecated C identifiers. This is achieved by ensuring that the CAML_NAME_SPACE macro is defined everytime a C source file is compiled, rather than being defined only in a few places. Defining this macro guarantees that the compatibility.h header (where these deprecated identifiers are defined) will not be included.
Diffstat (limited to 'otherlibs/unix/write.c')
-rw-r--r--otherlibs/unix/write.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/otherlibs/unix/write.c b/otherlibs/unix/write.c
index 0d12d48a2a..8d5b6a87c2 100644
--- a/otherlibs/unix/write.c
+++ b/otherlibs/unix/write.c
@@ -40,9 +40,9 @@ CAMLprim value unix_write(value fd, value buf, value vofs, value vlen)
while (len > 0) {
numbytes = len > UNIX_BUFFER_SIZE ? UNIX_BUFFER_SIZE : len;
memmove (iobuf, &Byte(buf, ofs), numbytes);
- enter_blocking_section();
+ caml_enter_blocking_section();
ret = write(Int_val(fd), iobuf, numbytes);
- leave_blocking_section();
+ caml_leave_blocking_section();
if (ret == -1) {
if ((errno == EAGAIN || errno == EWOULDBLOCK) && written > 0) break;
uerror("write", Nothing);
@@ -76,9 +76,9 @@ CAMLprim value unix_single_write(value fd, value buf, value vofs, value vlen)
if (len > 0) {
numbytes = len > UNIX_BUFFER_SIZE ? UNIX_BUFFER_SIZE : len;
memmove (iobuf, &Byte(buf, ofs), numbytes);
- enter_blocking_section();
+ caml_enter_blocking_section();
ret = write(Int_val(fd), iobuf, numbytes);
- leave_blocking_section();
+ caml_leave_blocking_section();
if (ret == -1) uerror("single_write", Nothing);
}
End_roots();