summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2005-09-22 14:21:50 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2005-09-22 14:21:50 +0000
commit3de54dec267abf845ca32bd1f6026834cc04d853 (patch)
treedaa34de1fd38e86c2dd0c67896c3c5748511fe1c /otherlibs/win32unix
parent11524e2578b62fa30620121873aa372b180c0a74 (diff)
Remplacement long/unsigned long par intnat/uintnat
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7064 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix')
-rw-r--r--otherlibs/win32unix/lockf.c2
-rw-r--r--otherlibs/win32unix/sendrecv.c8
-rw-r--r--otherlibs/win32unix/unixsupport.c8
-rw-r--r--otherlibs/win32unix/unixsupport.h2
-rw-r--r--otherlibs/win32unix/winwait.c2
-rw-r--r--otherlibs/win32unix/write.c4
6 files changed, 13 insertions, 13 deletions
diff --git a/otherlibs/win32unix/lockf.c b/otherlibs/win32unix/lockf.c
index 918305281..3aa902d42 100644
--- a/otherlibs/win32unix/lockf.c
+++ b/otherlibs/win32unix/lockf.c
@@ -62,7 +62,7 @@ static void set_file_pointer(HANDLE h, LARGE_INTEGER dest,
LONG high = dest.HighPart;
DWORD ret = SetFilePointer(h, dest.LowPart, &high, method);
if (ret == INVALID_SET_FILE_POINTER) {
- long err = GetLastError();
+ DWORD err = GetLastError();
if (err != NO_ERROR) { win32_maperr(err); uerror("lockf", Nothing); }
}
if (cur != NULL) { cur->LowPart = ret; cur->HighPart = high; }
diff --git a/otherlibs/win32unix/sendrecv.c b/otherlibs/win32unix/sendrecv.c
index cbb8ff42b..773aa9260 100644
--- a/otherlibs/win32unix/sendrecv.c
+++ b/otherlibs/win32unix/sendrecv.c
@@ -27,7 +27,7 @@ static int msg_flag_table[] = {
CAMLprim value unix_recv(value sock, value buff, value ofs, value len, value flags)
{
int ret;
- long numbytes;
+ intnat numbytes;
char iobuf[UNIX_BUFFER_SIZE];
Begin_root (buff);
@@ -49,7 +49,7 @@ CAMLprim value unix_recv(value sock, value buff, value ofs, value len, value fla
CAMLprim value unix_recvfrom(value sock, value buff, value ofs, value len, value flags)
{
int ret;
- long numbytes;
+ intnat numbytes;
char iobuf[UNIX_BUFFER_SIZE];
value res;
value adr = Val_unit;
@@ -82,7 +82,7 @@ CAMLprim value unix_recvfrom(value sock, value buff, value ofs, value len, value
CAMLprim value unix_send(value sock, value buff, value ofs, value len, value flags)
{
int ret;
- long numbytes;
+ intnat numbytes;
char iobuf[UNIX_BUFFER_SIZE];
numbytes = Long_val(len);
@@ -102,7 +102,7 @@ CAMLprim value unix_send(value sock, value buff, value ofs, value len, value fla
value unix_sendto_native(value sock, value buff, value ofs, value len, value flags, value dest)
{
int ret;
- long numbytes;
+ intnat numbytes;
char iobuf[UNIX_BUFFER_SIZE];
union sock_addr_union addr;
socklen_param_type addr_len;
diff --git a/otherlibs/win32unix/unixsupport.c b/otherlibs/win32unix/unixsupport.c
index c8f3dd23a..90cade2a0 100644
--- a/otherlibs/win32unix/unixsupport.c
+++ b/otherlibs/win32unix/unixsupport.c
@@ -33,9 +33,9 @@ static int win_handle_compare(value v1, value v2)
return h1 == h2 ? 0 : h1 < h2 ? -1 : 1;
}
-static long win_handle_hash(value v)
+static intnat win_handle_hash(value v)
{
- return (long) Handle_val(v);
+ return (intnat) Handle_val(v);
}
static struct custom_operations win_handle_ops = {
@@ -77,7 +77,7 @@ value win_alloc_handle_or_socket(HANDLE h)
/* Mapping of Windows error codes to POSIX error codes */
-struct error_entry { unsigned long win_code; int range; int posix_code; };
+struct error_entry { DWORD win_code; int range; int posix_code; };
static struct error_entry win_error_table[] = {
{ ERROR_INVALID_FUNCTION, 0, EINVAL},
@@ -148,7 +148,7 @@ static struct error_entry win_error_table[] = {
{ 0, -1, 0 }
};
-void win32_maperr(unsigned long errcode)
+void win32_maperr(DWORD errcode)
{
int i;
diff --git a/otherlibs/win32unix/unixsupport.h b/otherlibs/win32unix/unixsupport.h
index 2b1ff71ea..b7d6ed64e 100644
--- a/otherlibs/win32unix/unixsupport.h
+++ b/otherlibs/win32unix/unixsupport.h
@@ -46,7 +46,7 @@ extern value win_alloc_socket(SOCKET);
#define NO_CRT_FD (-1)
#define Nothing ((value) 0)
-extern void win32_maperr(unsigned long errcode);
+extern void win32_maperr(DWORD errcode);
extern void unix_error (int errcode, char * cmdname, value arg);
extern void uerror (char * cmdname, value arg);
extern value unix_freeze_buffer (value);
diff --git a/otherlibs/win32unix/winwait.c b/otherlibs/win32unix/winwait.c
index db3a62dde..0a68076b4 100644
--- a/otherlibs/win32unix/winwait.c
+++ b/otherlibs/win32unix/winwait.c
@@ -28,7 +28,7 @@ static value alloc_process_status(HANDLE pid, int status)
Field(st, 0) = Val_int(status);
Begin_root (st);
res = alloc_small(2, 0);
- Field(res, 0) = Val_long((long) pid);
+ Field(res, 0) = Val_long((intnat) pid);
Field(res, 1) = st;
End_roots();
return res;
diff --git a/otherlibs/win32unix/write.c b/otherlibs/win32unix/write.c
index 862e50791..8c255e11a 100644
--- a/otherlibs/win32unix/write.c
+++ b/otherlibs/win32unix/write.c
@@ -22,7 +22,7 @@
CAMLprim value unix_write(value fd, value buf, value vofs, value vlen)
{
- long ofs, len, written;
+ intnat ofs, len, written;
DWORD numbytes, numwritten;
char iobuf[UNIX_BUFFER_SIZE];
@@ -65,7 +65,7 @@ CAMLprim value unix_write(value fd, value buf, value vofs, value vlen)
CAMLprim value unix_single_write(value fd, value buf, value vofs, value vlen)
{
- long ofs, len, written;
+ intnat ofs, len, written;
DWORD numbytes, numwritten;
char iobuf[UNIX_BUFFER_SIZE];