Commits

camlspotter committed 3437b12

svn rev 11094 3.12.1+rc1 from svn (not from tarball)

Comments (0)

Files changed (83)

 Objective Caml 3.12.1:
 ----------------------
 
-- Changed default minor heap size from 32k to 256k words.
-
 Bug fixes:
 - PR#4345, PR#4767: problems with camlp4 printing of float values
 - PR#4380: ocamlbuild should not use tput on windows
+- PR#4487, PR#5164: multiple 'module type of' are incompatible
 - PR#4552: ocamlbuild does not create symlinks when using '.itarget' file
 - PR#4673, PR#5144: camlp4 fails on object copy syntax
+- PR#4702: system threads: cleanup tick thread at exit
+- PR#4732: camlp4 rejects polymorphic variants using keywords from macros
+- PR#4778: Win32/MSVC port: rare syntax error in generated MASM assembly file
 - PR#4794, PR#4959: call annotations not generated by ocamlopt
 - PR#4820: revised syntax pretty printer crashes with 'Stack_overflow'
 - PR#4928: wrong printing of classes and class types by camlp4
+- PR#4939: camlp4 rejects patterns of the '?x:_' form
 - PR#4967: ocamlbuild passes wrong switches to ocamldep through menhir
 - PR#4972: mkcamlp4 does not include 'dynlink.cma'
 - PR#5039: ocamlbuild should use '-linkpkg' only when linking programs
+- PR#5066: ocamldoc: add -charset option used in html generator
+- PR#5069: fcntl() in caml_sys_open may block, do it within blocking section
 - PR#5071, PR#5129, PR#5134: inconsistencies between camlp4 and camlp4* binaries
 - PR#5080, PR#5104: regression in type constructor handling by camlp4
+- PR#5090: bad interaction between toplevel and camlp4
 - PR#5095: ocamlbuild ignores some tags when building bytecode objects
 - PR#5100: ocamlbuild always rebuilds a 'cmxs' file
 - PR#5103: build and install objinfo when building with ocamlbuild
+- PR#5109: crash when a parser calls a lexer that calls another parser
 - PR#5110: invalid module name when using optional argument
+- PR#5115: bytecode executables produced by msvc64 port crash on 32-bit versions
+- PR#5117: bigarray: wrong function name without HAS_MMAP; missing include
 - PR#5118: Camlp4o and integer literals
+- PR#5122: camlp4 rejects lowercase identifiers for module types
+- PR#5123: shift_right_big_int returns a wrong zero
+- PR#5124: substitution inside a signature leads to odd printing
 - PR#5128: typo in 'Camlp4ListComprehension' syntax extension
+- PR#5136: obsolete function used in emacs mode
+- PR#5145: ocamldoc: missing html escapes
+- PR#5146: problem with spaces in multi-line string constants
+- PR#5149: (partial) various documentation problems
+- PR#5156: rare compiler crash with objects
 - PR#5165: ocamlbuild does not pass '-thread' option to ocamlfind
 - PR#5167: camlp4r loops when printing package type
 - PR#5172: camlp4 support for 'module type of' construct
+- PR#5175: in bigarray accesses, make sure bigarray expr is evaluated only once
 - PR#5177: Gc.compact implies Gc.full_major
+- PR#5182: use bytecode version of ocamldoc to generate man pages
+- PR#5184: under Windows, alignment issue with bigarrays mapped from files
+- PR#5188: double-free corruption in bytecode system threads
+- PR#5192: mismatch between words and bytes in interpreting max_young_wosize
+- PR#5202: error in documentation of atan2
 - PR#5209: natdynlink incorrectly detected on BSD systems
 - PR#5213: ocamlbuild should pass '-rectypes' to ocamldoc when needed
 - PR#5217: ocamlfind plugin should add '-linkpkg' for toplevel
+- PR#5228: document the exceptions raised by functions in 'Filename'
+- PR#5229: typo in build script ('TAG_LINE' vs 'TAGLINE')
+- PR#5230: error in documentation of Scanf.Scanning.open_in
+- PR#5234: option -shared reverses order of -cclib options
 - PR#5237: incorrect .size directives generated for x86-32 and x86-64
+- PR#5244: String.compare uses polymorphic compare_val (regression of PR#4194)
+- PR#5248: regression introduced while fixing PR#5118
+- PR#5252: typo in docs
+- PR#5258: win32unix: unix fd leak under windows
+- PR#5269: (tentative fix) Wrong ext_ref entries in .annot files
+- PR#5272: caml.el doesn't recognize downto as a keyword
+- PR#5276: issue with ocamlc -pack and recursively-packed modules
+- PR#5280: alignment constraints incorrectly autodetected on MIPS 32
+- PR#5281: typo in error message
+- camlp4 revised syntax printing bug in the toplevel (reported on caml-list)
+- configure: do not define _WIN32 under cygwin
+- Hardened generic comparison in the case where two custom blocks
+  are compared and have different sets of custom operations.
+- Hardened comparison between bigarrays in the case where the two
+  bigarrays have different kinds.
+- Fixed wrong autodetection of expm1() and log1p().
+- don't add .exe suffix when installing the ocamlmktop shell script
+- ocamldoc: minor fixes related to the display of ocamldoc options
+- fixed bug with huge values in OCAMLRUNPARAM
+- mismatch between declaration and definition of caml_major_collection_slice
 
 Feature wishes:
 - PR#4992: added '-ml-synonym' and '-mli-synonym' options to ocamldep
 - PR#5139: added possibility to add options to ocamlbuild
 - PR#5158: added access to current camlp4 parsers and printers
 - PR#5180: improved instruction selection for float operations on amd64
-
+- stdlib: added a 'usage_string' function to Arg
+- allow with constraints to add a type equation to a datatype definition
+- ocamldoc: allow to merge '@before' tags like other ones
+- ocamlbuild: allow dependency on file "_oasis"
+
+Other changes:
+- Changed default minor heap size from 32k to 256k words.
+- Added new operation 'compare_ext' to custom blocks, called when
+  comparing a custom block value with an unboxed integer.
 
 Objective Caml 3.12.0:
 ----------------------
 
 * First public release.
 
-$Id: Changes 10980 2011-03-13 13:33:17Z xleroy $
+$Id: Changes 11083 2011-06-11 07:24:12Z xleroy $
 and "the Compiler" refers to all files marked "Copyright INRIA" in the
 following directories and their sub-directories:
 
-  asmcomp, boot, bytecomp, debugger, driver, lex, ocamldoc, parsing,
-  tools, toplevel, typing, utils, yacc
+  asmcomp, boot, build, bytecomp, debugger, driver, lex, man,
+  ocamlbuild, ocamldoc, parsing, testsuite, tools, toplevel, typing,
+  utils, yacc
 
 The Compiler is distributed under the terms of the Q Public License
 version 1.0 with a change to choice of law (included below).
 
 Tier 1 (actively used and maintained by the core Caml team):
 
-    AMD64 (Opteron)    Linux
+    AMD64 (Opteron)    Linux, MacOS X, MS Windows
     IA32 (Pentium)     Linux, FreeBSD, MacOS X, MS Windows
     PowerPC            MacOS X
 
 
 
 ----
-$Id: README 9547 2010-01-22 12:48:24Z doligez $
+$Id: README 11017 2011-04-29 09:10:12Z doligez $
-3.12.1+dev6 (2011-03-06)
+3.12.1+rc1
 
 # The version string is the first line of this file.
 # It must be in the format described in stdlib/sys.mli
 
-# $Id: VERSION 10973 2011-03-06 16:17:46Z weis $
+# $Id: VERSION 11094 2011-06-15 11:01:14Z doligez $

