2005-03-07 Timo Schulz <twoaday@g10code.de>
authorTimo Schulz <twoaday@freakmail.de>
Wed, 9 Mar 2005 11:47:21 +0000 (11:47 +0000)
committerTimo Schulz <twoaday@freakmail.de>
Wed, 9 Mar 2005 11:47:21 +0000 (11:47 +0000)
        * 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.

trunk/gpgme/ChangeLog
trunk/gpgme/ath-compat.c
trunk/gpgme/ath.h
trunk/gpgme/data.h
trunk/gpgme/engine-gpgsm.c
trunk/gpgme/gpgme.c
trunk/gpgme/gpgme.h
trunk/gpgme/io.h
trunk/gpgme/w32-io.c
trunk/gpgme/w32-sema.c
trunk/gpgme/w32-util.c

index 47eb3aa2160679e486ff95dfa5e9cddd95c3dc1d..dc398fe79793941520ba24127a1371af2f8e5d91 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 71ca6bc4f110904e27c148672a4cf9a03b2dbc36..110bd51c2831753c90d4a9ee3572e6980e6a474c 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 #include <unistd.h>
+#include <stdio.h>
 #ifdef HAVE_SYS_SELECT_H
 # include <sys/select.h>
 #else
index 17fb1fd91c245aeaf8d7c6412eb731d696952917..ef74126afc2ff0965cb330fceb7057c7439b073a 100644 (file)
 #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
index feb4a60a892dd09e1897983b418bc43a38afc11a..02ada89e3ab0f86c8dcfbd1d27c5712838451c79 100644 (file)
 
 #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
index 6aae01838448d2c87924475f8a50710c64bd86a5..71b01c9fb571a75cfe031506b73a5cab91a1c2fe 100644 (file)
@@ -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 @@ struct engine_ops _gpgme_engine_ops_gpgsm =
     gpgsm_io_event,
     gpgsm_cancel
   };
+#endif
index 338d728550181dff38bde4ccdce3f0066863cf88..f95ae3fd939d7a82902abd437549432d31d9c945 100644 (file)
@@ -344,6 +344,7 @@ gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)
 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 @@ gpgme_set_locale (gpgme_ctx_t ctx, int category, const char *value)
   SET_ONE_LOCALE (messages, MESSAGES);
   if (!ctx)
     UNLOCK (def_lc_lock);
-
+#endif
+  
   return 0;
 }
 
index 397e31bb778117cb50ef1f92f7f4d45019dec9e8..2e22113ac38abd05bc93fa4a27730d381ae258c6 100644 (file)
@@ -38,9 +38,6 @@
   typedef long ssize_t;
 #else
 # include <sys/types.h>
-#ifdef _WIN32
-typedef long ssize_t;
-#endif
 #endif
 
 #ifdef __cplusplus
index f490e52b76d3a5669beb47c5168907fe749f7e0a..58de0714b6a7bb2a6b67c21c62eed1c2e0858cb6 100644 (file)
 #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 5b64120bf4b28aea721a1043904bdc9b52d1b0a7..7defc3cc68027e9c8ac511a7105e4b717bb181f6 100644 (file)
@@ -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 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds, int nonblock )
          */
         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 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds, int nonblock )
     
     return count;
 }
+
+void
+_gpgme_io_subsystem_init (void)
+{
+  
+}
+
+
index d2c0c5c0523bfb8bfa9075fe77f5f16d9bea7052..c20f1a7b7e62f738d62790aa89ed0e328ac46e24 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "util.h"
 #include "sema.h"
+#include "debug.h"
 
 static void
 sema_fatal (const char *text)
index c62637a891d930ef8358fd1dc3b1c364206787ee..5254fcce1e3332b3e513542350bc6f7abfec6fe8 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "util.h"
 #include "sema.h"
+#include "debug.h"
 
 DEFINE_STATIC_LOCK (get_path_lock);
 
@@ -119,7 +120,7 @@ _gpgme_get_gpg_path (void)
 
   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 @@ _gpgme_get_gpgsm_path (void)
 
   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;