[svn] assuan - r299 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Tue Sep 1 16:42:17 CEST 2009
Author: marcus
Date: 2009-09-01 16:42:17 +0200 (Tue, 01 Sep 2009)
New Revision: 299
Modified:
trunk/src/ChangeLog
trunk/src/assuan-defs.h
trunk/src/assuan.h
Log:
2009-09-01 Marcus Brinkmann <marcus at g10code.de>
* assuan.h (ASSUAN_INT2FD, ASSUAN_FD2INT): Remove macros.
* assuan-defs.h (DIMof): Remove macro.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2009-09-01 14:41:00 UTC (rev 298)
+++ trunk/src/ChangeLog 2009-09-01 14:42:17 UTC (rev 299)
@@ -1,5 +1,8 @@
2009-09-01 Marcus Brinkmann <marcus at g10code.de>
+ * assuan.h (ASSUAN_INT2FD, ASSUAN_FD2INT): Remove macros.
+ * assuan-defs.h (DIMof): Remove macro.
+
* setenv.c: Do not include "assuan-defs.h", instead redefine
setenv, unsetenv, clearenv in place.
* assuan-socket-server.c: Use _assuan_free instead of xfree.
Modified: trunk/src/assuan-defs.h
===================================================================
--- trunk/src/assuan-defs.h 2009-09-01 14:41:00 UTC (rev 298)
+++ trunk/src/assuan-defs.h 2009-09-01 14:42:17 UTC (rev 299)
@@ -47,13 +47,12 @@
};
-/* A structure to dispatch I/O functions. All these functions need to
- return 0 on success and set ERRNO on failure. */
+/* A structure to dispatch I/O functions. */
struct assuan_io
{
- /* Routine to read from input_fd. */
+ /* Routine to read from input_fd. Sets errno on failure. */
ssize_t (*readfnc) (assuan_context_t, void *, size_t);
- /* Routine to write to output_fd. */
+ /* Routine to write to output_fd. Sets errno on failure. */
ssize_t (*writefnc) (assuan_context_t, const void *, size_t);
/* Send a file descriptor. */
gpg_error_t (*sendfd) (assuan_context_t, assuan_fd_t);
@@ -75,7 +74,7 @@
/* Context specific flags (cf. assuan_flag_t). */
struct
{
- unsigned int no_waitpid:1; /* See ASSUAN_NO_WAITPID. */
+ unsigned int no_waitpid : 1; /* See ASSUAN_NO_WAITPID. */
} flags;
int confidential;
@@ -313,9 +312,7 @@
#endif
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
-#define DIMof(type,member) DIM(((type *)0)->member)
-
#if HAVE_W32_SYSTEM
#define SOCKET2HANDLE(s) ((void *)(s))
#define HANDLE2SOCKET(h) ((unsigned int)(h))
Modified: trunk/src/assuan.h
===================================================================
--- trunk/src/assuan.h 2009-09-01 14:41:00 UTC (rev 298)
+++ trunk/src/assuan.h 2009-09-01 14:42:17 UTC (rev 299)
@@ -243,13 +243,9 @@
#ifdef _WIN32
typedef void *assuan_fd_t;
#define ASSUAN_INVALID_FD ((void*)(-1))
-#define ASSUAN_INT2FD(s) ((void *)(s))
-#define ASSUAN_FD2INT(h) ((unsigned int)(h))
#else
typedef int assuan_fd_t;
#define ASSUAN_INVALID_FD (-1)
-#define ASSUAN_INT2FD(s) ((s))
-#define ASSUAN_FD2INT(h) ((h))
#endif
More information about the Gnupg-commits
mailing list