asmcomp/asmlink.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: asmlink.ml 10424 2010-05-19 11:29:38Z xleroy $ *)
+(* $Id: asmlink.ml 11049 2011-05-17 14:14:38Z doligez $ *)
 
 (* Link a set of .cmx/.o files and produce an executable *)
 
   Clflags.ccobjs := !Clflags.ccobjs @ !lib_ccobjs;
   Clflags.ccopts := !lib_ccopts @ !Clflags.ccopts;
   let objfiles = List.rev (List.map object_file_name objfiles) @
-    !Clflags.ccobjs in
+    (List.rev !Clflags.ccobjs) in
 
   let startup =
     if !Clflags.keep_startup_file

asmcomp/i386/emit_nt.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit_nt.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: emit_nt.mlp 11067 2011-06-04 15:21:43Z xleroy $ *)
 
 (* Emission of Intel 386 assembly code, MASM syntax. *)
 
       add_def_symbol s ;
       `{emit_symbol s} LABEL DWORD\n`
   | Cdefine_label lbl ->
-      `{emit_label (100000 + lbl)} `
+      `{emit_label (100000 + lbl)}	LABEL DWORD\n`
   | Cint8 n ->
       `	BYTE	{emit_int n}\n`
   | Cint16 n ->

Binary file modified.

Binary file modified.

Binary file modified.

build/camlp4-byte-only.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: camlp4-byte-only.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: camlp4-byte-only.sh 11041 2011-05-13 08:40:05Z doligez $
 
 set -e
 cd `dirname $0`/..

build/camlp4-mkCamlp4Ast.sh

 #!/bin/sh
-# $Id$
+# $Id: camlp4-mkCamlp4Ast.sh 11040 2011-05-13 08:37:04Z doligez $
 set -e
 cd `dirname $0`/..
 

build/camlp4-native-only.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: camlp4-native-only.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: camlp4-native-only.sh 11041 2011-05-13 08:40:05Z doligez $
 
 set -e
 cd `dirname $0`/..

build/fastworld.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: fastworld.sh 10856 2010-11-25 13:57:43Z xclerc $
+# $Id: fastworld.sh 11041 2011-05-13 08:40:05Z doligez $
 
 cd `dirname $0`
 set -e

build/ocamlbuild-byte-only.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: ocamlbuild-byte-only.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: ocamlbuild-byte-only.sh 11041 2011-05-13 08:40:05Z doligez $
 
 set -e
 cd `dirname $0`/..

build/ocamlbuild-native-only.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: ocamlbuild-native-only.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: ocamlbuild-native-only.sh 11041 2011-05-13 08:40:05Z doligez $
 
 set -e
 cd `dirname $0`/..

build/ocamlbuildlib-native-only.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: ocamlbuildlib-native-only.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: ocamlbuildlib-native-only.sh 11041 2011-05-13 08:40:05Z doligez $
 
 set -e
 cd `dirname $0`/..

build/otherlibs-targets.sh

 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 
-# $Id: otherlibs-targets.sh 10443 2010-05-20 09:44:25Z doligez $
+# $Id: otherlibs-targets.sh 11041 2011-05-13 08:40:05Z doligez $
 
 OTHERLIBS_BYTE=""
 OTHERLIBS_NATIVE=""
 #                                                                       #
 #   Copyright 2008 Institut National de Recherche en Informatique et    #
 #   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
+#   under the terms of the Q Public License version 1.0.                #
 #                                                                       #
 #########################################################################
 

bytecomp/bytepackager.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: bytepackager.ml 10450 2010-05-21 12:00:49Z doligez $ *)
+(* $Id: bytepackager.ml 11083 2011-06-11 07:24:12Z xleroy $ *)
 
 (* "Package" a set of .cmo files into one .cmo file having the
    original compilation units as sub-modules. *)
    SETGLOBAL relocations that correspond to one of the units being
    consolidated. *)
 
-let rename_relocation objfile mapping defined base (rel, ofs) =
+let rename_relocation packagename objfile mapping defined base (rel, ofs) =
   let rel' =
     match rel with
       Reloc_getglobal id ->
           then Reloc_getglobal id'
           else raise(Error(Forward_reference(objfile, id)))
         with Not_found ->
-          rel
+          (* PR#5276: unique-ize dotted global names, which appear
+             if one of the units being consolidated is itself a packed
+             module. *)
+          let name = Ident.name id in
+          if String.contains name '.' then
+            Reloc_getglobal (Ident.create_persistent (packagename ^ "." ^ name))
+          else
+            rel
         end
     | Reloc_setglobal id ->
         begin try
           then raise(Error(Multiple_definition(objfile, id)))
           else Reloc_setglobal id'
         with Not_found ->
-          rel
+          (* PR#5276, as above *)
+          let name = Ident.name id in
+          if String.contains name '.' then
+	    Reloc_setglobal (Ident.create_persistent (packagename ^ "." ^ name))
+          else
+            rel
         end
     | _ ->
         rel in
    Accumulate relocs, debug info, etc.
    Return size of bytecode. *)
 
-let rename_append_bytecode oc mapping defined ofs prefix subst objfile compunit =
+let rename_append_bytecode packagename oc mapping defined ofs prefix subst objfile compunit =
   let ic = open_in_bin objfile in
   try
     Bytelink.check_consistency objfile compunit;
     List.iter
-      (rename_relocation objfile mapping defined ofs)
+      (rename_relocation packagename objfile mapping defined ofs)
       compunit.cu_reloc;
     primitives := compunit.cu_primitives @ !primitives;
     if compunit.cu_force_link then force_link := true;
 (* Same, for a list of .cmo and .cmi files.
    Return total size of bytecode. *)
 
-let rec rename_append_bytecode_list oc mapping defined ofs prefix subst = function
+let rec rename_append_bytecode_list packagename oc mapping defined ofs prefix subst = function
     [] ->
       ofs
   | m :: rem ->
       match m.pm_kind with
       | PM_intf ->
-          rename_append_bytecode_list oc mapping defined ofs prefix subst rem
+          rename_append_bytecode_list packagename oc mapping defined ofs prefix subst rem
       | PM_impl compunit ->
           let size =
-            rename_append_bytecode oc mapping defined ofs prefix subst
+            rename_append_bytecode packagename oc mapping defined ofs prefix subst
                                    m.pm_file compunit in
           let id = Ident.create_persistent m.pm_name in
           let root = Path.Pident (Ident.create_persistent prefix) in
-          rename_append_bytecode_list
+          rename_append_bytecode_list packagename
             oc mapping (id :: defined)
             (ofs + size) prefix (Subst.add_module id (Path.Pdot (root, Ident.name id, Path.nopos)) subst) rem
 
     let pos_depl = pos_out oc in
     output_binary_int oc 0;
     let pos_code = pos_out oc in
-    let ofs = rename_append_bytecode_list oc mapping [] 0 targetname Subst.identity members in
+    let ofs = rename_append_bytecode_list targetname oc mapping [] 0 targetname Subst.identity members in
     build_global_target oc targetname members mapping ofs coercion;
     let pos_debug = pos_out oc in
     if !Clflags.debug && !events <> [] then

byterun/compare.c

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: compare.c 8768 2008-01-11 16:13:18Z doligez $ */
+/* $Id: compare.c 11037 2011-05-12 14:34:05Z xleroy $ */
 
 #include <string.h>
 #include <stdlib.h>
       if (Is_long(v2))
         return Long_val(v1) - Long_val(v2);
       /* Subtraction above cannot overflow and cannot result in UNORDERED */
