Skip to content

Commit

Permalink
fix NOT_AVAILABLE stub code for Lwt_unix.send_msgto
Browse files Browse the repository at this point in the history
  • Loading branch information
fdopen authored and raphael-proust committed Jul 24, 2021
1 parent ea74869 commit f6904f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/unix/lwt_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ char *lwt_unix_strdup(char *string);
/* Raise [Lwt_unix.Not_available]. */
void lwt_unix_not_available(char const *feature) Noreturn;

#define LWT_NOT_AVAILABLE_BYTE(prim) \
CAMLprim value lwt_##prim(value *a1, int a2) \
{ \
lwt_unix_not_available(#prim); \
}
#define LWT_NOT_AVAILABLE1(prim) \
CAMLprim value lwt_##prim(value a1) { lwt_unix_not_available(#prim); }
#define LWT_NOT_AVAILABLE2(prim) \
Expand Down
7 changes: 4 additions & 3 deletions src/unix/windows_c/windows_not_available.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ LWT_NOT_AVAILABLE5(unix_bytes_send)
LWT_NOT_AVAILABLE5(unix_recvfrom)
LWT_NOT_AVAILABLE5(unix_bytes_recvfrom)
LWT_NOT_AVAILABLE6(unix_sendto)
LWT_NOT_AVAILABLE6(unix_sendto_byte)
LWT_NOT_AVAILABLE_BYTE(unix_sendto_byte)
LWT_NOT_AVAILABLE6(unix_bytes_sendto)
LWT_NOT_AVAILABLE6(unix_bytes_sendto_byte)
LWT_NOT_AVAILABLE_BYTE(unix_bytes_sendto_byte)
LWT_NOT_AVAILABLE3(unix_recv_msg)
LWT_NOT_AVAILABLE3(unix_send_msg)
LWT_NOT_AVAILABLE6(unix_send_msg)
LWT_NOT_AVAILABLE1(unix_get_credentials)
LWT_NOT_AVAILABLE2(unix_mcast_set_loop)
LWT_NOT_AVAILABLE2(unix_mcast_set_ttl)
Expand Down Expand Up @@ -76,4 +76,5 @@ LWT_NOT_AVAILABLE2(unix_bind_job)
LWT_NOT_AVAILABLE1(unix_getcwd_job)
LWT_NOT_AVAILABLE1(unix_tcgetattr_job)
LWT_NOT_AVAILABLE3(unix_tcsetattr_job)
LWT_NOT_AVAILABLE_BYTE(unix_send_msg_byte)
#endif

0 comments on commit f6904f0

Please sign in to comment.