Skip to content

Commit

Permalink
Fix tests/Makfile rule order.
Browse files Browse the repository at this point in the history
Fix g++ 4.7.3 runtime compatibility.
  • Loading branch information
bvaugon committed Jul 3, 2013
1 parent e88d15a commit 5aa799f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion runtime/ocamlcc-byterun-4.00/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ CAMLprim value caml_array_append(value a1, value a2)
{
value arrays[2] = { a1, a2 };
intnat offsets[2] = { 0, 0 };
intnat lengths[2] = { caml_array_length(a1), caml_array_length(a2) };
intnat lengths[2] = { (intnat) caml_array_length(a1), (intnat) caml_array_length(a2) };
return caml_array_gather(2, arrays, offsets, lengths);
}

Expand Down
5 changes: 3 additions & 2 deletions runtime/ocamlcc-byterun-4.00/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ int caml_page_table_initialize(mlsize_t bytesize)
}
caml_page_table.mask = caml_page_table.size - 1;
caml_page_table.occupancy = 0;
caml_page_table.entries = calloc(caml_page_table.size, sizeof(uintnat));
caml_page_table.entries = (uintnat *)
calloc(caml_page_table.size, sizeof(uintnat));
if (caml_page_table.entries == NULL)
return -1;
else
Expand All @@ -112,7 +113,7 @@ static int caml_page_table_resize(void)
caml_gc_message (0x08, "Growing page table to %lu entries\n",
caml_page_table.size);

new_entries = calloc(2 * old.size, sizeof(uintnat));
new_entries = (uintnat *) calloc(2 * old.size, sizeof(uintnat));
if (new_entries == NULL) {
caml_gc_message (0x08, "No room for growing page table\n", 0);
return -1;
Expand Down
12 changes: 6 additions & 6 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,6 @@ floco%-clang: floco%-clang.o check-project

###

%.o: %.c check-project
$(CC) -c $< $(CC_FLAGS)

%: %.o check-project
$(CC) $< -o $@ $(CL_FLAGS)

%-$(ARCH).o: %-$(ARCH).c check-project
$(CC) -c $< $(CC_FLAGS) -fno-omit-frame-pointer

Expand All @@ -268,6 +262,12 @@ floco%-clang: floco%-clang.o check-project
%-clang: %-clang.o check-project
clang $< -o $@ $(CL_FLAGS)

%.o: %.c check-project
$(CC) -c $< $(CC_FLAGS)

%: %.o check-project
$(CC) $< -o $@ $(CL_FLAGS)

###

clean:
Expand Down

0 comments on commit 5aa799f

Please sign in to comment.