-      if (Is_in_value_area(v2) &&
-          Tag_val(v2) == Forward_tag) {
-        v2 = Forward_val(v2);
-        continue;
+      if (Is_in_value_area(v2)) {
+        switch (Tag_val(v2)) {
+        case Forward_tag: 
+          v2 = Forward_val(v2);
+          continue;
+        case Custom_tag: {
+          int res;
+          int (*compare)(value v1, value v2) = Custom_ops_val(v2)->compare_ext;
+          if (compare == NULL) break;  /* for backward compatibility */
+          caml_compare_unordered = 0;
+          res = compare(v1, v2);
+          if (caml_compare_unordered && !total) return UNORDERED;
+          if (res != 0) return res;
+          goto next_item;
+        }
+        default: /*fallthrough*/;
+        }
       }
       return LESS;                /* v1 long < v2 block */
     }
     if (Is_long(v2)) {
-      if (Is_in_value_area(v1) &&
-          Tag_val(v1) == Forward_tag) {
-        v1 = Forward_val(v1);
-        continue;
+      if (Is_in_value_area(v1)) {
+        switch (Tag_val(v1)) {
+        case Forward_tag:
+          v1 = Forward_val(v1);
+          continue;
+        case Custom_tag: {
+          int res;
+          int (*compare)(value v1, value v2) = Custom_ops_val(v1)->compare_ext;
+          if (compare == NULL) break;  /* for backward compatibility */
+          caml_compare_unordered = 0;
+          res = compare(v1, v2);
+          if (caml_compare_unordered && !total) return UNORDERED;
+          if (res != 0) return res;
+          goto next_item;
+        }
+        default: /*fallthrough*/;
+        }
       }
       return GREATER;            /* v1 block > v2 long */
     }
     if (t1 != t2) return (intnat)t1 - (intnat)t2;
     switch(t1) {
     case String_tag: {
-      mlsize_t len1, len2, len;
-      unsigned char * p1, * p2;
+      mlsize_t len1, len2;
+      int res;
       if (v1 == v2) break;
       len1 = caml_string_length(v1);
       len2 = caml_string_length(v2);
-      for (len = (len1 <= len2 ? len1 : len2),
-             p1 = (unsigned char *) String_val(v1),
-             p2 = (unsigned char *) String_val(v2);
-           len > 0;
-           len--, p1++, p2++)
-        if (*p1 != *p2) return (intnat)*p1 - (intnat)*p2;
+      res = memcmp(String_val(v1), String_val(v2), len1 <= len2 ? len1 : len2);
+      if (res < 0) return LESS;
+      if (res > 0) return GREATER;
       if (len1 != len2) return len1 - len2;
       break;
     }
     case Custom_tag: {
       int res;
       int (*compare)(value v1, value v2) = Custom_ops_val(v1)->compare;
+      /* Hardening against comparisons between different types */
+      if (compare != Custom_ops_val(v2)->compare) {
+        return strcmp(Custom_ops_val(v1)->identifier,
+                      Custom_ops_val(v2)->identifier) < 0
+               ? LESS : GREATER;
+      }
       if (compare == NULL) {
         compare_free_stack();
         caml_invalid_argument("equal: abstract value");
       }
       caml_compare_unordered = 0;
-      res = Custom_ops_val(v1)->compare(v1, v2);
+      res = compare(v1, v2);
       if (caml_compare_unordered && !total) return UNORDERED;
       if (res != 0) return res;
       break;
 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: custom.h 9547 2010-01-22 12:48:24Z doligez $ */
+/* $Id: custom.h 11037 2011-05-12 14:34:05Z xleroy $ */
 
 #ifndef CAML_CUSTOM_H
 #define CAML_CUSTOM_H
                     /*out*/ uintnat * wsize_32 /*size in bytes*/,
                     /*out*/ uintnat * wsize_64 /*size in bytes*/);
   uintnat (*deserialize)(void * dst);
+  int (*compare_ext)(value v1, value v2);
 };
 
 #define custom_finalize_default NULL
 #define custom_hash_default NULL
 #define custom_serialize_default NULL
 #define custom_deserialize_default NULL
+#define custom_compare_ext_default NULL
 
 #define Custom_ops_val(v) (*((struct custom_operations **) (v)))
 
 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: ints.c 10792 2010-11-11 10:54:01Z xleroy $ */
+/* $Id: ints.c 11037 2011-05-12 14:34:05Z xleroy $ */
 
 #include <stdio.h>
 #include <string.h>
 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: sys.c 7944 2007-03-01 13:37:39Z xleroy $ */
+/* $Id: sys.c 11038 2011-05-12 15:12:14Z xleroy $ */
 
 /* Basic system calls */
 
   /* open on a named FIFO can block (PR#1533) */
   caml_enter_blocking_section();
   fd = open(p, flags, perm);
+  /* fcntl on a fd can block (PR#5069)*/
+#if defined(F_SETFD) && defined(FD_CLOEXEC)
+  if (fd != -1)
+    fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
   caml_leave_blocking_section();
   caml_stat_free(p);
   if (fd == -1) caml_sys_error(path);
-#if defined(F_SETFD) && defined(FD_CLOEXEC)
-  fcntl(fd, F_SETFD, FD_CLOEXEC);
-#endif
   CAMLreturn(Val_long(fd));
 }
 

camlp4/Camlp4/Struct/Grammar/Dynamic.ml

  *)
 module Make (Lexer : Sig.Lexer)
 : Sig.Grammar.Dynamic with module Loc = Lexer.Loc
-                       and module Token = Lexer.Token
-                       and type   token_info = (Structure.MakeTokenInfo Lexer.Loc).t
+                         and module Token = Lexer.Token
 = struct
   module Structure = Structure.Make Lexer;
   module Delete    = Delete.Make    Structure;

camlp4/Camlp4/Struct/Grammar/Static.ml

 
 module Make (Lexer : Sig.Lexer)
 : Sig.Grammar.Static with module Loc = Lexer.Loc
-                      and module Token = Lexer.Token
-                      and type   token_info = (Structure.MakeTokenInfo Lexer.Loc).t
+                        and module Token = Lexer.Token
 = struct
   module Structure = Structure.Make Lexer;
   module Delete = Delete.Make Structure;

camlp4/Camlp4/Struct/Grammar/Structure.ml

 
 open Sig.Grammar;
 
-type token_abs_info 'loc =
-  { prev_loc : 'loc
-  ; cur_loc : 'loc
-  ; prev_loc_only : bool
-  };
-
-module MakeTokenInfo (Loc : Sig.Type) = struct
-  type t = token_abs_info Loc.t;
-end;
-
 module type S = sig
   module Loc          : Sig.Loc;
   module Token        : Sig.Token with module Loc = Loc;
       warning_verbose : ref bool;
       error_verbose   : ref bool };
 
-  type token_info = (MakeTokenInfo Loc).t;
+  type token_info = { prev_loc : Loc.t
+                    ; cur_loc : Loc.t
+                    ; prev_loc_only : bool
+                    };
 
   type token_stream = Stream.t (Token.t * token_info);
 
       warning_verbose : ref bool;
       error_verbose   : ref bool };
 
-  type token_info = (MakeTokenInfo Loc).t;
+  type token_info = { prev_loc : Loc.t
+                    ; cur_loc : Loc.t
+                    ; prev_loc_only : bool
+                    };
 
   type token_stream = Stream.t (Token.t * token_info);
 

