configure.ac                                    |    2 
 external/libassuan/ExternalProject_libassuan.mk |    1 
 external/libassuan/UnpackedTarball_libassuan.mk |    1 
 external/libassuan/w32-stdc.patch               |   74 ++++++++++++++++++++++++
 4 files changed, 77 insertions(+), 1 deletion(-)

New commits:
commit 7ab2c2bf6de922060f8d95c2fbf0b208d66fc7a3
Author:     Aron Budea <[email protected]>
AuthorDate: Thu May 30 21:24:11 2024 +0200
Commit:     Aron Budea <[email protected]>
CommitDate: Thu May 30 21:24:11 2024 +0200

    Bump version to 7.1.8.1.M7
    
    Change-Id: Ic65717343b8be6e016871b1e90769db2d4491da9

diff --git a/configure.ac b/configure.ac
index 77405709ee0a..d6157c2dee9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[7.1.8.1.M6],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.1.8.1.M7],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 1f683fe50fe0e850a7a978228a71c84356b38cf6
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Fri Apr 22 21:52:50 2022 +0200
Commit:     Aron Budea <[email protected]>
CommitDate: Thu May 30 21:20:48 2024 +0200

    external/libassuan: Fix fallout of defining __STDC__ on Windows
    
    ...since 1bb0e177124d5d6661b72df6c7d848fb23639652 "Fix autoconf>=2.70
    gcc-wrapper breakage", which had the side effect of preventing various
    deprecated function declarations in system headers (e.g., isascii in 
addition to
    __isascii).  This went unnoticed so far due to the traditionally lax 
handling of
    missing function declarations in C, and only now started to cause
    
    > conversion.c(94,9): error: call to undeclared function 'isascii'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
    >           if ((isascii (*istr) && isprint (*istr)) || (*istr >= 0x80))
    >                ^
    
    etc. with clang-cl 15 trunk after
    
<https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626>
    "[C11/C2x] Change the behavior of the implicit function declaration 
warning".
    
    Where undeclared functions have been used in Windows-only code, they have 
been
    replaced with their __STDC__-declared counterparts, and for occurrences in
    shared code Windows-only macro definitions have been introduced (as would 
have
    done in the system headers too, if __STDC__ was not defined) to not clutter 
the
    shared code with #ifdefs.
    
    Also, for getpid (resp. _getpid), the #include <process.h> was apparently
    missing from the upstream code, even without our __STDC__ hack in
    external/libassuan/ExternalProject_libassuan.mk (but never caused errors 
until
    now, either).
    
    Change-Id: I7442394d0c6e633bca1f6c7331d7ee51651179a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133339
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 8279d89d6e037def78f50c72fab2116ca56bef52)

diff --git a/external/libassuan/UnpackedTarball_libassuan.mk 
b/external/libassuan/UnpackedTarball_libassuan.mk
index 295b87d49677..3604fa36a395 100644
--- a/external/libassuan/UnpackedTarball_libassuan.mk
+++ b/external/libassuan/UnpackedTarball_libassuan.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libassuan, \
     $(if $(filter MSC,$(COM)),external/libassuan/w32-build-fixes.patch.1) \
     external/libassuan/w32-build-fixes-2.patch \
     $(if $(filter LINUX,$(OS)),external/libassuan/rpath.patch) \
+    external/libassuan/w32-stdc.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libassuan/w32-stdc.patch 
b/external/libassuan/w32-stdc.patch
new file mode 100644
index 000000000000..def3dea833af
--- /dev/null
+++ b/external/libassuan/w32-stdc.patch
@@ -0,0 +1,74 @@
+--- src/assuan-handler.c
++++ src/assuan-handler.c
+@@ -938,7 +938,7 @@
+ #if defined(HAVE_W32CE_SYSTEM)
+         fdarray[n++] = (void*)fileno (ctx->outbound.data.fp);
+ #elif defined(HAVE_W32_SYSTEM)
+-        fdarray[n++] = (void*)_get_osfhandle (fileno (ctx->outbound.data.fp));
++        fdarray[n++] = (void*)_get_osfhandle (_fileno 
(ctx->outbound.data.fp));
+ #else
+         fdarray[n++] = fileno (ctx->outbound.data.fp);
+ #endif
+--- src/assuan-logging.c
++++ src/assuan-logging.c
+@@ -30,10 +30,15 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include <winsock2.h>
+ # endif
++# include <process.h>
++# define getpid _getpid
+ # include <windows.h>
+ #endif /*HAVE_W32_SYSTEM*/
+ #include <errno.h>
+ #include <ctype.h>
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ 
+--- src/assuan-pipe-connect.c
++++ src/assuan-pipe-connect.c
+@@ -47,6 +47,8 @@
+ # ifdef HAVE_WINSOCK2_H
+ #  include <winsock2.h>
+ # endif
++# include <process.h>
++# define getpid _getpid
+ # include <windows.h>
+ #endif
+ 
+--- src/assuan-socket.c
++++ src/assuan-socket.c
+@@ -27,6 +27,8 @@
+ #include <stdlib.h>
+ #ifdef HAVE_W32_SYSTEM
+ # define WIN32_LEAN_AND_MEAN
++# include <process.h>
++# define getpid _getpid
+ # include <windows.h>
+ # include <wincrypt.h>
+ #ifndef HAVE_W32CE_SYSTEM
+--- src/conversion.c
++++ src/conversion.c
+@@ -27,6 +27,9 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <ctype.h>
++#if defined HAVE_W32_SYSTEM
++#define isascii __isascii
++#endif
+ 
+ #include "assuan-defs.h"
+ #include "debug.h"
+--- src/system-w32.c
++++ src/system-w32.c
+@@ -453,7 +453,7 @@
+ 
+   /* Dup stderr to /dev/null unless it is in the list of FDs to be
+      passed to the child. */
+-  fd = assuan_fd_from_posix_fd (fileno (stderr));
++  fd = assuan_fd_from_posix_fd (_fileno (stderr));
+   fdp = fd_child_list;
+   if (fdp)
+     {
commit 9c58a604bd1310ed579c9821f1c0f0de4672c192
Author:     Thorsten Behrens <[email protected]>
AuthorDate: Tue Dec 28 17:22:29 2021 +0100
Commit:     Aron Budea <[email protected]>
CommitDate: Thu May 30 21:20:32 2024 +0200

    Fix autoconf>=2.70 gcc-wrapper breakage
    
    Re-generated configure file gets confused & claims not finding C89-
    compatible compiler for gcc-wrapper-building libassuan with msvc
    underneath.
    
    Work-around the problem by telling toolchain right off that this
    _is_ a std c compliant compiler.
    
    Change-Id: I4fa23673b790bc70a9294951df545c27f5236f81
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127641
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <[email protected]>
    (cherry picked from commit 1bb0e177124d5d6661b72df6c7d848fb23639652)

diff --git a/external/libassuan/ExternalProject_libassuan.mk 
b/external/libassuan/ExternalProject_libassuan.mk
index e4e24aeac7fd..b55ffed5116d 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -31,6 +31,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): 
$(call gb_Executabl
                --disable-shared \
                --disable-doc \
                $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+               CFLAGS="$(CFLAGS) -D__STDC__=1" \
                CXXFLAGS="$(CXXFLAGS)" \
                GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
                GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \

Reply via email to