Anonymous committed 3a16674

fail.c: declaration des exceptions predefinies.
Makefile: suppression de VPATH.


Comments (0)

Files changed (2)

 COBJS=main.o fail.o roots.o signals.o \
   misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o \
   floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o \
 	ar rc libasmrund.a $(DOBJS)
 	$(RANLIB) libasmrund.a
+misc.c: ../byterun/misc.c
+	ln -s ../byterun/misc.c misc.c
+freelist.c: ../byterun/freelist.c
+	ln -s ../byterun/freelist.c freelist.c
+major_gc.c: ../byterun/major_gc.c
+	ln -s ../byterun/major_gc.c major_gc.c
+minor_gc.c: ../byterun/minor_gc.c
+	ln -s ../byterun/minor_gc.c minor_gc.c
+memory.c: ../byterun/memory.c
+	ln -s ../byterun/memory.c memory.c
+alloc.c: ../byterun/alloc.c
+	ln -s ../byterun/alloc.c alloc.c
+compare.c: ../byterun/compare.c
+	ln -s ../byterun/compare.c compare.c
+ints.c: ../byterun/ints.c
+	ln -s ../byterun/ints.c ints.c
+floats.c: ../byterun/floats.c
+	ln -s ../byterun/floats.c floats.c
+str.c: ../byterun/str.c
+	ln -s ../byterun/str.c str.c
+array.c: ../byterun/array.c
+	ln -s ../byterun/array.c array.c
+io.c: ../byterun/io.c
+	ln -s ../byterun/io.c io.c
+extern.c: ../byterun/extern.c
+	ln -s ../byterun/extern.c extern.c
+intern.c: ../byterun/intern.c
+	ln -s ../byterun/intern.c intern.c
+hash.c: ../byterun/hash.c
+	ln -s ../byterun/hash.c hash.c
+sys.c: ../byterun/sys.c
+	ln -s ../byterun/sys.c sys.c
+parsing.c: ../byterun/parsing.c
+	ln -s ../byterun/parsing.c parsing.c
+gc_ctrl.c: ../byterun/gc_ctrl.c
+	ln -s ../byterun/gc_ctrl.c gc_ctrl.c
+terminfo.c: ../byterun/terminfo.c
+	ln -s ../byterun/terminfo.c terminfo.c
+crc.c: ../byterun/crc.c
+	ln -s ../byterun/crc.c crc.c
+obj.c: ../byterun/obj.c
+	ln -s ../byterun/obj.c obj.c
 .SUFFIXES: .asm .d.o
 /* The globals holding predefined exceptions */
-extern int Out_of_memory, Sys_error, Failure, Invalid_argument;
-extern int End_of_file, Division_by_zero, Not_found, Match_failure;
+typedef char caml_generated_constant[256];
+/* We claim these constants are big so that e.g. the Mips compiler
+   will not assume that they are in the .sdata section */
+extern caml_generated_constant Out_of_memory, Sys_error, Failure,
+  Invalid_argument, End_of_file, Division_by_zero, Not_found, Match_failure;
 /* Exception raising */
 void failwith (msg)
      char * msg;
-  raise_with_string((value) &Failure, msg);
+  raise_with_string((value) Failure, msg);
 void invalid_argument (msg)
      char * msg;
-  raise_with_string((value) &Invalid_argument, msg);
+  raise_with_string((value) Invalid_argument, msg);
 /* To raise Out_of_memory, we can't use raise_constant,
 void raise_out_of_memory()
   out_of_memory_bucket.hdr = Make_header(1, 0, White);
-  out_of_memory_bucket.exn = (value) &Out_of_memory;
+  out_of_memory_bucket.exn = (value) Out_of_memory;
   mlraise((value) &(out_of_memory_bucket.exn));
 void raise_sys_error(msg)
      value msg;
-  raise_with_arg((value) &Sys_error, msg);
+  raise_with_arg((value) Sys_error, msg);
 void raise_end_of_file()
-  raise_constant((value) &End_of_file);
+  raise_constant((value) End_of_file);
 void raise_zero_divide()
-  raise_constant((value) &Division_by_zero);
+  raise_constant((value) Division_by_zero);
 void raise_not_found()
-  raise_constant((value) &Not_found);
+  raise_constant((value) Not_found);