camlp4/Camlp4/Struct/Grammar/Tools.ml

 (* PR#5090: don't do lookahead on get_prev_loc. *)
 value get_prev_loc_only = ref False;
 
-open Structure;
-
-module Make (GramStruct : Structure.S) = struct
-  open GramStruct;
+module Make (Structure : Structure.S) = struct
+  open Structure;
 
   value empty_entry ename _ =
     raise (Stream.Error ("entry [" ^ ename ^ "] is empty"));

camlp4/Camlp4Parsers/Camlp4MacroParser.ml

     uident:
       [ [ i = UIDENT -> i ] ]
     ;
+    (* dirty hack to allow polymorphic variants using the introduced keywords. *)
+    expr: BEFORE "simple"
+      [ [ "`"; kwd = [ "IFDEF" | "IFNDEF" | "THEN" | "ELSE" | "END" | "ENDIF"
+                     | "DEFINE" | "IN" ] -> <:expr< `$uid:kwd$ >>
+        | "`"; s = a_ident -> <:expr< ` $s$ >> ] ]
+    ;
+    (* idem *)
+    patt: BEFORE "simple"
+      [ [ "`"; kwd = [ "IFDEF" | "IFNDEF" | "THEN" | "ELSE" | "END" | "ENDIF" ] ->
+            <:patt< `$uid:kwd$ >>
+        | "`"; s = a_ident -> <:patt< ` $s$ >> ] ]
+    ;
   END;
 
   Options.add "-D" (Arg.String parse_def)

camlp4/Camlp4Parsers/Camlp4OCamlParser.ml

       [ Some (KEYWORD ("."|"("),_) -> raise Stream.Failure
       | _ -> () ]);
 
+  (* horrible hacks to be able to parse class_types *)
+
+  value test_ctyp_minusgreater =
+    Gram.Entry.of_parser "test_ctyp_minusgreater"
+      (fun strm ->
+        let rec skip_simple_ctyp n =
+          match stream_peek_nth n strm with
+          [ Some (KEYWORD "->") -> n
+          | Some (KEYWORD ("[" | "[<")) ->
+              skip_simple_ctyp (ignore_upto "]" (n + 1) + 1)
+          | Some (KEYWORD "(") -> skip_simple_ctyp (ignore_upto ")" (n + 1) + 1)
+          | Some
+              (KEYWORD
+                ("as" | "'" | ":" | "*" | "." | "#" | "<" | ">" | ".." | ";" |
+                "_" | "?")) ->
+              skip_simple_ctyp (n + 1)
+          | Some (LIDENT _ | UIDENT _) ->
+              skip_simple_ctyp (n + 1)
+          | Some _ | None -> raise Stream.Failure ]
+        and ignore_upto end_kwd n =
+          match stream_peek_nth n strm with
+          [ Some (KEYWORD prm) when prm = end_kwd -> n
+          | Some (KEYWORD ("[" | "[<")) ->
+              ignore_upto end_kwd (ignore_upto "]" (n + 1) + 1)
+          | Some (KEYWORD "(") -> ignore_upto end_kwd (ignore_upto ")" (n + 1) + 1)
+          | Some _ -> ignore_upto end_kwd (n + 1)
+          | None -> raise Stream.Failure ]
+        in
+        match Stream.peek strm with
+        [ Some ((KEYWORD "[" | LIDENT _ | UIDENT _), _) -> skip_simple_ctyp 1
+        | Some (KEYWORD "object", _) -> raise Stream.Failure
+        | _ -> 1 ])
+  ;
+
+  value lident_colon =	 
+     Gram.Entry.of_parser "lident_colon"	 
+       (fun strm ->	 
+         match Stream.npeek 2 strm with	 
+         [ [(LIDENT i, _); (KEYWORD ":", _)] ->	 
+             do { Stream.junk strm; Stream.junk strm; i }	 
+         | _ -> raise Stream.Failure ])	 
+   ;
+
   value rec is_ident_constr_call =
     fun
     [ <:ident< $uid:_$ >> -> True
         | t = ctyp -> t ] ]
     ;
     class_type_plus:
-      [ [ i = TRY [i = a_LIDENT; ":" -> i]; t = ctyp LEVEL "star"; "->"; ct = SELF ->
+      [ [ i = lident_colon; t = ctyp LEVEL "star"; "->"; ct = SELF ->
             <:class_type< [ ~ $i$ : $t$ ] -> $ct$ >>
         | "?"; i = a_LIDENT; ":"; t = ctyp LEVEL "star"; "->"; ct = SELF ->
             <:class_type< [ ? $i$ : $t$ ] -> $ct$ >>
         | i = OPTLABEL (* FIXME inline a_OPTLABEL *); t = ctyp LEVEL "star"; "->"; ct = SELF ->
             <:class_type< [ ? $i$ : $t$ ] -> $ct$ >>
-        | t = TRY [t = ctyp LEVEL "star"; "->" -> t]; ct = SELF ->
+        | test_ctyp_minusgreater; t = ctyp LEVEL "star"; "->"; ct = SELF ->
             <:class_type< [ $t$ ] -> $ct$ >>
-        | ct = TRY class_type -> ct ] ]
+        | ct = class_type -> ct ] ]
     ;
     class_type_longident_and_param:
       [ [ "["; t = comma_ctyp; "]"; i = class_type_longident ->
             <:patt< ~ $i$ : ($lid:i$ : $t$) >>
         | i = a_OPTLABEL; j = a_LIDENT -> (* ?a:b <> ?a : b *)
             <:patt< ? $i$ : ($lid:j$) >>
+        | i = a_OPTLABEL; "_" ->
+            <:patt< ? $i$ : (_) >>
         | i = a_OPTLABEL; "("; p = patt; ")" ->
             <:patt< ? $i$ : ($p$) >>
         | i = a_OPTLABEL; "("; p = patt; "="; e = expr; ")" ->

camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml

             <:str_item< module $i$ = $mb$ >>
         | "module"; "rec"; mb = module_binding ->
             <:str_item< module rec $mb$ >>
-        | "module"; "type"; i = a_UIDENT; "="; mt = module_type ->
+        | "module"; "type"; i = a_ident; "="; mt = module_type ->
             <:str_item< module type $i$ = $mt$ >>
         | "open"; i = module_longident -> <:str_item< open $i$ >>
         | "type"; td = type_declaration ->
             <:sig_item< module $i$ : $mt$ >>
         | "module"; "rec"; mb = module_rec_declaration ->
             <:sig_item< module rec $mb$ >>
-        | "module"; "type"; i = a_UIDENT; "="; mt = module_type ->
+        | "module"; "type"; i = a_ident; "="; mt = module_type ->
             <:sig_item< module type $i$ = $mt$ >>
-        | "module"; "type"; i = a_UIDENT ->
+        | "module"; "type"; i = a_ident ->
             <:sig_item< module type $i$ >>
         | "open"; i = module_longident -> <:sig_item< open $i$ >>
         | "type"; t = type_declaration ->

camlp4/Camlp4Top/Rprint.ml

   | tyl ->
       fprintf ppf "@[<1>(%a)@]@ " (print_typlist print_out_type ",") tyl ]
 and print_ty_label ppf lab =
-  if lab <> "" then fprintf ppf "~%s:" lab else ()
+  if lab <> "" then fprintf ppf "%s%s:" (if lab.[0] = '?' then "" else "~") lab else ()
 ;
 
 value type_parameter ppf (ty, (co, cn)) =
       fprintf ppf "@[<2>functor@ (%s : %a) ->@ %a@]" name
         print_out_module_type mty_arg print_out_module_type mty_res
   | Omty_abstract -> () ]
+and needs_semi =
+  fun
+  [ Osig_class _ _ _ _ rs
+  | Osig_class_type _ _ _ _ rs
+  | Osig_module _ _ rs
+  | Osig_type _ rs -> rs <> Orec_next
+  | Osig_exception _ _
+  | Osig_modtype _ _
+  | Osig_value _ _ _ -> True ]
 and print_out_signature ppf =
   fun
   [ [] -> ()
   | [item] -> fprintf ppf "%a;" Toploop.print_out_sig_item.val item
   | [item :: items] ->
-      fprintf ppf "%a;@ %a" Toploop.print_out_sig_item.val item
+      let sep = match items with
+      [ [hd :: _] -> if needs_semi hd then ";" else ""
+      | [] -> ";" ] in
+      fprintf ppf "%a%s@ %a" Toploop.print_out_sig_item.val item sep
         print_out_signature items ]
 and print_out_sig_item ppf =
   fun

camlp4/boot/Camlp4.ml

                      with
                      | Failure _ ->
                          error loc
-                           "Integer literal exceeds the range of representable integers of type int64")
+                           "Integer literal exceeds the range of representable integers of type int64.1")
                   in mkexp loc (Pexp_constant (Const_int64 i64))
               | ExNativeInt (loc, s) ->
                   let nati =

config/auto-aux/expm1.c

+/***********************************************************************/
+/*                                                                     */
+/*                           Objective Caml                            */
+/*                                                                     */
+/*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         */
+/*                                                                     */
+/*  Copyright 2011 Institut National de Recherche en Informatique et   */
+/*  en Automatique.  All rights reserved.  This file is distributed    */
+/*  under the terms of the GNU Library General Public License, with    */
+/*  the special exception on linking described in file ../../LICENSE.  */
+/*                                                                     */
+/***********************************************************************/
+
+/* $Id: longlong.c 4833 2002-05-25 08:33:26Z xleroy $ */
+
+#include <math.h>
+
+volatile double x;
+
+int main(int argc, char **argv)
+{
+  x = 3.1415;
+  x = expm1(x);
+  x = log1p(x);
+  return 0;
+}
 #                                                                       #
 #########################################################################
 
-# $Id: configure 10958 2011-02-21 15:23:45Z xclerc $
+# $Id: configure 11064 2011-06-04 08:13:25Z xleroy $
 
 configure_options="$*"
 prefix=/usr/local
 # Determine alignment constraints
 
 case "$host" in
-  sparc*-*-*|hppa*-*-*|arm*-*-*)
+  sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
     # On Sparc V9 with certain versions of gcc, determination of double
     # alignment is not reliable (PR#1521), hence force it.
     # Same goes for hppa.
     # PR#5088 suggests same problem on ARM.
