* gpgme.h: [_WIN32] Removed ssize_t typedef.
* ath.h: [_WIN32] Added some (dummy) types.
* io.h: [_WIN32] include stdio.h.
* data.h: [_WIN32] Define EOPNOTSUPP.
* w32-io.c [_WIN32] (_gpgme_io_subsystem_init): New.
* gpgme.c [_WIN32] (gpgme_set_locale): Disabled.
+2005-03-07 Timo Schulz <twoaday@g10code.de>
+
+ * gpgme.h: [_WIN32] Removed ssize_t typedef.
+ * ath.h: [_WIN32] Added some (dummy) types.
+ * io.h: [_WIN32] include stdio.h.
+ * data.h: [_WIN32] Define EOPNOTSUPP.
+ * w32-io.c [_WIN32] (_gpgme_io_subsystem_init): New.
+ * gpgme.c [_WIN32] (gpgme_set_locale): Disabled.
+
2004-12-12 Marcus Brinkmann <marcus@g10code.de>
* engine.c (_gpgme_set_engine_info): Fix assertion.
#endif
#include <unistd.h>
+#include <stdio.h>
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#else
#ifndef ATH_H
#define ATH_H
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
+#ifdef _WIN32
+struct msghdr { int dummy; };
+typedef int socklen_t;
+# include <windows.h>
+# include <io.h>
#else
-# include <sys/time.h>
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# else
+# include <sys/time.h>
+# endif
+# include <sys/types.h>
+# include <sys/socket.h>
#endif
-#include <sys/types.h>
-#include <sys/socket.h>
+
\f
/* Define _ATH_EXT_SYM_PREFIX if you want to give all external symbols
#include "gpgme.h"
+#ifdef _WIN32
+# define EOPNOTSUPP 95
+#endif
+
\f
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle DH. Return the number of characters read, 0 on EOF and
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifndef _WIN32
#if HAVE_CONFIG_H
#include <config.h>
#endif
gpgsm_io_event,
gpgsm_cancel
};
+#endif
gpgme_error_t
gpgme_set_locale (gpgme_ctx_t ctx, int category, const char *value)
{
+#ifndef _WIN32
int failed = 0;
char *new_lc_ctype;
char *new_lc_messages;
SET_ONE_LOCALE (messages, MESSAGES);
if (!ctx)
UNLOCK (def_lc_lock);
-
+#endif
+
return 0;
}
typedef long ssize_t;
#else
# include <sys/types.h>
-#ifdef _WIN32
-typedef long ssize_t;
-#endif
#endif
#ifdef __cplusplus
#ifndef IO_H
#define IO_H
+#ifdef _WIN32
+#include <stdio.h>
+#endif
+
/* A single file descriptor passed to spawn. For child fds, dup_to
specifies the fd it should become in the child. */
struct spawn_fd_item_s
#include "util.h"
#include "sema.h"
#include "io.h"
-
+#include "debug.h"
/* We assume that a HANDLE can be represented by an int which should
be true for all i386 systems (HANDLE is defined as void *) and
*/
any = 0;
for (i=code - WAIT_OBJECT_0; i < nwait; i++ ) {
- if (WaitForSingleObject ( waitbuf[i], NULL ) == WAIT_OBJECT_0) {
+ if (WaitForSingleObject (waitbuf[i], 0) == WAIT_OBJECT_0) {
assert (waitidx[i] >=0 && waitidx[i] < nfds);
fds[waitidx[i]].signaled = 1;
any = 1;
return count;
}
+
+void
+_gpgme_io_subsystem_init (void)
+{
+
+}
+
+
#include "util.h"
#include "sema.h"
+#include "debug.h"
static void
sema_fatal (const char *text)
#include "util.h"
#include "sema.h"
+#include "debug.h"
DEFINE_STATIC_LOCK (get_path_lock);
LOCK (get_path_lock);
if (!gpg_program)
- gpg_program = find_program_in_registry ("gpgProgram");
+ gpg_program = (char*)find_program_in_registry ("gpgProgram");
#ifdef GPG_PATH
if (!gpg_program)
gpg_program = GPG_PATH;
LOCK (get_path_lock);
if (!gpgsm_program)
- gpgsm_program = find_program_in_registry ("gpgsmProgram");
+ gpgsm_program = (char*)find_program_in_registry ("gpgsmProgram");
#ifdef GPGSM_PATH
if (!gpgsm_program)
gpgsm_program = GPGSM_PATH;