Latest libsodium-1.0.18-stable.tar.gz.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4193 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-02-19 23:23:53 +00:00
parent 86bc46a11e
commit 961109635b
44 changed files with 2426 additions and 1477 deletions

View File

@ -1596,7 +1596,7 @@ Some influential environment variables:
CPP C preprocessor
SAFECODE_HOME
set to the safecode base directory
CWFLAGS define to compilation flags for generating extra warnings
CWFLAGS compilation flags for generating extra warnings
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
AR path to the ar utility
@ -3753,6 +3753,9 @@ then :
fi
sodium_CFLAGS=${CFLAGS+set}
: ${CFLAGS=""}
@ -5289,6 +5292,206 @@ fi
if test "$sodium_CFLAGS" != "set" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Ofast" >&5
printf %s "checking whether C compiler accepts -Ofast... " >&6; }
if test ${ax_cv_check_cflags___Ofast+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Ofast"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___Ofast=yes
else $as_nop
ax_cv_check_cflags___Ofast=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Ofast" >&5
printf "%s\n" "$ax_cv_check_cflags___Ofast" >&6; }
if test "x$ax_cv_check_cflags___Ofast" = xyes
then :
CFLAGS="$CFLAGS -Ofast"
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -O3" >&5
printf %s "checking whether C compiler accepts -O3... " >&6; }
if test ${ax_cv_check_cflags___O3+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -O3"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___O3=yes
else $as_nop
ax_cv_check_cflags___O3=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___O3" >&5
printf "%s\n" "$ax_cv_check_cflags___O3" >&6; }
if test "x$ax_cv_check_cflags___O3" = xyes
then :
CFLAGS="$CFLAGS -O3"
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -O2" >&5
printf %s "checking whether C compiler accepts -O2... " >&6; }
if test ${ax_cv_check_cflags___O2+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -O2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___O2=yes
else $as_nop
ax_cv_check_cflags___O2=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___O2" >&5
printf "%s\n" "$ax_cv_check_cflags___O2" >&6; }
if test "x$ax_cv_check_cflags___O2" = xyes
then :
CFLAGS="$CFLAGS -O2"
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -O1" >&5
printf %s "checking whether C compiler accepts -O1... " >&6; }
if test ${ax_cv_check_cflags___O1+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -O1"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___O1=yes
else $as_nop
ax_cv_check_cflags___O1=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___O1" >&5
printf "%s\n" "$ax_cv_check_cflags___O1" >&6; }
if test "x$ax_cv_check_cflags___O1" = xyes
then :
CFLAGS="$CFLAGS -O1"
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -O" >&5
printf %s "checking whether C compiler accepts -O... " >&6; }
if test ${ax_cv_check_cflags___O+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -O"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___O=yes
else $as_nop
ax_cv_check_cflags___O=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___O" >&5
printf "%s\n" "$ax_cv_check_cflags___O" >&6; }
if test "x$ax_cv_check_cflags___O" = xyes
then :
CFLAGS="$CFLAGS -O"
else $as_nop
:
fi
fi
fi
fi
fi
fi
# Check whether --enable-ssp was given.
if test ${enable_ssp+y}
then :
@ -6869,46 +7072,6 @@ then :
if test "x$enableval" = "xyes"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Ofast" >&5
printf %s "checking whether C compiler accepts -Ofast... " >&6; }
if test ${ax_cv_check_cflags___Ofast+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Ofast"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___Ofast=yes
else $as_nop
ax_cv_check_cflags___Ofast=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Ofast" >&5
printf "%s\n" "$ax_cv_check_cflags___Ofast" >&6; }
if test "x$ax_cv_check_cflags___Ofast" = xyes
then :
CFLAGS="$CFLAGS -Ofast"
else $as_nop
:
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ftree-vectorize" >&5
printf %s "checking whether C compiler accepts -ftree-vectorize... " >&6; }
if test ${ax_cv_check_cflags___ftree_vectorize+y}
@ -7069,6 +7232,46 @@ else $as_nop
:
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mtune=native" >&5
printf %s "checking whether C compiler accepts -mtune=native... " >&6; }
if test ${ax_cv_check_cflags___mtune_native+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -mtune=native"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ax_cv_check_cflags___mtune_native=yes
else $as_nop
ax_cv_check_cflags___mtune_native=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mtune_native" >&5
printf "%s\n" "$ax_cv_check_cflags___mtune_native" >&6; }
if test "x$ax_cv_check_cflags___mtune_native" = xyes
then :
CFLAGS="$CFLAGS -mtune=native"
else $as_nop
:
fi
fi
@ -8458,8 +8661,6 @@ esac
fi
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -Wall" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -Wall" >&5
printf %s "checking whether C compiler accepts $CFLAGS -Wall... " >&6; }
@ -8502,16 +8703,16 @@ else $as_nop
:
fi
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -Wextra" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -Wextra" >&5
printf %s "checking whether C compiler accepts $CFLAGS -Wextra... " >&6; }
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -Wno-unknown-pragmas" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -Wno-unknown-pragmas" >&5
printf %s "checking whether C compiler accepts $CFLAGS -Wno-unknown-pragmas... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS $CFLAGS -Wextra"
CFLAGS="$CFLAGS $CFLAGS -Wno-unknown-pragmas"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@ -8539,12 +8740,14 @@ eval ac_res=\$$as_CACHEVAR
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
CWFLAGS="$CFLAGS -Wextra"
CFLAGS="$CFLAGS -Wno-unknown-pragmas"
else $as_nop
:
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang" >&5
printf %s "checking for clang... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -8555,7 +8758,7 @@ main (void)
{
#ifndef __clang__
#error Not clang
#error Not clang nor zig cc
#endif
;
@ -8616,6 +8819,90 @@ printf "%s\n" "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CWFLAGS -Wextra" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CWFLAGS -Wextra" >&5
printf %s "checking whether C compiler accepts $CWFLAGS -Wextra... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS $CWFLAGS -Wextra"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$as_CACHEVAR=yes"
else $as_nop
eval "$as_CACHEVAR=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
CWFLAGS="$WCFLAGS -Wextra"
else $as_nop
:
fi
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CWFLAGS -Warray-bounds" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CWFLAGS -Warray-bounds" >&5
printf %s "checking whether C compiler accepts $CWFLAGS -Warray-bounds... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
else $as_nop
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS $CWFLAGS -Warray-bounds"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
main (void)
{
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$as_CACHEVAR=yes"
else $as_nop
eval "$as_CACHEVAR=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
CWFLAGS="$CWFLAGS -Warray-bounds"
else $as_nop
:
fi
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CWFLAGS -Wbad-function-cast" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CWFLAGS -Wbad-function-cast" >&5
printf %s "checking whether C compiler accepts $CWFLAGS -Wbad-function-cast... " >&6; }
@ -9905,6 +10192,8 @@ size_t i;
signal(SIGSEGV, sig);
signal(SIGBUS, sig);
#if !defined(__SANITIZE_ADDRESS__) && !defined(__EMSCRIPTEN__)
*((volatile unsigned char *) -1) = 0xd0;
*((volatile unsigned char *) 1) = 0xd0;
for (i = 0; i < 10000000; i += 1024) { x[-i] = x[i] = (unsigned char) i; }
#endif
free((void *) x);
@ -20630,6 +20919,12 @@ then :
printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
fi
if test "x$WASI" = "x"
@ -20646,6 +20941,12 @@ if test "x$ac_cv_func_explicit_bzero" = xyes
then :
printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "memset_explicit" "ac_cv_func_memset_explicit"
if test "x$ac_cv_func_memset_explicit" = xyes
then :
printf "%s\n" "#define HAVE_MEMSET_EXPLICIT 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
if test "x$ac_cv_func_explicit_memset" = xyes