+    # PR#5280 reports same problem on MIPS.
     # But there's a knack (PR#2572):
     # if we're in 64-bit mode (sizeof(long) == 8),
     # we must not doubleword-align floats...
 
 if $int64_native; then
   case "$host" in
-    # PR#5088: autodetection is unreliable on ARM
-    sparc*-*-*|hppa*-*-*|arm*-*-*)
+    # PR#5088: autodetection is unreliable on ARM.  PR#5280: also on MIPS.
+    sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
       if test $2 = 8; then
         echo "64-bit integers can be word-aligned."
         echo "#undef ARCH_ALIGN_INT64" >> m.h

emacs/caml-font.el

     . font-lock-builtin-face)
 ;control
    (,(concat "[|#&]\\|->\\|"
-             (regexp-opt '("do" "done" "dowto" "else" "for" "if" "ignore"
+             (regexp-opt '("do" "done" "downto" "else" "for" "if" "ignore"
                            "lazy" "match" "new" "or" "then" "to" "try"
                            "when" "while" "with")
                          'words))
 ;(*                                                                     *)
 ;(***********************************************************************)
 
-;(* $Id: caml.el 10662 2010-08-30 15:15:33Z doligez $ *)
+;(* $Id: caml.el 11055 2011-05-20 07:40:01Z garrigue $ *)
 
 ;;; caml.el --- O'Caml code editing commands for Emacs
 
 
 (defconst caml-matching-kw-regexp
   (concat
-   "\\<\\(and\\|do\\(ne\\)?\\|e\\(lse\\|nd\\)\\|in\\|t\\(hen\\|o\\)"
+   "\\<\\(and\\|do\\(ne\\|wnto\\)?\\|e\\(lse\\|nd\\)\\|in\\|t\\(hen\\|o\\)"
    "\\|with\\)\\>\\|[^[|]|")
   "Regexp used in caml mode for skipping back over nested blocks.")
 
     ("else" . caml-find-else-match)
     ("then" . caml-find-then-match)
     ("to" . caml-find-done-match)
+    ("downto" . caml-find-done-match)
     ("do" . caml-find-done-match)
     ("and" . caml-find-and-match))
 
 
 (defconst caml-leading-kwops-regexp
   (concat
-   "\\<\\(and\\|do\\(ne\\)?\\|e\\(lse\\|nd\\)\\|in"
+   "\\<\\(and\\|do\\(ne\\|wnto\\)?\\|e\\(lse\\|nd\\)\\|in"
    "\\|t\\(hen\\|o\\)\\|with\\)\\>\\|[]|})]")
 
   "Regexp matching caml keywords which need special indentation.")
     ("in" caml-in-extra-indent 2)
     ("then" caml-then-extra-indent 3)
     ("to" caml-to-extra-indent 0)
+    ("downto" caml-to-extra-indent 0)
     ("with" caml-with-extra-indent 2)
     ("|" caml-|-extra-indent 2)
     ("]" caml-rb-extra-indent 0)

emacs/inf-caml.el

 ;(*                                                                     *)
 ;(***********************************************************************)
 
-;(* $Id: inf-caml.el 10661 2010-08-30 10:16:22Z doligez $ *)
+;(* $Id: inf-caml.el 11027 2011-05-05 11:28:57Z doligez $ *)
 
 ;;; inf-caml.el --- run the Caml toplevel in an Emacs buffer
 
                (beep) (if wait (read-event) (caml-sit-for 60)))
            (delete-overlay caml-error-overlay)))))
 
-;; wait some amount for ouput, that is, until inferior-caml-output is set
+;; wait some amount for output, that is, until inferior-caml-output is set
 ;; to true. Hence, interleaves sitting for shorts delays and checking the
 ;; flag. Give up after some time. Typing into the source buffer will cancel
 ;; waiting, i.e. may report 'No result yet'

ocamlbuild/main.ml

         if name = "_tags" then
           ignore (Configuration.parse_file ?dir path_name);
 
-        (String.length name > 0 && name.[0] <> '_' && name <> !Options.build_dir && not (List.mem name !Options.exclude_dirs))
+        (List.mem name ["_oasis"] || (String.length name > 0 && name.[0] <> '_'))
+        && (name <> !Options.build_dir && not (List.mem name !Options.exclude_dirs))
         && begin
           if path_name <> Filename.current_dir_name && Pathname.is_directory path_name then
             let tags = tags_of_pathname path_name in

ocamlbuild/ocamlbuild_pack.mlpack

 Log
 My_unix
 My_std
-Std_signatures
 Signatures
 Shell
 Display

ocamlbuild/signatures.mli

   val union : 'a list -> 'a list -> 'a list
 
   (* Original functions *)
-  include Std_signatures.LIST
+  include module type of List
 end
 
 module type STRING = sig
   val explode : string -> char list
 
   (** The following are original functions from the [String] module. *)
-  include Std_signatures.STRING
+  include module type of String
 end
 
 module type TAGS = sig

ocamlbuild/std_signatures.mli

