gpgme/gpgme (11 files)

cvs user twoaday cvs at cvs.gnupg.org
Wed Mar 9 12:34:38 CET 2005


    Date: Wednesday, March 9, 2005 @ 12:47:21
  Author: twoaday
    Path: /cvs/gpgme/gpgme/gpgme

Modified: ChangeLog ath-compat.c ath.h data.h engine-gpgsm.c gpgme.c
          gpgme.h io.h w32-io.c w32-sema.c w32-util.c

2005-03-07  Timo Schulz  <twoaday at 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.


----------------+
 ChangeLog      |    9 +++++++++
 ath-compat.c   |    1 +
 ath.h          |   18 +++++++++++++-----
 data.h         |    4 ++++
 engine-gpgsm.c |    2 ++
 gpgme.c        |    4 +++-
 gpgme.h        |    3 ---
 io.h           |    4 ++++
 w32-io.c       |   12 ++++++++++--
 w32-sema.c     |    1 +
 w32-util.c     |    5 +++--
 11 files changed, 50 insertions(+), 13 deletions(-)


Index: gpgme/gpgme/ChangeLog
diff -u gpgme/gpgme/ChangeLog:1.390 gpgme/gpgme/ChangeLog:1.391
--- gpgme/gpgme/ChangeLog:1.390	Sun Dec 12 15:58:12 2004
+++ gpgme/gpgme/ChangeLog	Wed Mar  9 12:47:20 2005
@@ -1,3 +1,12 @@
+2005-03-07  Timo Schulz  <twoaday at 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 at g10code.de>
 
 	* engine.c (_gpgme_set_engine_info): Fix assertion.
Index: gpgme/gpgme/ath-compat.c
diff -u gpgme/gpgme/ath-compat.c:1.4 gpgme/gpgme/ath-compat.c:1.5
--- gpgme/gpgme/ath-compat.c:1.4	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/ath-compat.c	Wed Mar  9 12:47:21 2005
@@ -23,6 +23,7 @@
 #endif
 
 #include <unistd.h>
+#include <stdio.h>
 #ifdef HAVE_SYS_SELECT_H
 # include <sys/select.h>
 #else
Index: gpgme/gpgme/ath.h
diff -u gpgme/gpgme/ath.h:1.7 gpgme/gpgme/ath.h:1.8
--- gpgme/gpgme/ath.h:1.7	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/ath.h	Wed Mar  9 12:47:21 2005
@@ -21,13 +21,21 @@
 #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>
+
 
 
 /* Define _ATH_EXT_SYM_PREFIX if you want to give all external symbols
Index: gpgme/gpgme/data.h
diff -u gpgme/gpgme/data.h:1.6 gpgme/gpgme/data.h:1.7
--- gpgme/gpgme/data.h:1.6	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/data.h	Wed Mar  9 12:47:21 2005
@@ -30,6 +30,10 @@
 
 #include "gpgme.h"
 
+#ifdef _WIN32
+# define EOPNOTSUPP      95
+#endif
+
 
 /* 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
Index: gpgme/gpgme/engine-gpgsm.c
diff -u gpgme/gpgme/engine-gpgsm.c:1.102 gpgme/gpgme/engine-gpgsm.c:1.103
--- gpgme/gpgme/engine-gpgsm.c:1.102	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/engine-gpgsm.c	Wed Mar  9 12:47:21 2005
@@ -19,6 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    02111-1307, USA.  */
 
+#ifndef _WIN32
 #if HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -1596,3 +1597,4 @@
     gpgsm_io_event,
     gpgsm_cancel
   };
+#endif
Index: gpgme/gpgme/gpgme.c
diff -u gpgme/gpgme/gpgme.c:1.78 gpgme/gpgme/gpgme.c:1.79
--- gpgme/gpgme/gpgme.c:1.78	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/gpgme.c	Wed Mar  9 12:47:21 2005
@@ -344,6 +344,7 @@
 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;
@@ -397,7 +398,8 @@
   SET_ONE_LOCALE (messages, MESSAGES);
   if (!ctx)
     UNLOCK (def_lc_lock);
-
+#endif
+  
   return 0;
 }
 
Index: gpgme/gpgme/gpgme.h
diff -u gpgme/gpgme/gpgme.h:1.151 gpgme/gpgme/gpgme.h:1.152
--- gpgme/gpgme/gpgme.h:1.151	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/gpgme.h	Wed Mar  9 12:47:21 2005
@@ -38,9 +38,6 @@
   typedef long ssize_t;
 #else
 # include <sys/types.h>
-#ifdef _WIN32
-typedef long ssize_t;
-#endif
 #endif
 
 #ifdef __cplusplus
Index: gpgme/gpgme/io.h
diff -u gpgme/gpgme/io.h:1.12 gpgme/gpgme/io.h:1.13
--- gpgme/gpgme/io.h:1.12	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/io.h	Wed Mar  9 12:47:21 2005
@@ -22,6 +22,10 @@
 #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
Index: gpgme/gpgme/w32-io.c
diff -u gpgme/gpgme/w32-io.c:1.30 gpgme/gpgme/w32-io.c:1.31
--- gpgme/gpgme/w32-io.c:1.30	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/w32-io.c	Wed Mar  9 12:47:21 2005
@@ -37,7 +37,7 @@
 #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
@@ -1064,7 +1064,7 @@
          */
         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;
@@ -1116,3 +1116,11 @@
     
     return count;
 }
+
+void
+_gpgme_io_subsystem_init (void)
+{
+  
+}
+
+
Index: gpgme/gpgme/w32-sema.c
diff -u gpgme/gpgme/w32-sema.c:1.7 gpgme/gpgme/w32-sema.c:1.8
--- gpgme/gpgme/w32-sema.c:1.7	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/w32-sema.c	Wed Mar  9 12:47:21 2005
@@ -36,6 +36,7 @@
 
 #include "util.h"
 #include "sema.h"
+#include "debug.h"
 
 static void
 sema_fatal (const char *text)
Index: gpgme/gpgme/w32-util.c
diff -u gpgme/gpgme/w32-util.c:1.11 gpgme/gpgme/w32-util.c:1.12
--- gpgme/gpgme/w32-util.c:1.11	Tue Dec  7 22:13:36 2004
+++ gpgme/gpgme/w32-util.c	Wed Mar  9 12:47:21 2005
@@ -37,6 +37,7 @@
 
 #include "util.h"
 #include "sema.h"
+#include "debug.h"
 
 DEFINE_STATIC_LOCK (get_path_lock);
 
@@ -119,7 +120,7 @@
 
   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;
@@ -135,7 +136,7 @@
 
   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;




More information about the Gnupg-commits mailing list