aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog7
-rw-r--r--common/Makefile.am7
-rw-r--r--common/init.c5
-rw-r--r--common/sysutils.c11
-rw-r--r--common/util.h4
-rw-r--r--common/w32help.h9
6 files changed, 41 insertions, 2 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index b4ddfbf37..7a6c33743 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,5 +1,12 @@
2010-04-14 Werner Koch <[email protected]>
+ * Makefile.am (noinst_LIBRARIES) [W32CE]: Exclude libsimple-pwquery.
+
+ * w32help.h (umask) [W32CE]: New.
+
+ * sysutils.c (_gnupg_isatty): New.
+ * util.h (gnupg_isatty): New.
+
* asshelp.c (setup_libassuan_logging): Read ASSUAN_DEBUG envvar.
(my_libassuan_log_handler): Use it.
* sysutils.c (_gnupg_getenv): Implement ASSUAN_DEBUG.
diff --git a/common/Makefile.am b/common/Makefile.am
index 7544d08e7..d991182d0 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -21,7 +21,10 @@
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
audit-events.h status-codes.h README.jnlib ChangeLog.jnlib
-noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
+noinst_LIBRARIES = libcommon.a libcommonpth.a libgpgrl.a
+if !HAVE_W32CE_SYSTEM
+noinst_LIBRARIES += libsimple-pwquery.a
+endif
noinst_PROGRAMS = $(jnlib_tests) $(module_tests) $(module_maint_tests)
TESTS = $(jnlib_tests) $(module_tests)
@@ -118,9 +121,11 @@ libcommonpth_a_SOURCES += srv.c
endif
libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS)
+if !HAVE_W32CE_SYSTEM
libsimple_pwquery_a_SOURCES = \
simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
+endif
libgpgrl_a_SOURCES = \
gpgrlhelp.c
diff --git a/common/init.c b/common/init.c
index 0904cf7b1..ce661f6c5 100644
--- a/common/init.c
+++ b/common/init.c
@@ -30,11 +30,14 @@
#ifdef HAVE_PTH
#include <pth.h>
#endif
+#ifdef HAVE_W32CE_SYSTEM
+# include <assuan.h> /* For _assuan_w32ce_finish_pipe. */
+#endif
#include "util.h"
+
#ifdef HAVE_W32CE_SYSTEM
-#include <assuan.h>
static void parse_std_file_handles (int *argcp, char ***argvp);
static void
sleep_on_exit (void)
diff --git a/common/sysutils.c b/common/sysutils.c
index 6ad5e27a9..46731271b 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -623,6 +623,17 @@ gnupg_unsetenv (const char *name)
#endif
}
+#ifdef HAVE_W32CE_SYSTEM
+/* There is a isatty function declaration in cegcc but it does not
+ make sense, thus we redefine it. */
+int
+_gnupg_isatty (int fd)
+{
+ (void)fd;
+ return 0;
+}
+#endif
+
#ifdef HAVE_W32CE_SYSTEM
/* Replacement for getenv which takes care of the our use of getenv.
diff --git a/common/util.h b/common/util.h
index 159d66ee2..e197ea7a3 100644
--- a/common/util.h
+++ b/common/util.h
@@ -300,6 +300,10 @@ char *_gnupg_getenv (const char *name); /* See sysutils.c */
#define getenv(a) _gnupg_getenv ((a))
char *_gnupg_setenv (const char *name); /* See sysutils.c */
#define setenv(a,b,c) _gnupg_setenv ((a),(b),(c))
+int _gnupg_isatty (int fd);
+#define gnupg_isatty(a) _gnupg_isatty ((a))
+#else
+#define gnupg_isatty(a) isatty ((a))
#endif
diff --git a/common/w32help.h b/common/w32help.h
index 6bc9f6605..beabdedef 100644
--- a/common/w32help.h
+++ b/common/w32help.h
@@ -33,6 +33,15 @@ int write_w32_registry_string (const char *root, const char *dir,
/* Setmode is missing in cegcc but available since CE 5.0. */
int _setmode (int handle, int mode);
# define setmode(a,b) _setmode ((a),(b))
+
+static inline int
+umask (int a)
+{
+ (void)a;
+ return 0;
+}
+
+
#endif /*HAVE_W32CE_SYSTEM*/
#endif /*HAVE_W32_SYSTEM*/