-(***********************************************************************)
-(*                             ocamlbuild                              *)
-(*                                                                     *)
-(*  Nicolas Pouillard, Berke Durak, projet Gallium, INRIA Rocquencourt *)
-(*                                                                     *)
-(*  Copyright 2007 Institut National de Recherche en Informatique et   *)
-(*  en Automatique.  All rights reserved.  This file is distributed    *)
-(*  under the terms of the Q Public License version 1.0.               *)
-(*                                                                     *)
-(***********************************************************************)
-
-
-(* Original author: Nicolas Pouillard *)
-(** Some signatures from the standard library. *)
-
-module type LIST = sig
-  val length : 'a list -> int
-  val hd : 'a list -> 'a
-  val tl : 'a list -> 'a list
-  val nth : 'a list -> int -> 'a
-  val rev : 'a list -> 'a list
-  val append : 'a list -> 'a list -> 'a list
-  val rev_append : 'a list -> 'a list -> 'a list
-  val concat : 'a list list -> 'a list
-  val flatten : 'a list list -> 'a list
-  val iter : ('a -> unit) -> 'a list -> unit
-  val map : ('a -> 'b) -> 'a list -> 'b list
-  val rev_map : ('a -> 'b) -> 'a list -> 'b list
-  val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
-  val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b
-  val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit
-  val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
-  val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list
-  val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
-  val fold_right2 :
-    ('a -> 'b -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c
-  val for_all : ('a -> bool) -> 'a list -> bool
-  val exists : ('a -> bool) -> 'a list -> bool
-  val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
-  val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
-  val mem : 'a -> 'a list -> bool
-  val memq : 'a -> 'a list -> bool
-  val find : ('a -> bool) -> 'a list -> 'a
-  val filter : ('a -> bool) -> 'a list -> 'a list
-  val find_all : ('a -> bool) -> 'a list -> 'a list
-  val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
-  val assoc : 'a -> ('a * 'b) list -> 'b
-  val assq : 'a -> ('a * 'b) list -> 'b
-  val mem_assoc : 'a -> ('a * 'b) list -> bool
-  val mem_assq : 'a -> ('a * 'b) list -> bool
-  val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list
-  val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list
-  val split : ('a * 'b) list -> 'a list * 'b list
-  val combine : 'a list -> 'b list -> ('a * 'b) list
-  val sort : ('a -> 'a -> int) -> 'a list -> 'a list
-  val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list
-  val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list
-  val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
-end
-
-module type STRING = sig
-  external length : string -> int = "%string_length"
-  external get : string -> int -> char = "%string_safe_get"
-  external set : string -> int -> char -> unit = "%string_safe_set"
-  external create : int -> string = "caml_create_string"
-  val make : int -> char -> string
-  val copy : string -> string
-  val sub : string -> int -> int -> string
-  val fill : string -> int -> int -> char -> unit
-  val blit : string -> int -> string -> int -> int -> unit
-  val concat : string -> string list -> string
-  val iter : (char -> unit) -> string -> unit
-  val escaped : string -> string
-  val index : string -> char -> int
-  val rindex : string -> char -> int
-  val index_from : string -> int -> char -> int
-  val rindex_from : string -> int -> char -> int
-  val contains : string -> char -> bool
-  val contains_from : string -> int -> char -> bool
-  val rcontains_from : string -> int -> char -> bool
-  val uppercase : string -> string
-  val lowercase : string -> string
-  val capitalize : string -> string
-  val uncapitalize : string -> string
-  type t = string
-  val compare : t -> t -> int
-  external unsafe_get : string -> int -> char = "%string_unsafe_get"
-  external unsafe_set : string -> int -> char -> unit
-    = "%string_unsafe_set"
-  external unsafe_blit : string -> int -> string -> int -> int -> unit
-    = "caml_blit_string" "noalloc"
-  external unsafe_fill : string -> int -> int -> char -> unit
-    = "caml_fill_string" "noalloc"
-end

ocamldoc/Makefile

 #(*                                                                     *)
 #(***********************************************************************)
 
-# $Id: Makefile 10584 2010-06-16 11:38:22Z guesdon $
+# $Id: Makefile 11020 2011-05-02 13:14:14Z guesdon $
 
 include ../config/Makefile
 
 MKDIR=mkdir -p
 CP=cp -f
 OCAMLDOC=ocamldoc
-OCAMLDOC_RUN=./ocamldoc.opt #sh ./runocamldoc $(SUPPORTS_SHARED_LIBRARIES)
+OCAMLDOC_RUN=sh ./runocamldoc $(SUPPORTS_SHARED_LIBRARIES)
 OCAMLDOC_OPT=$(OCAMLDOC).opt
 OCAMLDOC_LIBCMA=odoc_info.cma
 OCAMLDOC_LIBCMI=odoc_info.cmi
 	../otherlibs/bigarray/bigarray.mli \
 	../otherlibs/num/num.mli
 
-all: exe lib
+all: exe lib manpages
 
 exe: $(OCAMLDOC)
 lib: $(OCAMLDOC_LIBCMA) $(OCAMLDOC_LIBCMI) $(ODOC_TEST)
 
 opt.opt: exeopt libopt
-	$(MAKE) manpages
 exeopt: $(OCAMLDOC_OPT)
 libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI)
 debug:

ocamldoc/odoc_args.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* cvsid $Id: odoc_args.ml 10930 2011-01-18 10:58:40Z xclerc $ *)
+(* cvsid $Id: odoc_args.ml 11029 2011-05-09 07:29:55Z xclerc $ *)
 
 (** Command-line arguments. *)
 
 
 let html_short_functors = ref false
 
+let charset = ref "iso-8859-1"
+
 let with_header = ref true
 
 let with_trailer = ref true
   "-css-style", Arg.String (fun s -> css_style := Some s), M.css_style ;
   "-index-only", Arg.Set index_only, M.index_only ;
   "-colorize-code", Arg.Set colorize_code, M.colorize_code ;
-  "-short-functors", Arg.Set html_short_functors, M.html_short_functors ^
+  "-short-functors", Arg.Set html_short_functors, M.html_short_functors ;
+  "-charset", Arg.Set_string charset, (M.charset !charset)^
   "\n\n *** LaTeX options ***\n";
 
 (* latex only options *)
 (** The help option list, overriding the default ones from the Arg module *)
 let help_options = ref []
 let help_action () =
-  Arg.usage (!options @ !help_options) (M.usage^M.options_are)
+  let msg =
+    Arg.usage_string
+      (!options @ !help_options)
+      (M.usage ^ M.options_are) in 
+  print_string msg
 let () =
   help_options := [
     "-help", Arg.Unit help_action, M.help ;

ocamldoc/odoc_args.mli

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: odoc_args.mli 9270 2009-05-20 11:52:42Z doligez $ *)
+(* $Id: odoc_args.mli 11027 2011-05-05 11:28:57Z doligez $ *)
 
 (** Analysis of the command line arguments. *)
 
    in HTML generated documentation. *)
 val html_short_functors : bool ref
 
+(** Encoding used in HTML pages header. *)
+val charset : string ref
+
 (** The flag which indicates if we must generate a header (for LaTeX). *)
 val with_header : bool ref
 
 (** The Info directory entries to insert *)
 val info_entry : string list ref
 
-(** Include all modules or only the ones on the command line, for the dot ouput. *)
+(** Include all modules or only the ones on the command line, for the dot output. *)
 val dot_include_all : bool ref
 
 (** Generate dependency graph for types. *)

ocamldoc/odoc_html.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: odoc_html.ml 10493 2010-06-04 05:37:50Z guesdon $ *)
+(* $Id: odoc_html.ml 11023 2011-05-02 13:55:00Z guesdon $ *)
 
 (** Generation of html documentation.*)
 
       match l with
         [] -> ()
       | _ ->
-          bp b "<b>%s:</b> %s<br>\n"
-            Odoc_messages.authors
-            (String.concat ", " l)
+          bp b "<b>%s:</b> " Odoc_messages.authors;
+          self#html_of_text b [Raw (String.concat ", " l)];
+          bs b "<br>\n"
 
     (** Print html code for the given optional version information.*)
     method html_of_version_opt b v_opt =
       match v_opt with
         None -> ()
       | Some v ->
-           bp b "<b>%s:</b> %s<br>\n" Odoc_messages.version v
+           bp b "<b>%s:</b> " Odoc_messages.version;
+           self#html_of_text b [Raw v];
+           bs b "<br>\n"
 
     (** Print html code for the given optional since information.*)
     method html_of_since_opt b s_opt =
       match s_opt with
         None -> ()
       | Some s ->
-          bp b "<b>%s</b> %s<br>\n" Odoc_messages.since s
+          bp b "<b>%s</b> " Odoc_messages.since;
+          self#html_of_text b [Raw s];
+          bs b "<br>\n"
 
     (** Print html code for the given "before" information.*)
     method html_of_before b l =
       let f (v, text) =
-        bp b "<b>%s %s </b> " Odoc_messages.before v;
+        bp b "<b>%s " Odoc_messages.before;
+        self#html_of_text b [Raw v];
+        bs b " </b> ";
         self#html_of_text b text;
         bs b "<br>\n"
       in
 
     val mutable doctype =
       "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
-    val mutable character_encoding =
-      "<meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"Content-Type\">\n"
+    method character_encoding () =
+      Printf.sprintf
+        "<meta content=\"text/html; charset=%s\" http-equiv=\"Content-Type\">\n"
+        !Odoc_info.Args.charset
 
     (** The default style options. *)
     val mutable default_style_options =
         in
         bs b "<head>\n";
         bs b style;
-        bs b character_encoding ;
+        bs b (self#character_encoding ()) ;
         bs b "<link rel=\"Start\" href=\"";
         bs b self#index;
         bs b "\">\n" ;

ocamldoc/odoc_info.mli

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: odoc_info.mli 10480 2010-05-31 11:52:13Z guesdon $ *)
+(* $Id: odoc_info.mli 11027 2011-05-05 11:28:57Z doligez $ *)
 
 (** Interface to the information collected in source files. *)
 
          in HTML generated documentation. *)
       val html_short_functors : bool ref
 
+      (** Character encoding used in HTML pages header. *)
+      val charset : string ref
+
       (** The flag which indicates if we must generate a header (for LaTeX). *)
       val with_header : bool ref
 
       (** The Info directory entries to insert *)
       val info_entry : string list ref
 
-      (** Include all modules or only the ones on the command line, for the dot ouput. *)
+      (** Include all modules or only the ones on the command line, for the dot output. *)
       val dot_include_all : bool ref
 
       (** Generate dependency graph for types. *)

ocamldoc/odoc_messages.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: odoc_messages.ml 10930 2011-01-18 10:58:40Z xclerc $ *)
+(* $Id: odoc_messages.ml 11027 2011-05-05 11:28:57Z doligez $ *)
 
 (** The messages of the application. *)
 
 let index_only = "\tGenerate index files only "^html_only
 let colorize_code = "\n\t\tColorize code even in documentation pages "^html_only
 let html_short_functors = "\n\t\tUse short form to display functor types "^html_only
+let charset c = Printf.sprintf
+  "<s>\n\t\tAdd information about character encoding being s\n\t\t(default is %s)"
+  c
 let generate_html = "\tGenerate HTML documentation"
 let generate_latex = "\tGenerate LaTeX documentation"
 let generate_texinfo = "\tGenerate TeXinfo documentation"
 
 let default_out_file = "ocamldoc.out"
 let out_file =
-  "<file>\tSet the ouput file name, used by texi, latex and dot generators\n"^
+  "<file>\tSet the output file name, used by texi, latex and dot generators\n"^
   "\t\t(default is "^default_out_file^")\n"^
   "\t\tor the prefix of index files for the HTML generator\n"^
   "\t\t(default is index)"

otherlibs/bigarray/.depend

   ../../byterun/../config/m.h ../../byterun/../config/s.h \
   ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \
   ../../byterun/custom.h ../../byterun/mlvalues.h ../../byterun/fail.h \
-  ../../byterun/io.h ../../byterun/sys.h
+  ../../byterun/io.h ../../byterun/sys.h ../../byterun/signals.h
 mmap_win32.o: mmap_win32.c bigarray.h ../../byterun/config.h \
   ../../byterun/../config/m.h ../../byterun/../config/s.h \
   ../../byterun/mlvalues.h ../../byterun/config.h ../../byterun/misc.h \

otherlibs/bigarray/bigarray_stubs.c

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: bigarray_stubs.c 9153 2008-12-03 18:09:09Z doligez $ */
+/* $Id: bigarray_stubs.c 11037 2011-05-12 14:34:05Z xleroy $ */
 
 #include <stddef.h>
 #include <stdarg.h>
   struct caml_ba_array * b1 = Caml_ba_array_val(v1);
   struct caml_ba_array * b2 = Caml_ba_array_val(v2);
   uintnat n, num_elts;
+  intnat flags1, flags2;
   int i;
 
+  /* Compare kind & layout in case the arguments are of different types */
+  flags1 = b1->flags & (CAML_BA_KIND_MASK | CAML_BA_LAYOUT_MASK);
+  flags2 = b2->flags & (CAML_BA_KIND_MASK | CAML_BA_LAYOUT_MASK);
+  if (flags1 != flags2) return flags2 - flags1;
   /* Compare number of dimensions */
   if (b1->num_dims != b2->num_dims) return b2->num_dims - b1->num_dims;
   /* Same number of dimensions: compare dimensions lexicographically */

otherlibs/bigarray/mmap_win32.c

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: mmap_win32.c 9547 2010-01-22 12:48:24Z doligez $ */
+/* $Id: mmap_win32.c 11066 2011-06-04 13:53:24Z xleroy $ */
 
 #include <stddef.h>
 #include <stdio.h>
   if (fmap == NULL) caml_ba_sys_error();
   /* Determine offset so that the mapping starts at the given file pos */
   GetSystemInfo(&sysinfo);
-  delta = (uintnat) (startpos % sysinfo.dwPageSize);
+  delta = (uintnat) (startpos % sysinfo.dwAllocationGranularity);
   /* Map the mapping in memory */
   li.QuadPart = startpos - delta;
   addr =
   uintnat delta;
 
   GetSystemInfo(&sysinfo);
-  delta = (uintnat) addr % sysinfo.dwPageSize;
+  delta = (uintnat) addr % sysinfo.dwAllocationGranularity;
   UnmapViewOfFile((void *)((uintnat)addr - delta));
 }
 

