diff options
author | Werner Koch <[email protected]> | 2019-03-19 08:00:43 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-03-19 08:00:43 +0000 |
commit | e4f460d8e338d6866a6ab457dcd811c63399706a (patch) | |
tree | 2ee1bcaf0d8d023f3430980a56a72c43751e3855 | |
parent | syscfg: Add armv7a-unknown-linux-gnueabihf as an alias. (diff) | |
download | libgpg-error-e4f460d8e338d6866a6ab457dcd811c63399706a.tar.gz libgpg-error-e4f460d8e338d6866a6ab457dcd811c63399706a.zip |
estream: Increase buffer size for Windows.
* src/gpgrt-int.h (BUFFER_BLOCK_SIZE) [W32]: Increase from 512 to 8k.
* src/w32-estream.c (READBUF_SIZE, WRITEBUF_SIZE): Increase from 4k to
8k.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | doc/errorref.txt | 1 | ||||
-rw-r--r-- | src/gpgrt-int.h | 8 | ||||
-rw-r--r-- | src/logging.c | 2 | ||||
-rw-r--r-- | src/w32-estream.c | 4 |
4 files changed, 11 insertions, 4 deletions
diff --git a/doc/errorref.txt b/doc/errorref.txt index e62fe15..997c800 100644 --- a/doc/errorref.txt +++ b/doc/errorref.txt @@ -596,6 +596,7 @@ GPG_ERR_INV_CERT_OBJ Invalid certificate object GPGME: - A bad certificate (gpgme_key_t) has been passed to a function. For example it might be incomplete due to a missing fingerprint. + GNUPG: - A certificate has a length of zero. GPG_ERR_UNKNOWN_NAME Unknown name diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h index c6188e1..a13f5fb 100644 --- a/src/gpgrt-int.h +++ b/src/gpgrt-int.h @@ -254,7 +254,13 @@ typedef struct notify_list_s *notify_list_t; * Buffer management layer. */ -#define BUFFER_BLOCK_SIZE BUFSIZ +/* BUFSIZ on Windows is 512 but on current Linux it is 8k. We better + * use the 8k for Windows as well. */ +#ifdef HAVE_W32_SYSTEM +# define BUFFER_BLOCK_SIZE 8192 +#else +# define BUFFER_BLOCK_SIZE BUFSIZ +#endif #define BUFFER_UNREAD_SIZE 16 diff --git a/src/logging.c b/src/logging.c index 86cf7c3..329982b 100644 --- a/src/logging.c +++ b/src/logging.c @@ -699,7 +699,7 @@ _gpgrt_log_get_stream () } -/* A fiter used with the fprintf_sf function to sanitize the args for +/* A filter used with the fprintf_sf function to sanitize the args for * "%s" format specifiers. */ static char * fmt_string_filter (const char *string, int no, void *opaque) diff --git a/src/w32-estream.c b/src/w32-estream.c index 9e33cdd..8ce9419 100644 --- a/src/w32-estream.c +++ b/src/w32-estream.c @@ -56,8 +56,8 @@ #define DIM(array) (sizeof (array) / sizeof (*array)) #endif -#define READBUF_SIZE 4096 -#define WRITEBUF_SIZE 4096 +#define READBUF_SIZE 8192 +#define WRITEBUF_SIZE 8192 typedef struct estream_cookie_w32_pollable *estream_cookie_w32_pollable_t; |