MBEDTLS_NO_INT64_DIVISION -> MBEDTLS_NO_UDBL_DIVISION

Changed the option to disable the use of 64-bit division, to an option
to disable the use of double-width division, whether that's 64 or 128-bit.
diff --git a/ChangeLog b/ChangeLog
index 6f902fa..96c83e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,13 @@
      qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt,
      mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk.
 
+Changes
+   * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of
+     64-bit division.
+   * Added config.h option MBEDTLS_TYPE_UDBL to allow configuring the
+     double-width integer type used in the bignum module when the compiler is
+     unknown.
+
 Bugfix
    * Add a check if iv_len is zero, and return an error if it is zero. reported
      by roberto. #716
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index de99938..a921f47 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -56,6 +56,31 @@
 #define MBEDTLS_HAVE_ASM
 
 /**
+ * \def MBEDTLS_NO_UDBL_DIVISION
+ *
+ * The platform lacks support for double-width integer division (64-bit
+ * division on a 32-bit platform, 128-bit division on a 64-bit platform).
+ *
+ * Used in:
+ *      include/mbedtls/bignum.h
+ *      library/bignum.c
+ *
+ * The bignum code uses double-width division to speed up some operations.
+ * Double-width division is often implemented in software that needs to
+ * be linked with the program. The presence of a double-width integer
+ * type is usually detected automatically through preprocessor macros,
+ * but the automatic detection cannot know whether the code needs to
+ * and can be linked with an implementation of division for that type.
+ * By default division is assumed to be usable if the type is present.
+ * Uncomment this option to prevent the use of double-width division.
+ *
+ * Note that division for the native integer type is always required.
+ * Furthermore, a 64-bit type is always required even on a 32-bit
+ * platform, but it need not support multiplication or division.
+ */
+//#define MBEDTLS_NO_UDBL_DIVISION
+
+/**
  * \def MBEDTLS_HAVE_SSE2
  *
  * CPU supports SSE2 instruction set.
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 743735e..630ddfb 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -468,6 +468,13 @@
 scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit
 CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' make lib
 
+msg "build: arm-none-eabi-gcc -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
+cleanup
+scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
+CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' make lib
+echo "Checking that software 64-bit division is not required"
+! grep __aeabi_uldiv library/*.o
+
 msg "build: ARM Compiler 5, make"
 cleanup
 cp "$CONFIG_H" "$CONFIG_BAK"