summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKate <kit.ty.kate@disroot.org>2019-09-10 16:49:20 +0100
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2019-09-10 17:49:20 +0200
commitc01dbc1babff8de875c28ab0c027ef41cd252fc1 (patch)
tree2b3b8768b76c5810db99c124788277fd956d49b0 /configure.ac
parenteba0d9520500dae1b62c59185b07201bf4fadddf (diff)
downloadocaml-c01dbc1babff8de875c28ab0c027ef41cd252fc1.tar.gz
Enable force-safe-string by default (#1859)
* Enable force-safe-string by default * Run the autogen script * Add a line to the changelog * Remove test using the -unsafe-string argument * Disable program comparison for tests giving different binaries between ocamlopt.opt and ocamlopt.byte after switching to force-safe-string by default * Add a comment where the compare_programs tests have been disabled to refer to an explaination of the problem
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 10 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 76fdb8f9d6..f9a0435173 100644
--- a/configure.ac
+++ b/configure.ac
@@ -338,13 +338,15 @@ AC_ARG_VAR([WINDOWS_UNICODE_MODE],
# explicitly passed.
#
# The configure-time behavior of OCaml 4.05 and older was equivalent
-# to --disable-force-safe-string DEFAULT_STRING=unsafe. OCaml 4.06
-# and later use --disable-force-safe-string DEFAULT_STRING=safe. We
-# expect --enable-force-safe-string to become the default in the future.
+# to --disable-force-safe-string DEFAULT_STRING=unsafe. With OCaml 4.06
+# and older was equivalent to --disable-force-safe-string DEFAULT_STRING=safe.
+# With OCaml 4.10 and later use --enable-force-safe-string DEFAULT_STRING=safe.
+# We expect the --disable-force-safe-string and DEFAULT_STRING=unsafe options
+# to be removed in the future.
AC_ARG_ENABLE([force-safe-string],
- [AS_HELP_STRING([--enable-force-safe-string],
- [force strings to be safe])])
+ [AS_HELP_STRING([--disable-force-safe-string],
+ [do not force strings to be safe])])
AC_ARG_VAR([DEFAULT_STRING],
[whether strings should be safe (default) or unsafe])
@@ -1658,10 +1660,10 @@ AS_IF([test x"$with_afl" = "xyes"],
[afl=true],
[afl=false])
-AS_IF([test x"$enable_force_safe_string" = "xyes"],
+AS_IF([test x"$enable_force_safe_string" = "xno"],
[AC_DEFINE([CAML_SAFE_STRING])
- force_safe_string=true],
- [force_safe_string=false])
+ force_safe_string=false],
+ [force_safe_string=true])
AS_IF([test x"$DEFAULT_STRING" = "xunsafe"],
[default_safe_string=false],