[Pkg-gnupg-commit] [libassuan] 294/437: Changes to build for W32CE - does not yet work, though.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit c01cfaf2da8dacc4e6b1c1d1133237702276eb02
Author: Werner Koch <wk at gnupg.org>
Date: Fri Jan 22 18:55:16 2010 +0000
Changes to build for W32CE - does not yet work, though.
---
ChangeLog | 4 ----
NEWS | 2 +-
configure.ac | 3 +--
doc/assuan.texi | 4 ++--
src/ChangeLog | 7 +++++++
src/assuan-pipe-connect.c | 6 +++++-
src/setenv.c | 4 +++-
src/system.c | 6 ++++--
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 <wk at g10code.com>
- * (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 <wk at g10code.com>
+ * 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. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list