Bump version to 24.04.3.4
[LibreOffice.git] / external / libgpg-error / w32-build-fixes-5.patch
blob80d52f720e13bff6ffc4bed1331719afdb4c2a04
1 --- src/argparse.c 2021-11-03 13:44:56.000000000 +0100
2 +++ src/argparse.c~ 2022-01-03 17:05:23.418077200 +0100
3 @@ -33,8 +33,12 @@
4 #include <stdarg.h>
5 #include <limits.h>
6 #include <errno.h>
7 -#include <unistd.h>
8 #include <time.h>
9 +#ifdef _WIN32
10 +# define R_OK 04
11 +# define strncasecmp _strnicmp
12 +# define strcasecmp _stricmp
13 +#endif
15 #include "gpgrt-int.h"
17 --- src/gpg-error.c 2022-03-04 20:25:28.000000000 +0900
18 +++ src/gpg-error.c~ 2023-08-30 15:10:24.521856169 +0900
19 @@ -61,6 +61,11 @@
20 #define drop_locale_dir(dir)
21 #endif
23 +#ifdef _WIN32
24 +# define strncasecmp _strnicmp
25 +# define strcasecmp _stricmp
26 +#endif
28 static void
29 i18n_init (void)
31 --- src/spawn-w32.c 2023-08-30 15:24:46.861855840 +0900
32 +++ src/spawn-w32.c~ 2023-08-30 15:26:04.581855810 +0900
33 @@ -56,7 +56,7 @@
34 * Previous versions interpreted X_OK as F_OK anyway, so we'll just
35 * use F_OK directly. */
36 #undef X_OK
37 -#define X_OK F_OK
38 +#define X_OK 0
40 /* For HANDLE and the internal file descriptor (fd) of this module:
41 * HANDLE can be represented by an intptr_t which should be true for
43 --- src/logging.c 2023-03-21 18:33:56.000000000 +0900
44 +++ src/logging.c~ 2023-08-30 15:37:20.661855553 +0900
45 @@ -44,7 +44,12 @@
46 # include <netinet/in.h>
47 # include <arpa/inet.h>
48 #endif /*!HAVE_W32_SYSTEM*/
49 -#include <unistd.h>
50 +#ifdef _WIN32
51 +# include <io.h>
52 +# include <process.h>
53 +#else
54 +# include <unistd.h>
55 +#endif
56 #include <fcntl.h>
57 /* #include <execinfo.h> */
59 @@ -53,6 +58,15 @@
62 #ifdef HAVE_W32_SYSTEM
63 +# ifndef S_IRUSR
64 +# define S_IRUSR _S_IREAD
65 +# endif
66 +# ifndef S_IWUSR
67 +# define S_IWUSR _S_IWRITE
68 +# endif
69 +# ifndef S_IXUSR
70 +# define S_IXUSR 0x00400000
71 +# endif
72 # ifndef S_IRWXG
73 # define S_IRGRP S_IRUSR
74 # define S_IWGRP S_IWUSR
75 --- src/Makefile.am 2022-08-19 17:39:54.000000000 +0900
76 +++ src/Makefile.am~ 2023-08-30 15:41:10.371855465 +0900
77 @@ -208,8 +208,8 @@
78 # libgpg_error_la_DEPENDENCIES = \
79 # $(srcdir)/gpg-error.vers
81 -libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
82 -libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
83 +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=$(localelidir)
84 +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) -ladvapi32 $(LIBTHREAD)
86 gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
87 gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
88 --- src/Makefile.in 2023-08-30 14:44:01.102310369 +0900
89 +++ src/Makefile.in~ 2023-08-30 15:54:38.371855157 +0900
90 @@ -662,8 +662,8 @@
92 # libgpg_error_la_DEPENDENCIES = \
93 # $(srcdir)/gpg-error.vers
94 -libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
95 -libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
96 +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=$(localedir)
97 +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) -ladvapi32 $(LIBTHREAD)
98 gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
99 gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
100 -DLOCALEDIR=\"$(localedir)\"
101 --- src/sysutils.c 2023-03-21 18:33:56.000000000 +0900
102 +++ src/sysutils.c~ 2023-08-30 15:57:34.401855090 +0900
103 @@ -22,7 +22,12 @@
104 #include <stdlib.h>
105 #include <stdint.h>
106 #include <string.h>
107 -#include <unistd.h>
108 +#ifdef _WIN32
109 +# include <io.h>
110 +# define W_OK 02
111 +#else
112 +# include <unistd.h>
113 +#endif
114 #include <errno.h>
115 #ifdef HAVE_W32_SYSTEM
116 # include <windows.h>
117 --- src/visibility.c 2020-06-05 18:54:56.410442900 +0200
118 +++ src/visibility.c~ 2019-01-04 12:56:54.000000000 +0100
119 @@ -1067,11 +1067,7 @@
120 _gpgrt_log_assert (const char *expr, const char *file,
121 int line, const char *func)
123 -#ifdef GPGRT_HAVE_MACRO_FUNCTION
124 _gpgrt__log_assert (expr, file, line, func);
125 -#else
126 - _gpgrt__log_assert (expr, file, line);
127 -#endif
131 --- src/w32-add.h 2020-06-06 00:32:38.502203300 +0200
132 +++ src/w32-add.h~ 2018-12-07 14:48:19.000000000 +0100
133 @@ -65,3 +65,5 @@
134 char *gpgrt_w32_reg_query_string (const char *root,
135 const char *dir,
136 const char *name);
138 +wchar_t *utf8_to_wchar (const char *string, size_t length, size_t *retlen);
139 --- src/w32-gettext.c 2022-03-04 21:44:26.000000000 +0900
140 +++ src/w32-gettext.c~ 2023-08-30 16:01:12.861855006 +0900
141 @@ -1325,7 +1325,7 @@
142 is not defined. If LENGTH is zero and RETLEN NULL the function
143 assumes that STRING is a nul-terminated string and returns a
144 (wchar_t)0-terminated string. */
145 +wchar_t *
146 -static wchar_t *
147 utf8_to_wchar (const char *string, size_t length, size_t *retlen)
149 int n;