ocaml-ocamlnet/ocamlnet-3.7.4-fix-int-type...

101 lines
3.6 KiB
Diff

diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_event.c ocamlnet-3.7.4/src/netsys/netsys_c_event.c
--- ocamlnet-3.7.4.old/src/netsys/netsys_c_event.c 2014-05-12 20:00:39.000000000 +0100
+++ ocamlnet-3.7.4/src/netsys/netsys_c_event.c 2014-08-30 18:12:48.443050478 +0100
@@ -142,7 +142,7 @@
case NE_EVENTFD:
{
- int64 buf;
+ int64_t buf;
buf = 1;
if (ne->fd1 >= 0) {
int code;
@@ -391,7 +391,7 @@
{
#ifdef HAVE_POLL
struct not_event *ne;
- int64 n;
+ int64_t n;
char buf[1];
int code, ok, e;
CAMLparam1(nev);
diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_fadvise.c ocamlnet-3.7.4/src/netsys/netsys_c_fadvise.c
--- ocamlnet-3.7.4.old/src/netsys/netsys_c_fadvise.c 2014-05-12 20:00:39.000000000 +0100
+++ ocamlnet-3.7.4/src/netsys/netsys_c_fadvise.c 2014-08-30 18:12:48.446050487 +0100
@@ -23,7 +23,7 @@
CAMLprim value netsys_fadvise(value fd, value start, value len, value adv) {
#ifdef HAVE_POSIX_FADVISE
int adv_int, r;
- int64 start_int, len_int;
+ int64_t start_int, len_int;
off_t start_off, len_off;
/* Att: off_t might be 64 bit even on 32 bit systems! */
@@ -41,9 +41,9 @@
start_int = Int64_val(start);
len_int = Int64_val(len);
- if ( ((int64) ((off_t) start_int)) != start_int )
+ if ( ((int64_t) ((off_t) start_int)) != start_int )
failwith("Netsys.fadvise: large files not supported on this OS");
- if ( ((int64) ((off_t) len_int)) != len_int )
+ if ( ((int64_t) ((off_t) len_int)) != len_int )
failwith("Netsys.fadvise: large files not supported on this OS");
start_off = start_int;
diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_fallocate.c ocamlnet-3.7.4/src/netsys/netsys_c_fallocate.c
--- ocamlnet-3.7.4.old/src/netsys/netsys_c_fallocate.c 2014-05-12 20:00:39.000000000 +0100
+++ ocamlnet-3.7.4/src/netsys/netsys_c_fallocate.c 2014-08-30 18:12:48.442050481 +0100
@@ -20,16 +20,16 @@
CAMLprim value netsys_fallocate(value fd, value start, value len) {
#ifdef HAVE_POSIX_FALLOCATE
int r;
- int64 start_int, len_int;
+ int64_t start_int, len_int;
off_t start_off, len_off;
/* Att: off_t might be 64 bit even on 32 bit systems! */
start_int = Int64_val(start);
len_int = Int64_val(len);
- if ( ((int64) ((off_t) start_int)) != start_int )
+ if ( ((int64_t) ((off_t) start_int)) != start_int )
failwith("Netsys.fadvise: large files not supported on this OS");
- if ( ((int64) ((off_t) len_int)) != len_int )
+ if ( ((int64_t) ((off_t) len_int)) != len_int )
failwith("Netsys.fadvise: large files not supported on this OS");
start_off = start_int;
diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_mem.c ocamlnet-3.7.4/src/netsys/netsys_c_mem.c
--- ocamlnet-3.7.4.old/src/netsys/netsys_c_mem.c 2014-05-12 20:00:39.000000000 +0100
+++ ocamlnet-3.7.4/src/netsys/netsys_c_mem.c 2014-08-30 18:12:48.445050479 +0100
@@ -182,7 +182,7 @@
void *addr, *eff_addr;
intnat size;
uintnat basize;
- int64 pos0;
+ int64_t pos0;
uintnat pagesize, delta;
/* Avoid here seeking at all costs. On some systems, shared memory
@@ -190,7 +190,7 @@
*/
fd = Int_val(fdv);
pos0 = Int64_val(posv);
- if (((int64) ((off_t) pos0)) != pos0)
+ if (((int64_t) ((off_t) pos0)) != pos0)
failwith("Netsys_mem: large files not supported on this OS");
pos = pos0;
addr = (void *) Nativeint_val(addrv);
@@ -913,8 +913,8 @@
caml_id = 'b';
break;
}
- case 'i': /* int32 */
- case 'j': /* int64 */
+ case 'i': /* int32_t */
+ case 'j': /* int64_t */
case 'n': /* nativeint */
if (!enable_customs) {
#ifdef DEBUG