1. HongboZhang
  2. ocaml

Commits

xleroy  committed 4ae83c1

Nettoyage code pour architectures big endian.
Qques trucs exportes en plus pour la lib Unix.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits 48b6c97
  • Branches master

Comments (0)

Files changed (8)

File byterun/Makefile

View file
  • Ignore whitespace
 
 install:
 	cp camlrun $(BINDIR)/cslrun
+	rm -f $(LIBDIR)/libcamlrun.a
 	ar rc $(LIBDIR)/libcamlrun.a $(OBJS)
-	$(RANLIB) $(LIBDIR)/libcamlrun.a
+	cd $(LIBDIR); $(RANLIB) libcamlrun.a
 	test -d $(LIBDIR)/caml || mkdir $(LIBDIR)/caml
 	cp mlvalues.h alloc.h misc.h $(LIBDIR)/caml
 	sed -e '/#include ".*\/m.h/r ../config/m.h' \

File byterun/config.h

View file
  • Ignore whitespace
 #define THREADED_CODE
 #endif
 
+/* Signed char type */
+
+#if defined(__STDC__) || defined(SIGNED_CHAR_WORKS)
+typedef signed char schar;
+#else
+typedef char schar;
+#endif
+
 /* Do not change this definition. */
 #define Page_size (1 << Page_log)
 

File byterun/fail.c

View file
  • Ignore whitespace
 struct longjmp_buffer * external_raise;
 value exn_bucket;
 
-static void mlraise P((value)) Noreturn;
-
-static void mlraise(v)
+void mlraise(v)
      value v;
 {
   leave_blocking_section();

File byterun/fail.h

View file
  • Ignore whitespace
 extern struct longjmp_buffer * external_raise;
 extern value exn_bucket;
 
+void mlraise P((value bucket)) Noreturn;
 void raise_constant P((value tag)) Noreturn;
 void raise_with_arg P((value tag, value arg)) Noreturn;
 void raise_with_string P((value tag, char * msg)) Noreturn;

File byterun/interp.c

View file
  • Ignore whitespace
         if (signal_number) {
           /* Push a return frame to the current code location */
           sp -= 4;
-          sp[0] = (value) pc;
-          sp[1] = env;
-          sp[2] = Val_long(extra_args);
-          sp[3] = Val_int(signal_number);
+          sp[0] = Val_int(signal_number);
+          sp[1] = (value) pc;
+          sp[2] = env;
+          sp[3] = Val_long(extra_args);
           pc = Code_val(Field(signal_handlers, signal_number));
           env = Env_val(Field(signal_handlers, signal_number));
           extra_args = 0;

File byterun/main.c

View file
  • Ignore whitespace
 #include "alloc.h"
 #include "exec.h"
 #include "fail.h"
+#include "fix_code.h"
 #include "gc_ctrl.h"
 #include "interp.h"
 #include "intext.h"

File byterun/meta.c

View file
  • Ignore whitespace
 /* Primitives for the toplevel */
 
 #include "alloc.h"
+#include "fix_code.h"
 #include "interp.h"
 #include "major_gc.h"
 #include "memory.h"

File byterun/signals.c

View file
  • Ignore whitespace
 #define SIGTTOU 0
 #endif
 
-static int posix_signals[] = {
+int posix_signals[] = {
   SIGABRT, SIGALRM, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE,
   SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT,
   SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU