aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-01-22 18:55:16 +0000
committerWerner Koch <[email protected]>2010-01-22 18:55:16 +0000
commitc01cfaf2da8dacc4e6b1c1d1133237702276eb02 (patch)
treefd5f3e13294824914324783c7825efe5ee060216
parentPrepare for a port to WindowsCE. (diff)
downloadlibassuan-c01cfaf2da8dacc4e6b1c1d1133237702276eb02.tar.gz
libassuan-c01cfaf2da8dacc4e6b1c1d1133237702276eb02.zip
Changes to build for W32CE - does not yet work, though.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--configure.ac3
-rw-r--r--doc/assuan.texi4
-rw-r--r--src/ChangeLog7
-rw-r--r--src/assuan-pipe-connect.c6
-rw-r--r--src/setenv.c4
-rw-r--r--src/system.c6
8 files changed, 23 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index da8537c..cc5c772 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,8 @@
2010-01-22 Werner Koch <[email protected]>
- * (libtool):
-
* configure.ac: Require libgpg-error 1.8.
(HAVE_W32CE_SYSTEM): New am_defines and am_conditionals.
-
* ltmain.sh (wrappers_required): Don't set for mingw32ce.
-
* autogen.sh: Add option --build-w32ce. Remove --disable-shared
from --build-w32.
diff --git a/NEWS b/NEWS
index ebd957d..d80c67a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
Noteworthy changes in version 2.0.1 (unreleased)
------------------------------------------------
- * Under development.
+ Under development:
* Support for WindowsCE.
diff --git a/configure.ac b/configure.ac
index 89d9dd5..b0cb330 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,7 @@ case "${host}" in
CFLAGS="$CFLAGS -fPIC -DPIC"
fi
;;
- *-mingw32de*)
+ *-mingw32ce*)
have_dosish_system=yes
have_w32_system=yes
have_w32ce_system=yes
@@ -295,7 +295,6 @@ AC_REPLACE_FUNCS(isascii)
AC_REPLACE_FUNCS(putc_unlocked)
AC_REPLACE_FUNCS(memrchr)
AC_REPLACE_FUNCS(stpcpy)
-# Check for unistd.h for setenv replacement function.
AC_CHECK_HEADERS(unistd.h)
AC_REPLACE_FUNCS(setenv)
AC_REPLACE_FUNCS(vasprintf)
diff --git a/doc/assuan.texi b/doc/assuan.texi
index a20ea27..18f854e 100644
--- a/doc/assuan.texi
+++ b/doc/assuan.texi
@@ -921,7 +921,7 @@ Flags is the bit-wise OR of some (or none) of the following flags:
If set and there is a need to start the server it will be started as a
background process. This flag is useful under W32 systems, so that no
new console is created and pops up a console window when starting the
-server.
+server. On W32CE systems this flag is ignored.
@end table
@item pid_t (*waitpid) (assuan_context_t ctx, pid_t pid, int action, int *status, int options)
@@ -1087,7 +1087,7 @@ features only available with such servers.
If set and there is a need to start the server it will be started as a
background process. This flag is useful under W32 systems, so that no
new console is created and pops up a console window when starting the
-server.
+server. On W32CE systems this flag is ignored.
@end table
@end deftypefun
diff --git a/src/ChangeLog b/src/ChangeLog
index d7df666..098f3f5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2010-01-22 Werner Koch <[email protected]>
+ * setenv.c [W32CE]: Make it a dummy.
+
+ * assuan-pipe-connect.c: Remove signal.h.
+
+ * system.c (__assuan_spawn): Use CreateFileW.
+ (DETACHED_PROCESS) [W32CE]: Define to 0.
+
* assuan-socket.c (read_port_and_nonce): Replace ENOFILE by a
proper ENOENT.
diff --git a/src/assuan-pipe-connect.c b/src/assuan-pipe-connect.c
index 690d810..0a04777 100644
--- a/src/assuan-pipe-connect.c
+++ b/src/assuan-pipe-connect.c
@@ -24,7 +24,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <signal.h>
+/* On Windows systems signal.h is not needed and even not supported on
+ WindowsCE. */
+#ifndef HAVE_DOSISH_SYSTEM
+# include <signal.h>
+#endif
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/src/setenv.c b/src/setenv.c
index debaa29..9f91124 100644
--- a/src/setenv.c
+++ b/src/setenv.c
@@ -20,6 +20,8 @@
# include <config.h>
#endif
+#ifndef HAVE_W32CE_SYSTEM
+
#define setenv _assuan_setenv
#define unsetenv _assuan_unsetenv
#define clearenv _assuan_clearenv
@@ -352,4 +354,4 @@ weak_alias (__unsetenv, unsetenv)
weak_alias (__clearenv, clearenv)
#endif
-
+#endif /*!HAVE_W32CE_SYSTEM*/
diff --git a/src/system.c b/src/system.c
index 9e9f5cf..45f1d9a 100644
--- a/src/system.c
+++ b/src/system.c
@@ -632,7 +632,7 @@ __assuan_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
}
if (!fdp || *fdp == ASSUAN_INVALID_FD)
{
- nullfd = CreateFile ("nul", GENERIC_WRITE,
+ nullfd = CreateFileW (L"nul", GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
if (nullfd == INVALID_HANDLE_VALUE)
@@ -648,7 +648,9 @@ __assuan_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
else
si.hStdError = fd;
-
+#ifdef HAVE_W32CE_SYSTEM
+# define DETACHED_PROCESS (0)
+#endif
/* Note: We inherit all handles flagged as inheritable. This seems
to be a security flaw but there seems to be no way of selecting
handles to inherit. */