diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 18 | ||||
-rw-r--r-- | g10/Makefile.am | 4 | ||||
-rw-r--r-- | g10/gpg.c | 28 | ||||
-rw-r--r-- | g10/gpgv.c | 15 | ||||
-rw-r--r-- | g10/misc.c | 41 | ||||
-rw-r--r-- | g10/passphrase.c | 2 | ||||
-rw-r--r-- | g10/plaintext.c | 7 |
7 files changed, 28 insertions, 87 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index fb22ca0c6..192897ae6 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,21 @@ +2007-06-06 Werner Koch <[email protected]> + + * passphrase.c (passphrase_get) [!ENABLE_NLS]: Do not define + orig_codeset. + + * Makefile.am (gpgv2_LDADD, gpg2_LDADD): Include LDADD before + libgcrypt. + + * plaintext.c (handle_plaintext): Replace eof by eof_seen as W32's + io.h has a symbol with that name. + + * misc.c: Do not include dynload.h. + (w32_shgetfolderpath): Remove. It is now in common/homedir.c. + + * gpgv.c (i18n_init): Remove. + * gpg.c (i18n_init): Remove. + (main): Make --load-extension a dummy + 2007-05-19 Marcus Brinkmann <[email protected]> * passphrase.c (passphrase_get): Use PACKAGE_GT, not PACKAGE. diff --git a/g10/Makefile.am b/g10/Makefile.am index fdca1405c..8f310fc83 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -119,9 +119,9 @@ gpgv2_SOURCES = gpgv.c \ LDADD = $(needed_libs) ../common/libgpgrl.a \ $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \ $(LIBINTL) $(CAPLIBS) $(NETLIBS) -gpg2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ +gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS)$(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ $(LIBICONV) -gpgv2_LDADD = $(LIBGCRYPT_LIBS) $(LDADD) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ +gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ $(LIBICONV) $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a @@ -871,20 +871,6 @@ build_list( const char *text, char letter, static void -i18n_init(void) -{ -#ifdef USE_SIMPLE_GETTEXT - set_gettext_file (PACKAGE_GT, "Software\\GNU\\GnuPG"); -#else -#ifdef ENABLE_NLS - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE_GT, LOCALEDIR); - textdomain (PACKAGE_GT); -#endif -#endif -} - -static void wrong_args( const char *text) { fputs(_("usage: gpg [options] "),stderr); @@ -2260,18 +2246,8 @@ main (int argc, char **argv ) } break; case oLoadExtension: -#ifndef __riscos__ -#if defined(USE_DYNAMIC_LINKING) || defined(_WIN32) - if(check_permissions(pargs.r.ret_str,2)) - log_info(_("cipher extension `%s' not loaded due to" - " unsafe permissions\n"),pargs.r.ret_str); - else - register_cipher_extension(orig_argc? *orig_argv:NULL, - pargs.r.ret_str); -#endif -#else /* __riscos__ */ - riscos_not_implemented("load-extension"); -#endif /* __riscos__ */ + /* Dummy so that gpg 1.4 conf files can work. Should + eventually be removed. */ break; case oRFC1991: opt.compliance = CO_RFC1991; diff --git a/g10/gpgv.c b/g10/gpgv.c index b4730f459..6734ee2f7 100644 --- a/g10/gpgv.c +++ b/g10/gpgv.c @@ -110,21 +110,6 @@ my_strusage( int level ) } -static void -i18n_init(void) -{ -#ifdef USE_SIMPLE_GETTEXT - set_gettext_file (PACKAGE_GT, "Software\\GNU\\GnuPG"); -#else -#ifdef ENABLE_NLS - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE_GT, LOCALEDIR); - textdomain (PACKAGE_GT); -#endif -#endif -} - - int main( int argc, char **argv ) diff --git a/g10/misc.c b/g10/misc.c index 50bb6af13..89ad92643 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -58,7 +58,6 @@ #include "gpg.h" #ifdef HAVE_W32_SYSTEM # include "errors.h" -# include "dynload.h" #endif /*HAVE_W32_SYSTEM*/ #include "util.h" #include "main.h" @@ -1225,46 +1224,6 @@ is_valid_mailbox (const char *name) } -/* This is a helper function to load a Windows function from either of - one DLLs. */ -#ifdef HAVE_W32_SYSTEM -static HRESULT -w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e) -{ - static int initialized; - static HRESULT (WINAPI * func)(HWND,int,HANDLE,DWORD,LPSTR); - - if (!initialized) - { - static char *dllnames[] = { "shell32.dll", "shfolder.dll", NULL }; - void *handle; - int i; - - initialized = 1; - - for (i=0, handle = NULL; !handle && dllnames[i]; i++) - { - handle = dlopen (dllnames[i], RTLD_LAZY); - if (handle) - { - func = dlsym (handle, "SHGetFolderPathA"); - if (!func) - { - dlclose (handle); - handle = NULL; - } - } - } - } - - if (func) - return func (a,b,c,d,e); - else - return -1; -} -#endif /*HAVE_W32_SYSTEM*/ - - /* Return the name of the libexec directory. The name is allocated in a static area on the first use. This function won't fail. */ const char * diff --git a/g10/passphrase.c b/g10/passphrase.c index 970e4d9a3..2d904e5e1 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -259,7 +259,9 @@ passphrase_get ( u32 *keyid, int mode, const char *cacheid, PKT_public_key *pk = xmalloc_clear( sizeof *pk ); byte fpr[MAX_FINGERPRINT_LEN]; int have_fpr = 0; +#ifdef ENABLE_NLS char *orig_codeset = NULL; +#endif char *my_prompt; char hexfprbuf[20*2+1]; const char *my_cacheid; diff --git a/g10/plaintext.c b/g10/plaintext.c index fd165237e..4e48ddfbb 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -297,8 +297,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, } else { /* binary mode */ byte *buffer = xmalloc( 32768 ); - int eof; - for( eof=0; !eof; ) { + int eof_seen = 0; + + while ( !eof_seen ) { /* Why do we check for len < 32768: * If we won't, we would practically read 2 EOFs but * the first one has already popped the block_filter @@ -309,7 +310,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( len == -1 ) break; if( len < 32768 ) - eof = 1; + eof_seen = 1; if( mfx->md ) gcry_md_write ( mfx->md, buffer, len ); if( fp ) |