otherlibs/systhreads/thread.ml

 type t
 
 external thread_initialize : unit -> unit = "caml_thread_initialize"
+external thread_cleanup : unit -> unit = "caml_thread_cleanup"
 external thread_new : (unit -> unit) -> t = "caml_thread_new"
 external thread_uncaught_exception : exn -> unit =
             "caml_thread_uncaught_exception"
   | _       -> Sys.sigvtalrm
 
 let _ =
-  ignore(Sys.signal preempt_signal (Sys.Signal_handle preempt));
-  thread_initialize()
+  Sys.set_signal preempt_signal (Sys.Signal_handle preempt);
+  thread_initialize();
+  at_exit
+    (fun () ->
+        thread_cleanup();
+        (* In case of DLL-embedded Ocaml the preempt_signal handler
+           will point to nowhere after DLL unloading and an accidental
+           preempt_signal will crash the main program. So restore the
+           default handler. *)
+        Sys.set_signal preempt_signal Sys.Signal_default
+    )
 
 (* Wait functions *)
 

otherlibs/unix/.depend

 lseek.o: lseek.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
   ../../byterun/config.h ../../byterun/../config/m.h \
   ../../byterun/../config/s.h ../../byterun/misc.h ../../byterun/alloc.h \
-  ../../byterun/mlvalues.h ../../byterun/io.h unixsupport.h
+  ../../byterun/mlvalues.h ../../byterun/io.h ../../byterun/signals.h \
+  unixsupport.h
 mkdir.o: mkdir.c ../../byterun/mlvalues.h ../../byterun/compatibility.h \
   ../../byterun/config.h ../../byterun/../config/m.h \
   ../../byterun/../config/s.h ../../byterun/misc.h unixsupport.h

otherlibs/win32unix/channels.c

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: channels.c 9547 2010-01-22 12:48:24Z doligez $ */
+/* $Id: channels.c 11030 2011-05-09 11:38:43Z doligez $ */
 
 #include <mlvalues.h>
 #include <alloc.h>
   } else {
     int fd = _open_osfhandle((long) Handle_val(handle), O_BINARY);
     if (fd == -1) uerror("channel_of_descr", Nothing);
+    CRT_fd_val(handle) = fd;
     return fd;
   }
 }

