diff -ur libgpg-error.org/src/estream.c libgpg-error/src/estream.c --- src/estream.c 2016-11-16 13:22:03.000000000 +0100 +++ src/estream.c~ 2017-02-19 17:53:15.010869000 +0100 @@ -74,12 +74,16 @@ # include #endif #include -#include +/*#include */ #include #include #include #include -#include +#ifdef _WIN32 +# include +#else +# include +#endif #include #include #include @@ -109,6 +113,15 @@ #ifdef HAVE_W32_SYSTEM +# ifndef S_IRUSR +# define S_IRUSR _S_IREAD +# endif +# ifndef S_IWUSR +# define S_IWUSR _S_IWRITE +# endif +# ifndef S_IXUSR +# define S_IXUSR 0x00400000 +# endif # ifndef S_IRGRP # define S_IRGRP S_IRUSR # endif diff -ur libgpg-error.org/src/estream-printf.c libgpg-error/src/estream-printf.c --- src/estream-printf.c 2016-12-02 22:51:19.000000000 +0100 +++ src/estream-printf.c~ 2017-02-19 18:02:52.239383500 +0100 @@ -85,7 +85,11 @@ #include #include #include -#include +#ifdef _WIN32 +# include +#else +# include +#endif #include #include #include --- src/mkheader.c 2016-11-16 13:22:03.000000000 +0100 +++ src/mkheader.c~ 2017-02-19 17:35:32.172009000 +0100 @@ -16,7 +16,11 @@ #include #include #include -#include +#ifdef _WIN32 +# include +#else +# include +#endif #define PGM "mkheader" @@ -402,12 +406,20 @@ repl_flag = !!strchr (name, '&'); incfname = mk_include_name (name, repl_flag? host_triplet : NULL); +#ifdef _WIN32 + rc = _access (incfname, 04); +#else rc = access (incfname, R_OK); +#endif if (rc && repl_flag) { free (incfname); incfname = mk_include_name (name, host_os); +#ifdef _WIN32 + rc = _access (incfname, 04); +#else rc = access (incfname, R_OK); +#endif } if (!rc) include_file (fname, lnr, name, outf); diff -ur libgpg-error.org/src/w32-estream.c libgpg-error/src/w32-estream.c --- src/w32-estream.c 2016-11-16 13:22:03.000000000 +0100 +++ src/w32-estream.c~ 2017-02-19 17:37:35.879037500 +0100 @@ -42,6 +42,11 @@ #include "gpgrt-int.h" +#ifdef _WIN32 +/* no ssize_t in windows std headers, emulate for native build */ +typedef SSIZE_T ssize_t; +#endif + /* * In order to support es_poll on Windows, we create a proxy shim that * we use as the estream I/O functions. This shim creates reader and --- src/spawn-w32.c 2019-08-22 12:30:38.000000000 +0200 +++ src/spawn-w32.c~ 2020-05-26 01:37:17.759077700 +0200 @@ -34,7 +34,11 @@ #ifdef HAVE_SIGNAL_H # include #endif -#include +#ifdef _WIN32 +# include +#else +# include +#endif #include #ifdef HAVE_STAT # include ollabora/co-24.04.4'>distro/collabora/co-24.04.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff