summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/logging.c8
-rw-r--r--dirmngr/http.c13
-rw-r--r--dirmngr/server.c8
-rw-r--r--sm/certdump.c4
-rw-r--r--sm/server.c8
5 files changed, 21 insertions, 20 deletions
diff --git a/common/logging.c b/common/logging.c
index 54b8c8960..b7f141920 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -195,7 +195,7 @@ parse_portno (const char *str, unsigned short *r_port)
}
-static ssize_t
+static gpgrt_ssize_t
fun_writer (void *cookie_arg, const void *buffer, size_t size)
{
struct fun_cookie_s *cookie = cookie_arg;
@@ -391,11 +391,11 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size)
DWORD nwritten;
WriteFile ((HANDLE)cookie->fd, buffer, size, &nwritten, NULL);
- return (ssize_t)size; /* Okay. */
+ return (gpgrt_ssize_t)size; /* Okay. */
}
#endif
if (!writen (cookie->fd, buffer, size, cookie->is_socket))
- return (ssize_t)size; /* Okay. */
+ return (gpgrt_ssize_t)size; /* Okay. */
}
if (!running_detached && cookie->fd != -1
@@ -415,7 +415,7 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size)
log_socket = -1;
}
- return (ssize_t)size;
+ return (gpgrt_ssize_t)size;
}
diff --git a/dirmngr/http.c b/dirmngr/http.c
index 02854e46d..d623f7eaa 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -169,8 +169,9 @@ static assuan_fd_t connect_server (const char *server, unsigned short port,
int *r_host_not_found);
static gpg_error_t write_server (int sock, const char *data, size_t length);
-static ssize_t cookie_read (void *cookie, void *buffer, size_t size);
-static ssize_t cookie_write (void *cookie, const void *buffer, size_t size);
+static gpgrt_ssize_t cookie_read (void *cookie, void *buffer, size_t size);
+static gpgrt_ssize_t cookie_write (void *cookie,
+ const void *buffer, size_t size);
static int cookie_close (void *cookie);
@@ -2415,7 +2416,7 @@ write_server (int sock, const char *data, size_t length)
/* Read handler for estream. */
-static ssize_t
+static gpgrt_ssize_t
cookie_read (void *cookie, void *buffer, size_t size)
{
cookie_t c = cookie;
@@ -2497,11 +2498,11 @@ cookie_read (void *cookie, void *buffer, size_t size)
c->content_length = 0;
}
- return nread;
+ return (gpgrt_ssize_t)nread;
}
/* Write handler for estream. */
-static ssize_t
+static gpgrt_ssize_t
cookie_write (void *cookie, const void *buffer_arg, size_t size)
{
const char *buffer = buffer_arg;
@@ -2550,7 +2551,7 @@ cookie_write (void *cookie, const void *buffer_arg, size_t size)
nwritten = size;
}
- return nwritten;
+ return (gpgrt_ssize_t)nwritten;
}
diff --git a/dirmngr/server.c b/dirmngr/server.c
index e08afd4a0..536354c2f 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -95,8 +95,8 @@ struct server_local_s
/* Cookie definition for assuan data line output. */
-static ssize_t data_line_cookie_write (void *cookie,
- const void *buffer, size_t size);
+static gpgrt_ssize_t data_line_cookie_write (void *cookie,
+ const void *buffer, size_t size);
static int data_line_cookie_close (void *cookie);
static es_cookie_io_functions_t data_line_cookie_functions =
{
@@ -210,14 +210,14 @@ data_line_write (assuan_context_t ctx, const void *buffer_arg, size_t size)
/* A write handler used by es_fopencookie to write assuan data
lines. */
-static ssize_t
+static gpgrt_ssize_t
data_line_cookie_write (void *cookie, const void *buffer, size_t size)
{
assuan_context_t ctx = cookie;
if (data_line_write (ctx, buffer, size))
return -1;
- return (ssize_t)size;
+ return (gpgrt_ssize_t)size;
}
diff --git a/sm/certdump.c b/sm/certdump.c
index f32a27cc5..0cc492af4 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -652,7 +652,7 @@ struct format_name_cookie
};
/* The writer function for the memory stream. */
-static ssize_t
+static gpgrt_ssize_t
format_name_writer (void *cookie, const void *buffer, size_t size)
{
struct format_name_cookie *c = cookie;
@@ -696,7 +696,7 @@ format_name_writer (void *cookie, const void *buffer, size_t size)
c->len += size;
p[c->len] = 0; /* Terminate string. */
- return (ssize_t)size;
+ return (gpgrt_ssize_t)size;
}
diff --git a/sm/server.c b/sm/server.c
index e47861b43..f0512efac 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -55,8 +55,8 @@ struct server_local_s {
/* Cookie definition for assuan data line output. */
-static ssize_t data_line_cookie_write (void *cookie,
- const void *buffer, size_t size);
+static gpgrt_ssize_t data_line_cookie_write (void *cookie,
+ const void *buffer, size_t size);
static int data_line_cookie_close (void *cookie);
static es_cookie_io_functions_t data_line_cookie_functions =
{
@@ -129,7 +129,7 @@ has_option (const char *line, const char *name)
/* A write handler used by es_fopencookie to write assuan data
lines. */
-static ssize_t
+static gpgrt_ssize_t
data_line_cookie_write (void *cookie, const void *buffer, size_t size)
{
assuan_context_t ctx = cookie;
@@ -140,7 +140,7 @@ data_line_cookie_write (void *cookie, const void *buffer, size_t size)
return -1;
}
- return size;
+ return (gpgrt_ssize_t)size;
}
static int