summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-06-06 20:12:30 +0200
committerWerner Koch <wk@gnupg.org>2007-06-06 20:12:30 +0200
commit2c9791db555cc571eaedfa71444da05454bd052a (patch)
tree9566d22f85e562e0c7b35dacc1697c9a58fcff1a /agent
parentPrint passphrase encoding info only in PEM mode. (diff)
downloadgnupg2-2c9791db555cc571eaedfa71444da05454bd052a.tar.xz
gnupg2-2c9791db555cc571eaedfa71444da05454bd052a.zip
First steps towards supporting W32.
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog12
-rw-r--r--agent/call-pinentry.c4
-rw-r--r--agent/call-scd.c4
-rw-r--r--agent/gpg-agent.c16
-rw-r--r--agent/minip12.c18
-rw-r--r--agent/preset-passphrase.c15
-rw-r--r--agent/protect-tool.c16
7 files changed, 29 insertions, 56 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index cab775385..94b7c5a3b 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,15 @@
+2007-06-06 Werner Koch <wk@g10code.com>
+
+ * minip12.c (enum): Rename CONTEXT to ASNCONTEXT as winnt.h
+ defines such a symbol to access the process context.
+
+ * call-pinentry.c (dump_mutex_state) [W32]: Handle the W32Pth case.
+ * call-scd.c (dump_mutex_state): Ditto.
+
+ * protect-tool.c (i18n_init): Remove.
+ * preset-passphrase.c (i18n_init): Remove.
+ * gpg-agent.c (i18n_init): Remove.
+
2007-05-19 Marcus Brinkmann <marcus@g10code.de>
* protect-tool.c (get_passphrase): Free ORIG_CODESET on error.
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 14e6476d8..099171c5e 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -103,12 +103,16 @@ initialize_module_query (void)
static void
dump_mutex_state (pth_mutex_t *m)
{
+#ifdef _W32_PTH_H
+ log_printf ("unknown under W32");
+#else
if (!(m->mx_state & PTH_MUTEX_INITIALIZED))
log_printf ("not_initialized");
else if (!(m->mx_state & PTH_MUTEX_LOCKED))
log_printf ("not_locked");
else
log_printf ("locked tid=0x%lx count=%lu", (long)m->mx_owner, m->mx_count);
+#endif
}
diff --git a/agent/call-scd.c b/agent/call-scd.c
index 53e4ced4d..a2067a2cb 100644
--- a/agent/call-scd.c
+++ b/agent/call-scd.c
@@ -135,12 +135,16 @@ initialize_module_call_scd (void)
static void
dump_mutex_state (pth_mutex_t *m)
{
+#ifdef _W32_PTH_H
+ log_printf ("unknown under W32");
+#else
if (!(m->mx_state & PTH_MUTEX_INITIALIZED))
log_printf ("not_initialized");
else if (!(m->mx_state & PTH_MUTEX_LOCKED))
log_printf ("not_locked");
else
log_printf ("locked tid=0x%lx count=%lu", (long)m->mx_owner, m->mx_count);
+#endif
}
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 1d73dfcd6..66b048815 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -260,22 +260,6 @@ my_strusage (int level)
-static void
-i18n_init (void)
-{
-#ifdef USE_SIMPLE_GETTEXT
- set_gettext_file( PACKAGE_GT );
-#else
-#ifdef ENABLE_NLS
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE_GT, LOCALEDIR);
- textdomain (PACKAGE_GT);
-#endif
-#endif
-}
-
-
-
/* Setup the debugging. With the global variable DEBUG_LEVEL set to NULL
only the active debug flags are propagated to the subsystems. With
DEBUG_LEVEL set, a specific set of debug flags is set; thus overriding
diff --git a/agent/minip12.c b/agent/minip12.c
index 6958e5e1d..ec51aee85 100644
--- a/agent/minip12.c
+++ b/agent/minip12.c
@@ -52,7 +52,7 @@ enum
{
UNIVERSAL = 0,
APPLICATION = 1,
- CONTEXT = 2,
+ ASNCONTEXT = 2,
PRIVATE = 3
};
@@ -638,7 +638,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
where = "start";
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (parse_tag (&p, &n, &ti))
goto bailout;
@@ -722,7 +722,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
goto bailout;
consumed = p - p_start;
- if (ti.class == CONTEXT && ti.tag == 0 && ti.is_constructed && ti.ndef)
+ if (ti.class == ASNCONTEXT && ti.tag == 0 && ti.is_constructed && ti.ndef)
{
/* Mozilla exported certs now come with single byte chunks of
octect strings. (Mozilla Firefox 1.0.4). Arghh. */
@@ -736,7 +736,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
r_consumed = NULL; /* Ugly hack to not update that value any further. */
ti.length = n;
}
- else if (ti.class == CONTEXT && ti.tag == 0 && ti.length )
+ else if (ti.class == ASNCONTEXT && ti.tag == 0 && ti.length )
;
else
goto bailout;
@@ -818,7 +818,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
where = "certbag.before.certheader";
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (iscrlbag)
{
@@ -937,7 +937,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
where = "certbag.before.octetstring";
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (parse_tag (&p, &n, &ti))
goto bailout;
@@ -1065,7 +1065,7 @@ parse_bag_data (const unsigned char *buffer, size_t length, int startoffset,
where = "start";
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (parse_tag (&p, &n, &ti))
goto bailout;
@@ -1112,7 +1112,7 @@ parse_bag_data (const unsigned char *buffer, size_t length, int startoffset,
where = "shrouded,outerseqs";
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (parse_tag (&p, &n, &ti))
goto bailout;
@@ -1324,7 +1324,7 @@ p12_parse (const unsigned char *buffer, size_t length, const char *pw,
if (parse_tag (&p, &n, &ti))
goto bailout;
- if (ti.class != CONTEXT || ti.tag)
+ if (ti.class != ASNCONTEXT || ti.tag)
goto bailout;
if (parse_tag (&p, &n, &ti))
goto bailout;
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c
index dc6a9057f..362591171 100644
--- a/agent/preset-passphrase.c
+++ b/agent/preset-passphrase.c
@@ -110,21 +110,6 @@ my_strusage (int level)
}
-
-static void
-i18n_init (void)
-{
-#ifdef USE_SIMPLE_GETTEXT
- set_gettext_file( PACKAGE_GT );
-#else
-#ifdef ENABLE_NLS
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE_GT, LOCALEDIR);
- textdomain (PACKAGE_GT);
-#endif
-#endif
-}
-
static gpg_error_t
map_spwq_error (int err)
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index f7e2d603b..d3bcc00b8 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -161,22 +161,6 @@ my_strusage (int level)
-static void
-i18n_init (void)
-{
-#ifdef USE_SIMPLE_GETTEXT
- set_gettext_file( PACKAGE_GT );
-#else
-#ifdef ENABLE_NLS
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE_GT, LOCALEDIR);
- textdomain (PACKAGE_GT);
-#endif
-#endif
-}
-
-
-
/* static void */
/* print_mpi (const char *text, gcry_mpi_t a) */
/* { */