bump product version to 7.2.5.1
[LibreOffice.git] / external / libgpg-error / w32-build-fixes-5.patch
blob2633df9ee6c9c12a692eb9d4ec1df2539a263b30
1 --- src/gpg-error.c 2020-06-06 00:18:40.199791000 +0200
2 +++ src/gpg-error.c~ 2020-06-05 18:44:14.223182300 +0200
3 @@ -61,6 +61,11 @@
4 #define drop_locale_dir(dir)
5 #endif
7 +#ifdef _WIN32
8 +# define strncasecmp _strnicmp
9 +# define strcasecmp _stricmp
10 +#endif
12 static void
13 i18n_init (void)
15 --- src/logging.c 2020-06-05 18:58:59.254413200 +0200
16 +++ src/logging.c~ 2019-12-12 15:23:37.000000000 +0100
17 @@ -44,7 +44,11 @@
18 # include <netinet/in.h>
19 # include <arpa/inet.h>
20 #endif /*!HAVE_W32_SYSTEM*/
21 +#ifdef _WIN32
22 +# include <io.h>
23 +#else
24 +# include <unistd.h>
25 +#endif
26 -#include <unistd.h>
27 #include <fcntl.h>
28 /* #include <execinfo.h> */
30 @@ -57,6 +53,15 @@
33 #ifdef HAVE_W32_SYSTEM
34 +# ifndef S_IRUSR
35 +# define S_IRUSR _S_IREAD
36 +# endif
37 +# ifndef S_IWUSR
38 +# define S_IWUSR _S_IWRITE
39 +# endif
40 +# ifndef S_IXUSR
41 +# define S_IXUSR 0x00400000
42 +# endif
43 # ifndef S_IRWXG
44 # define S_IRGRP S_IRUSR
45 # define S_IWGRP S_IWUSR
46 --- src/Makefile.am 2020-06-06 01:01:31.931459300 +0200
47 +++ src/Makefile.am~ 2020-02-06 18:39:06.000000000 +0100
48 @@ -213,7 +213,7 @@
49 # without the extra_cppflags because they may include am -idirafter
50 # which is not supported by the RC compiler.
51 libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
52 +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) -ladvapi32 $(LIBTHREAD)
53 -libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
55 gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
56 gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
57 --- src/Makefile.in 2020-06-06 01:01:31.931459300 +0200
58 +++ src/Makefile.in~ 2020-02-06 18:39:06.000000000 +0100
59 @@ -659,7 +659,7 @@
60 # without the extra_cppflags because they may include am -idirafter
61 # which is not supported by the RC compiler.
62 libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
63 +libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) -ladvapi32 $(LIBTHREAD)
64 -libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
65 gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
66 gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
67 -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
68 --- src/spawn-w32.c 2020-06-05 18:47:05.807099200 +0200
69 +++ src/spawn-w32.c~ 2020-06-05 18:44:14.114035900 +0200
70 @@ -834,7 +834,11 @@
71 /* We don't use ENVP. */
72 (void)envp;
74 +#ifdef _WIN32
75 + if (_access (pgmname, 04))
76 +#else
77 if (access (pgmname, X_OK))
78 +#endif
79 return _gpg_err_code_from_syserror ();
81 /* Prepare security attributes. */
82 --- src/sysutils.c 2020-06-06 00:23:52.457265500 +0200
83 +++ src/sysutils.c~ 2019-12-12 15:23:37.000000000 +0100
84 @@ -22,7 +22,11 @@
85 #include <stdlib.h>
86 #include <stdint.h>
87 #include <string.h>
88 +#ifdef _WIN32
89 +# include <io.h>
90 +#else
91 +# include <unistd.h>
92 +#endif
93 -#include <unistd.h>
94 #include <errno.h>
95 #ifdef HAVE_W32_SYSTEM
96 # include <windows.h>
97 @@ -274,11 +270,12 @@
98 gpg_err_code_t
99 _gpgrt_mkdir (const char *name, const char *modestr)
101 +#ifdef _WIN32
102 -#ifdef HAVE_W32CE_SYSTEM
103 wchar_t *wname;
104 (void)modestr;
106 + size_t size;
107 + wname = utf8_to_wchar (name, -1, &size);
108 - wname = utf8_to_wchar (name);
109 if (!wname)
110 return _gpg_err_code_from_syserror ();
111 if (!CreateDirectoryW (wname, NULL))
112 --- src/visibility.c 2020-06-05 18:54:56.410442900 +0200
113 +++ src/visibility.c~ 2019-01-04 12:56:54.000000000 +0100
114 @@ -1067,11 +1067,7 @@
115 _gpgrt_log_assert (const char *expr, const char *file,
116 int line, const char *func)
118 -#ifdef GPGRT_HAVE_MACRO_FUNCTION
119 _gpgrt__log_assert (expr, file, line, func);
120 -#else
121 - _gpgrt__log_assert (expr, file, line);
122 -#endif
126 --- src/w32-add.h 2020-06-06 00:32:38.502203300 +0200
127 +++ src/w32-add.h~ 2018-12-07 14:48:19.000000000 +0100
128 @@ -65,3 +65,5 @@
129 char *gpgrt_w32_reg_query_string (const char *root,
130 const char *dir,
131 const char *name);
133 +wchar_t *utf8_to_wchar (const char *string, size_t length, size_t *retlen);
134 --- src/w32-gettext.c 2020-06-06 00:33:24.680341900 +0200
135 +++ src/w32-gettext.c~ 2020-06-05 18:44:14.254481700 +0200
136 @@ -1355,7 +1355,7 @@
137 string STRING. Caller must free this value. On failure returns
138 NULL. The result of calling this function with STRING set to NULL
139 is not defined. */
140 +wchar_t *
141 -static wchar_t *
142 utf8_to_wchar (const char *string, size_t length, size_t *retlen)
144 int n;