summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1997-07-30 12:28:31 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1997-07-30 12:28:31 +0000
commitd7f93706ae462b9f27de36d80805fcca11a61692 (patch)
tree747fc1cc7907f9cb7bd1483409e0997b30cf075d
parent2f183944fe0c296ee7671cd99dfe0562d244b3fa (diff)
Nettoyage des types de code_checksum
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/extern.c2
-rw-r--r--byterun/fix_code.c2
-rw-r--r--byterun/fix_code.h2
-rw-r--r--byterun/intern.c9
-rw-r--r--byterun/intext.h4
5 files changed, 11 insertions, 8 deletions
diff --git a/byterun/extern.c b/byterun/extern.c
index 12530c1c3..6d85299d6 100644
--- a/byterun/extern.c
+++ b/byterun/extern.c
@@ -346,7 +346,7 @@ static void extern_rec(v)
if (!extern_closures)
extern_invalid_argument("output_value: functional value");
writecode32(CODE_CODEPOINTER, (char *) v - code_area_start);
- writeblock(code_checksum(), 16);
+ writeblock((char *) code_checksum(), 16);
return;
}
extern_invalid_argument("output_value: abstract value");
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index a68cb2f93..538d75b84 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -29,7 +29,7 @@
code_t start_code;
asize_t code_size;
unsigned char * saved_code;
-char code_md5[16];
+unsigned char code_md5[16];
/* Read the main bytecode block from a file */
diff --git a/byterun/fix_code.h b/byterun/fix_code.h
index 8027f0e4f..62131815a 100644
--- a/byterun/fix_code.h
+++ b/byterun/fix_code.h
@@ -24,7 +24,7 @@
extern code_t start_code;
extern asize_t code_size;
extern unsigned char * saved_code;
-extern char code_md5[16];
+extern unsigned char code_md5[16];
void load_code P((int fd, asize_t len));
void fixup_endianness P((code_t code, asize_t len));
diff --git a/byterun/intern.c b/byterun/intern.c
index 15064ce81..b53313044 100644
--- a/byterun/intern.c
+++ b/byterun/intern.c
@@ -344,9 +344,9 @@ value marshal_data_size(buff, ofs) /* ML */
#include "md5.h"
-char * code_checksum()
+unsigned char * code_checksum()
{
- static char checksum[16];
+ static unsigned char checksum[16];
static int checksum_computed = 0;
if (! checksum_computed) {
@@ -365,9 +365,12 @@ char * code_checksum()
#include "fix_code.h"
-char * code_checksum()
+unsigned char * code_checksum()
{
return code_md5;
}
#endif
+
+
+
diff --git a/byterun/intext.h b/byterun/intext.h
index 9fc88d348..9fa67cac2 100644
--- a/byterun/intext.h
+++ b/byterun/intext.h
@@ -75,7 +75,7 @@
any value below 2^N - (2^N / (2 * sizeof(value))) suffices.
We just take 2^(N-1) for simplicity. */
-#define INITIAL_OFFSET_MAX (1L << (8 * sizeof(value) - 1))
+#define INITIAL_OFFSET_MAX (1UL << (8 * sizeof(value) - 1))
/* The entry points */
@@ -84,7 +84,7 @@ value input_value P((struct channel * chan));
value input_value_from_string P((value str, value ofs));
/* Auxiliary stuff for sending code pointers */
-char * code_checksum P((void));
+unsigned char * code_checksum P((void));
#ifndef NATIVE_CODE
#include "fix_code.h"