[Pkg-gnupg-commit] [libassuan] 126/437: Avoid warnings about unknown pragmas.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 86aed4c8947923a8b8155cd7e21176fe2feba216
Author: Werner Koch <wk at gnupg.org>
Date: Fri Nov 26 16:18:00 2004 +0000
Avoid warnings about unknown pragmas.
---
src/ChangeLog | 4 ++++
src/assuan-defs.h | 8 +++++---
src/assuan-io.c | 14 ++++++++------
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 12c6293..aa2844a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-26 Werner Koch <wk at g10code.com>
+
+ * assuan-io.c [_WIN32]: Avoid warnings about unknown pragmas.
+
2004-11-24 Werner Koch <wk at g10code.com>
* assuan-logging.c (_assuan_log_printf): New.
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index 80818e9..48463b3 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -40,7 +40,7 @@
#ifdef _WIN32
#define AF_LOCAL AF_UNIX
-/* we need to prefix the structure with a sockaddr_in header so we can
+/* We need to prefix the structure with a sockaddr_in header so we can
use it later for sendto and recvfrom. */
struct sockaddr_un
{
@@ -50,9 +50,11 @@ struct sockaddr_un
char sun_path[108-2-4]; /* Path name. */
};
-typedef int ssize_t;
+/* Not needed anymore because the current mingw32 defines this in
+ sys/types.h */
+/* typedef int ssize_t; */
-/* missing W32 functions */
+/* Missing W32 functions */
int putc_unlocked (int c, FILE *stream);
void * memrchr (const void *block, int c, size_t size);
char * stpcpy (char *dest, const char *src);
diff --git a/src/assuan-io.c b/src/assuan-io.c
index aea327a..cb7971a 100644
--- a/src/assuan-io.c
+++ b/src/assuan-io.c
@@ -28,29 +28,31 @@
extern ssize_t pth_read (int fd, void *buffer, size_t size);
extern ssize_t pth_write (int fd, const void *buffer, size_t size);
+#ifndef _WIN32
#pragma weak pth_read
#pragma weak pth_write
+#endif
ssize_t
_assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
{
- #ifndef _WIN32
+#ifndef _WIN32
return (pth_read ? pth_read : read) (ctx->inbound.fd, buffer, size);
- #else
+#else
return pth_read ? pth_read (ctx->inbound.fd, buffer, size)
: recv (ctx->inbound.fd, buffer, size, 0);
- #endif
+#endif
}
ssize_t
_assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
{
- #ifndef _WIN32
+#ifndef _WIN32
return (pth_write ? pth_write : write) (ctx->outbound.fd, buffer, size);
- #else
+#else
return pth_write ? pth_write (ctx->outbound.fd, buffer, size)
: send (ctx->outbound.fd, buffer, size, 0);
- #endif
+#endif
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list