diff options
| author | June McEnroe <june@causal.agency> | 2026-06-01 14:38:30 -0400 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2026-06-01 14:38:30 -0400 |
| commit | ea9a686c1d3f4d7e8e80a907629149ce79b1964a (patch) | |
| tree | 3bdfd8bbfc03aea5816109a1919fc39177f13885 | |
| parent | Import LibreSSL 3.8.2 (diff) | |
| download | libretls-ea9a686c1d3f4d7e8e80a907629149ce79b1964a.tar.gz libretls-ea9a686c1d3f4d7e8e80a907629149ce79b1964a.zip | |
Import LibreSSL 3.8.3
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | compat/posix_win.c | 4 | ||||
| -rw-r--r--[-rwxr-xr-x] | include/compat/pthread.h | 13 | ||||
| -rw-r--r-- | include/compat/stdio.h | 2 | ||||
| -rw-r--r-- | m4/check-libc.m4 | 3 | ||||
| -rw-r--r-- | m4/check-os-options.m4 | 2 |
6 files changed, 17 insertions, 9 deletions
diff --git a/VERSION b/VERSION index 0418bab..596e8ad 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -3.8.2 +3.8.3 diff --git a/compat/posix_win.c b/compat/posix_win.c index b3a4687..3e78a07 100644 --- a/compat/posix_win.c +++ b/compat/posix_win.c @@ -9,8 +9,8 @@ #define NO_REDEF_POSIX_FUNCTIONS -#include <windows.h> #include <ws2tcpip.h> +#include <windows.h> #include <errno.h> #include <fcntl.h> @@ -164,8 +164,10 @@ static void noop_handler(const wchar_t *expression, const wchar_t *function, } #define BEGIN_SUPPRESS_IPH \ + int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \ _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler) #define END_SUPPRESS_IPH \ + _CrtSetReportMode(_CRT_ASSERT, old_report_mode); \ _set_thread_local_invalid_parameter_handler(old_handler) #else diff --git a/include/compat/pthread.h b/include/compat/pthread.h index 1ab011c..8211dda 100755..100644 --- a/include/compat/pthread.h +++ b/include/compat/pthread.h @@ -30,20 +30,25 @@ struct pthread_once { }; typedef struct pthread_once pthread_once_t; +struct _pthread_win32_cb_arg { + void (*cb)(void); +}; + static inline BOOL CALLBACK _pthread_once_win32_cb(PINIT_ONCE once, PVOID param, PVOID *context) { - void (*cb) (void) = param; - cb(); + struct _pthread_win32_cb_arg *arg = param; + arg->cb(); return TRUE; } static inline int pthread_once(pthread_once_t *once, void (*cb) (void)) { - BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, cb, NULL); + struct _pthread_win32_cb_arg arg = { .cb = cb }; + BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, &arg, NULL); if (rc == 0) - return -1; + return EINVAL; else return 0; } diff --git a/include/compat/stdio.h b/include/compat/stdio.h index d5725c9..1874aa5 100644 --- a/include/compat/stdio.h +++ b/include/compat/stdio.h @@ -42,7 +42,7 @@ int posix_rename(const char *oldpath, const char *newpath); #define rename(oldpath, newpath) posix_rename(oldpath, newpath) #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 #define snprintf _snprintf #endif diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index dc8d6bd..50fb8e1 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 @@ -9,7 +9,7 @@ AC_HEADER_RESOLV # Check for general libc functions AC_CHECK_FUNCS([asprintf freezero memmem]) AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) -AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) +AC_CHECK_FUNCS([strcasecmp strlcat strlcpy strndup strnlen strsep strtonum]) AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) AC_CHECK_FUNCS([getopt getprogname syslog syslog_r]) AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ @@ -30,6 +30,7 @@ AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) AM_CONDITIONAL([HAVE_RECALLOCARRAY], [test "x$ac_cv_func_recallocarray" = xyes]) +AM_CONDITIONAL([HAVE_STRCASECMP], [test "x$ac_cv_func_strcasecmp" = xyes]) AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes]) AM_CONDITIONAL([HAVE_STRLCPY], [test "x$ac_cv_func_strlcpy" = xyes]) AM_CONDITIONAL([HAVE_STRNDUP], [test "x$ac_cv_func_strndup" = xyes]) diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index c73709d..77edd14 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 @@ -22,7 +22,7 @@ case $host_os in # Don't use arc4random on systems before 10.12 because of # weak seed on failure to open /dev/random, based on latest # public source: - # http://www.opensource.apple.com/source/Libc/Libc-997.90.3/gen/FreeBSD/arc4random.c + # https://www.opensource.apple.com/source/Libc/Libc-997.90.3/gen/FreeBSD/arc4random.c # # We use the presence of getentropy() to detect 10.12. The # following check take into account that: |