+2007-07-12 Werner Koch <wk@g10code.com>
+
+ * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
+ ERROR_BROKEN_PIPE to EPIPE.
+
2007-07-08 Marcus Brinkmann <marcus@g10code.de>
* assuan-defs.h (struct assuan_context_s): Have partial peercred
n = ReadFile ((HANDLE)ctx->inbound.fd, buffer, size, &nread, NULL);
if (!n)
{
- errno = EIO; /* FIXME: We should have a proper mapping. */
+ switch (GetLastError())
+ {
+ case ERROR_BROKEN_PIPE: errno = EPIPE; break;
+ default: errno = EIO;
+ }
n = -1;
}
else
n = WriteFile ((HANDLE)ctx->outbound.fd, buffer, size, &nwrite, NULL);
if (!n)
{
- errno = EIO; /* FIXME: We should have a proper mapping. */
+ switch (GetLastError ())
+ {
+ case ERROR_BROKEN_PIPE:
+ case ERROR_NO_DATA: errno = EPIPE; break;
+ default: errno = EIO; break;
+ }
n = -1;
}
else
./configure --enable-maintainer-mode --prefix=${w32root} \
--host=i586-mingw32msvc --build=${build} \
- --with-gpg-error-prefix=${w32root} --without-gpgsm \
+ --with-gpg-error-prefix=${w32root} \
--enable-shared --enable-static --enable-w32-glib \
PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
+2007-07-12 Werner Koch <wk@g10code.com>
+
+ * gpgme.texi (Library Version Check): Add remark that the socket
+ layer will get initialized.
+
2007-06-05 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Advanced Key Editing): New section.
version number. In either case, the function initializes some
sub-systems, and for this reason alone it must be invoked early in
your program, before you make use of the other functions in
-@acronym{GPGME}.
+@acronym{GPGME}.
+
+As a side effect for W32 based systems, the socket layer will get
+initialized.
+
If @var{required_version} is @code{NULL}, the function returns a
pointer to a statically allocated string containing the version number
+2007-07-12 Werner Koch <wk@g10code.com>
+
+ * version.c (do_subsystem_inits) [W32]: Make sure that the socket
+ system has been started.
+
2007-07-10 Marcus Brinkmann <marcus@g10code.de>
* priv-io.h (_gpgme_io_dup): New prototype.
AM_PATH_GPGME macro) check that this header matches the installed
library. Warning: Do not edit the next line. configure will do
that for you! */
-#define GPGME_VERSION "1.1.5-cvs1219"
+#define GPGME_VERSION "1.1.5-cvs1228"
\f
#include <string.h>
#include <limits.h>
#include <ctype.h>
+#ifdef HAVE_W32_SYSTEM
+#include <winsock2.h>
+#endif
#include "gpgme.h"
#include "priv-io.h"
must be done once at startup. We can not guarantee this using a
lock, though, because the semaphore subsystem needs to be
initialized itself before it can be used. So we expect that the
- user performs the necessary syncrhonization. */
+ user performs the necessary synchronization. */
static void
do_subsystem_inits (void)
{
_gpgme_io_subsystem_init ();
#ifdef HAVE_ASSUAN_H
assuan_set_assuan_err_source (GPG_ERR_SOURCE_GPGME);
-#endif
+#ifdef HAVE_W32_SYSTEM
+ /* We need to make sure that the sockets are initialized. */
+ {
+ WSADATA wsadat;
+
+ WSAStartup (0x202, &wsadat);
+ }
+#endif /*HAVE_W32_SYSTEM*/
+#endif /*HAVE_ASSUAN_H*/
done = 1;
}
+2007-07-12 Werner Koch <wk@g10code.com>
+
+ * gpgsm/t-support.h (init_gpgme) [W32]: Do not init the locales as
+ the constants are not available.
+
2007-02-26 Werner Koch <wk@g10code.com>
* gpg/t-verify.c (double_plaintext_sig): New.
gpgme_error_t err;
gpgme_check_version (NULL);
+#ifndef HAVE_W32_SYSTEM
setlocale (LC_ALL, "");
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
+#endif
err = gpgme_engine_check_version (proto);
fail_if_err (err);