summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2007-07-04 19:57:47 +0000
committerMarcus Brinkmann <mb@g10code.com>2007-07-04 19:57:47 +0000
commitfc6a186038aea32cbcb622d732ea8a0f44a3f24b (patch)
tree7b123c225591ae70cf4f62211cd921d698c22650
parent9786fe23fd24159897df32d2b18f184a1f607791 (diff)
downloadlibassuan-fc6a186038aea32cbcb622d732ea8a0f44a3f24b.tar.gz
2007-07-04 Marcus Brinkmann <marcus@g10code.de>
Change _WIN32 to HAVE_W32_SYSTEM for consistency. * assuan-defs.h (struct assuan_context_s): Have full peercred structure even if not HAVE_SO_PEERCRED, but not if HAVE_W32_SYSTEM.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/assuan-connect.c4
-rw-r--r--src/assuan-defs.h8
-rw-r--r--src/assuan-io-pth.c4
-rw-r--r--src/assuan.h2
5 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 44f106b..959b5d4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-04 Marcus Brinkmann <marcus@g10code.de>
+
+ Change _WIN32 to HAVE_W32_SYSTEM for consistency.
+
+ * assuan-defs.h (struct assuan_context_s): Have full peercred
+ structure even if not HAVE_SO_PEERCRED, but not if
+ HAVE_W32_SYSTEM.
+
2007-06-18 Werner Koch <wk@g10code.com>
* assuan-logging.c (load_libgpg_error, _assuan_gpg_strerror_r)
diff --git a/src/assuan-connect.c b/src/assuan-connect.c
index e7f01bd..15fc51b 100644
--- a/src/assuan-connect.c
+++ b/src/assuan-connect.c
@@ -62,7 +62,7 @@ assuan_get_pid (assuan_context_t ctx)
/* Return user credentials. PID, UID and GID amy be gived as NULL if
you are not interested in this value. For getting the pid of the
peer the assuan_get_pid is usually better suited. */
-#ifndef _WIN32
+#ifndef HAVE_W32_SYSTEM
assuan_error_t
assuan_get_peercred (assuan_context_t ctx, pid_t *pid, uid_t *uid, gid_t *gid)
{
@@ -78,4 +78,4 @@ assuan_get_peercred (assuan_context_t ctx, pid_t *pid, uid_t *uid, gid_t *gid)
*gid = ctx->peercred.gid;
return 0;
}
-#endif /*_WIN32*/
+#endif /* HAVE_W32_SYSTEM */
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index 6f47454..33cdfa3 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -140,14 +140,14 @@ struct assuan_context_s
int listen_fd; /* The fd we are listening on (used by socket servers) */
int connected_fd; /* helper */
+#ifndef HAVE_W32_SYSTEM
struct {
- int valid; /* Whether this structure has valid information. */
-#ifdef HAVE_SO_PEERCRED
+ int valid; /* Whether this structure has valid information. */
pid_t pid; /* The pid of the peer. */
uid_t uid; /* The uid of the peer. */
gid_t gid; /* The gid of the peer. */
-#endif /*HAVE_SO_PEERCRED*/
} peercred;
+#endif /* HAVE_W32_SYSTEM */
/* Used for Unix domain sockets. */
struct sockaddr_un myaddr;
@@ -284,7 +284,7 @@ pid_t _assuan_waitpid (pid_t pid, int *status, int options);
ssize_t _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size);
ssize_t _assuan_simple_write (assuan_context_t ctx, const void *buffer,
size_t size);
-#ifdef _WIN32
+#ifdef HAVE_W32_SYSTEM
int _assuan_simple_sendmsg (assuan_context_t ctx, void *msg);
int _assuan_simple_recvmsg (assuan_context_t ctx, void *msg);
#else
diff --git a/src/assuan-io-pth.c b/src/assuan-io-pth.c
index 53840e5..d2d8fed 100644
--- a/src/assuan-io-pth.c
+++ b/src/assuan-io-pth.c
@@ -65,7 +65,7 @@ _assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
return pth_write (ctx->outbound.fd, buffer, size);
}
-#ifdef _WIN32
+#ifdef HAVE_W32_SYSTEM
int
_assuan_simple_sendmsg (assuan_context_t ctx, void *msg)
#else
@@ -106,7 +106,7 @@ _assuan_simple_sendmsg (assuan_context_t ctx, struct msghdr *msg)
#endif
}
-#ifdef _WIN32
+#ifdef HAVE_W32_SYSTEM
int
_assuan_simple_recvmsg (assuan_context_t ctx, void *msg)
#else
diff --git a/src/assuan.h b/src/assuan.h
index 6343ae9..fe01a9f 100644
--- a/src/assuan.h
+++ b/src/assuan.h
@@ -425,7 +425,7 @@ assuan_error_t assuan_socket_connect_ext (assuan_context_t *ctx,
/*-- assuan-connect.c --*/
void assuan_disconnect (assuan_context_t ctx);
pid_t assuan_get_pid (assuan_context_t ctx);
-#ifndef _WIN32
+#ifndef HAVE_W32_SYSTEM
assuan_error_t assuan_get_peercred (assuan_context_t ctx,
pid_t *pid, uid_t *uid, gid_t *gid);
#endif