otherlibs/win32unix/close.c

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: close.c 4765 2002-04-30 15:00:48Z xleroy $ */
+/* $Id: close.c 11030 2011-05-09 11:38:43Z doligez $ */
 
 #include <mlvalues.h>
 #include "unixsupport.h"
+#include <io.h>
+
+extern int _close(int);
 
 CAMLprim value unix_close(value fd)
 {
       uerror("close", Nothing);
     }
   } else {
-    if (! CloseHandle(Handle_val(fd))) {
-      win32_maperr(GetLastError());
-      uerror("close", Nothing);
+    /* If we have an fd then closing it also closes
+     * the underlying handle. Also, closing only
+     * the handle and not the fd leads to fd leaks. */
+    if (CRT_fd_val(fd) != NO_CRT_FD) {
+      if (_close(CRT_fd_val(fd)) != 0)
+         uerror("close", Nothing);
+    } else {
+      if (! CloseHandle(Handle_val(fd))) {
+        win32_maperr(GetLastError());
+        uerror("close", Nothing);
+      }
     }
   }
   return Val_unit;

parsing/location.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: location.ml 8768 2008-01-11 16:13:18Z doligez $ *)
+(* $Id: location.ml 11050 2011-05-17 16:14:39Z doligez $ *)
 
 open Lexing
 

parsing/parser.mly

 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: parser.mly 10536 2010-06-07 15:32:32Z doligez $ */
+/* $Id: parser.mly 11016 2011-04-29 04:56:21Z furuse $ */
 
 /* The parser definition */
 
 package_type:
     mty_longident { ($1, []) }
   | mty_longident WITH package_type_cstrs { ($1, $3) }
-
+;
 package_type_cstr:
     TYPE LIDENT EQUAL core_type { ($2, $4) }
 ;
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: arg.ml 8768 2008-01-11 16:13:18Z doligez $ *)
+(* $Id: arg.ml 11028 2011-05-09 07:28:57Z xclerc $ *)
 
 type key = string
 type doc = string
   List.iter (print_spec buf) (add_help speclist);
 ;;
 
-let usage speclist errmsg =
+let usage_string speclist errmsg =
   let b = Buffer.create 200 in
   usage_b b speclist errmsg;
-  eprintf "%s" (Buffer.contents b);
+  Buffer.contents b;
+;;
+
+let usage speclist errmsg =
+  eprintf "%s" (usage_string speclist errmsg);
 ;;
 
 let current = ref 0;;
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: arg.mli 8768 2008-01-11 16:13:18Z doligez $ *)
+(* $Id: arg.mli 11031 2011-05-09 11:39:33Z doligez $ *)
 
 (** Parsing of command line arguments.
 
     as their arguments appear on the command line.
 
     If an error occurs, [Arg.parse] exits the program, after printing
-    an error message as follows:
+    to standard error an error message as follows:
 -   The reason for the error: unknown option, invalid or missing argument, etc.
 -   [usage_msg]
 -   The list of options, each followed by the corresponding [doc] string.
     [-], include for example [("-", String anon_fun, doc)] in [speclist].
 
     By default, [parse] recognizes two unit options, [-help] and [--help],
-    which will display [usage_msg] and the list of options, and exit
-    the program.  You can override this behaviour by specifying your
-    own [-help] and [--help] options in [speclist].
+    which will print to standard output [usage_msg] and the list of
+    options, and exit the program.  You can override this behaviour
+    by specifying your own [-help] and [--help] options in [speclist].
 *)
 
 val parse_argv : ?current: int ref -> string array ->
     [Arg.Bad] is also raised by [Arg.parse_argv] in case of an error. *)
 
 val usage : (key * spec * doc) list -> usage_msg -> unit
-(** [Arg.usage speclist usage_msg] prints an error message including
-    the list of valid options.  This is the same message that
-    {!Arg.parse} prints in case of error.
+(** [Arg.usage speclist usage_msg] prints to standard error
+    an error message that includes the list of valid options.  This is
+    the same message that {!Arg.parse} prints in case of error.
     [speclist] and [usage_msg] are the same as for [Arg.parse]. *)
 
+val usage_string : (key * spec * doc) list -> usage_msg -> string
+(** Returns the message that would have been printed by {!Arg.usage},
+    if provided with the same parameters. *)
+
 val align: (key * spec * doc) list -> (key * spec * doc) list;;
 (** Align the documentation strings by inserting spaces at the first
     space, according to the length of the keyword.  Use a

stdlib/pervasives.mli

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: pervasives.mli 10926 2011-01-12 17:48:45Z doligez $ *)
+(* $Id: pervasives.mli 11048 2011-05-17 13:31:32Z doligez $ *)
 
 (** The initially opened module.
 
 (** The standard output for the process. *)
 
 val stderr : out_channel
-(** The standard error ouput for the process. *)
+(** The standard error output for the process. *)
 
 
 (** {7 Output functions on standard output} *)
     included for backward compatibility with earlier releases of Objective
     Caml.
     ['a] is the type of the parameters of the format,
-    ['c] is the result type for the "printf"-style function,
-    and ['b] is the type of the first argument given to
-    [%a] and [%t] printing functions. *)
+    ['b] is the type of the first argument given to
+         [%a] and [%t] printing functions,
+    ['c] is the type of the argument transmitted to the first argument of
+         "kprintf"-style functions,
+    ['d] is the result type for the "scanf"-style functions,
+    ['e] is the type of the receiver function for the "scanf"-style functions,
+    ['f] is the result type for the "printf"-style function.
+ *)
 type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
 
 type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: string.ml 9153 2008-12-03 18:09:09Z doligez $ *)
+(* $Id: string.ml 11043 2011-05-16 15:00:33Z doligez $ *)
 
 (* String operations *)
 
 
 type t = string
 
-let compare = Pervasives.compare
+let compare (x: t) (y: t) = Pervasives.compare x y

testsuite/tests/asmcomp/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
+*.s
+*.out
+*.dSYM
+parsecmm.mli
+parsecmm.ml
+lexcmm.ml
+codegen
+
+EOF

testsuite/tests/embedded/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
+
+EOF

testsuite/tests/gc-roots/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
+
+EOF

testsuite/tests/lib-digest/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
+
+EOF

testsuite/tests/regression-camlp4-class-type-plus/Makefile

+ADD_COMPFLAGS = -pp 'camlp4o'
+MAIN_MODULE = camlp4_class_type_plus_ok
+
+include ../../makefiles/Makefile.okbad
+include ../../makefiles/Makefile.common

testsuite/tests/regression-camlp4-class-type-plus/camlp4_class_type_plus_ok.ml

+type t;;
+type xdr_value;;
+
+class type [ 't ] engine = object
+end;;
+
+module type T = sig
+class unbound_async_call : t -> [xdr_value] engine;;
+end;;

testsuite/tests/regression-pr5080-notes/Makefile

+ADD_COMPFLAGS = -pp 'camlp4o pa_macro.cmo'
+MAIN_MODULE = pr5080_notes_ok
+
+include ../../makefiles/Makefile.okbad
+include ../../makefiles/Makefile.common

testsuite/tests/regression-pr5080-notes/pr5080_notes_ok.ml

+let marshal_int f  =
+  match [] with
+  | _ :: `INT n :: _ -> f n
+  | _ -> failwith "marshal_int"

testsuite/tests/runtime-errors/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
+*.bytecode
+
+EOF

testsuite/tests/tool-lexyacc/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program
 scanner.ml
 grammar.mli
 grammar.ml
-*.byte
-*.native
-*.result
+
+EOF

testsuite/tests/tool-ocamldoc/.svnignore

+#!/bin/sh
+
+svn propset svn:ignore -F - . <<EOF
+
+*.result
+*.byte
+*.native
+program