Skip to content

Commit

Permalink
Rename win32_socket to caml_win32_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed May 24, 2022
1 parent 1645376 commit fc0ee1e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions otherlibs/unix/dup_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static SOCKET duplicate_socket(BOOL inherit, SOCKET oldsock)
return INVALID_SOCKET;
}

return win32_socket(info.iAddressFamily, info.iSocketType, info.iProtocol,
&info, inherit);
return caml_win32_socket(info.iAddressFamily, info.iSocketType,
info.iProtocol, &info, inherit);
}

CAMLprim value unix_dup(value cloexec, value fd)
Expand Down
16 changes: 8 additions & 8 deletions otherlibs/unix/socket_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ int unix_socket_type_table[] = {
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_SEQPACKET
};

SOCKET win32_socket(int domain, int type, int protocol,
LPWSAPROTOCOL_INFO info,
BOOL inherit)
SOCKET caml_win32_socket(int domain, int type, int protocol,
LPWSAPROTOCOL_INFO info,
BOOL inherit)
{
SOCKET s;
DWORD flags = WSA_FLAG_OVERLAPPED;
Expand Down Expand Up @@ -66,11 +66,11 @@ CAMLprim value unix_socket(value cloexec, value domain, value type, value proto)
CAMLparam4(cloexec, domain, type, proto);
CAMLlocal1(v_socket);
SOCKET s;
s = win32_socket(unix_socket_domain_table[Int_val(domain)],
unix_socket_type_table[Int_val(type)],
Int_val(proto),
NULL,
! unix_cloexec_p(cloexec));
s = caml_win32_socket(unix_socket_domain_table[Int_val(domain)],
unix_socket_type_table[Int_val(type)],
Int_val(proto),
NULL,
! unix_cloexec_p(cloexec));
if (s == INVALID_SOCKET)
uerror("socket", Nothing);
v_socket = win_alloc_socket(s);
Expand Down
4 changes: 2 additions & 2 deletions otherlibs/unix/socketpair_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static int socketpair(int domain, int type, int protocol,
goto fail_path;
}

listener = win32_socket(domain, type, protocol, NULL, inherit);
listener = caml_win32_socket(domain, type, protocol, NULL, inherit);
if (listener == INVALID_SOCKET)
goto fail_wsa;

Expand All @@ -96,7 +96,7 @@ static int socketpair(int domain, int type, int protocol,
if (rc == SOCKET_ERROR)
goto fail_wsa;

client = win32_socket(domain, type, protocol, NULL, inherit);
client = caml_win32_socket(domain, type, protocol, NULL, inherit);
if (client == INVALID_SOCKET)
goto fail_wsa;

Expand Down
6 changes: 3 additions & 3 deletions otherlibs/unix/unixsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ extern value win_alloc_handle(HANDLE);
extern value win_alloc_socket(SOCKET);
extern int win_CRT_fd_of_filedescr(value handle);

extern SOCKET win32_socket(int domain, int type, int protocol,
LPWSAPROTOCOL_INFO info,
BOOL inherit);
extern SOCKET caml_win32_socket(int domain, int type, int protocol,
LPWSAPROTOCOL_INFO info,
BOOL inherit);

#define NO_CRT_FD (-1)

Expand Down

0 comments on commit fc0ee1e

Please sign in to comment.