From 13945a71ed2616df9a4672cfc83f8f450ec437a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hinderer?= Date: Thu, 17 Nov 2016 11:03:09 +0100 Subject: 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. --- otherlibs/unix/write.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'otherlibs/unix/write.c') 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(); -- cgit v1.2.1