changeset: 6624:23334e967dd7 user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 27 13:08:52 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/23334e967dd7
Create a wrapper sys_socket.h to work around Solaris namespace issues. (closes #3833) Solaris includes "sys/stream.h" inside their "sys/socket.h". This include file adds many non-reserved macros to Mutt's namespace, two of which conflict with existing Mutt macros. The simplest fix would be to rename those macros in Mutt, however this will cause difficulty with out-of-tree patches. This fix creates a wrapper include file that preserves those existing macros and prevents the Solaris values from entering Mutt's namespace. changeset: 6625:8083387557d9 user: Kevin McCarthy <ke...@8t8.us> date: Wed Apr 27 13:21:15 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/8083387557d9 merge stable diffs (truncated from 967 to 950 lines): diff -r a6a4d6ed0f19 -r 8083387557d9 Makefile.am --- a/Makefile.am Sun Apr 10 16:02:06 2016 -0700 +++ b/Makefile.am Wed Apr 27 13:21:15 2016 -0700 @@ -72,7 +72,7 @@ README.SSL smime.h group.h \ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ ChangeLog mkchangelog.sh mutt_idna.h \ - snprintf.c regex.c crypt-gpgme.h hcachever.sh.in \ + snprintf.c regex.c crypt-gpgme.h hcachever.sh.in sys_socket.h \ txt2c.c txt2c.sh version.sh check_sec.sh EXTRA_SCRIPTS = smime_keys diff -r a6a4d6ed0f19 -r 8083387557d9 alias.c --- a/alias.c Sun Apr 10 16:02:06 2016 -0700 +++ b/alias.c Wed Apr 27 13:21:15 2016 -0700 @@ -423,6 +423,8 @@ { if (dry) return -1; + if (l == (size_t)(-1)) + memset (&mb, 0, sizeof (mbstate_t)); *dest++ = '_'; rv = -1; } diff -r a6a4d6ed0f19 -r 8083387557d9 curs_lib.c --- a/curs_lib.c Sun Apr 10 16:02:06 2016 -0700 +++ b/curs_lib.c Wed Apr 27 13:21:15 2016 -0700 @@ -1034,6 +1034,8 @@ { if (k == (size_t)(-1) || k == (size_t)(-2)) { + if (k == (size_t)(-1)) + memset (&mbstate, 0, sizeof (mbstate)); k = (k == (size_t)(-1)) ? 1 : n; wc = replacement_char (); } diff -r a6a4d6ed0f19 -r 8083387557d9 getdomain.c --- a/getdomain.c Sun Apr 10 16:02:06 2016 -0700 +++ b/getdomain.c Wed Apr 27 13:21:15 2016 -0700 @@ -24,7 +24,7 @@ #include <unistd.h> #include <netdb.h> #include <sys/types.h> -#include <sys/socket.h> +#include "sys_socket.h" #include "mutt.h" diff -r a6a4d6ed0f19 -r 8083387557d9 help.c --- a/help.c Sun Apr 10 16:02:06 2016 -0700 +++ b/help.c Wed Apr 27 13:21:15 2016 -0700 @@ -103,6 +103,8 @@ { if (k == (size_t)(-1) || k == (size_t)(-2)) { + if (k == (size_t)(-1)) + memset (&mbstate1, 0, sizeof (mbstate1)); k = (k == (size_t)(-1)) ? 1 : len; wc = replacement_char (); } @@ -165,6 +167,8 @@ m = n; if (k == (size_t)(-1) || k == (size_t)(-2)) { + if (k == (size_t)(-1)) + memset (&mbstate, 0, sizeof (mbstate)); k = (k == (size_t)(-1)) ? 1 : len; wc = replacement_char (); } diff -r a6a4d6ed0f19 -r 8083387557d9 imap/browse.c --- a/imap/browse.c Sun Apr 10 16:02:06 2016 -0700 +++ b/imap/browse.c Wed Apr 27 13:21:15 2016 -0700 @@ -319,11 +319,9 @@ goto fail; } - /* TODO: add mutt_error call, such as - * "Cannot rename root folder" - */ if (!mx.mbox) { + mutt_error _("Cannot rename root folder"); goto fail; } diff -r a6a4d6ed0f19 -r 8083387557d9 mutt_sasl.c --- a/mutt_sasl.c Sun Apr 10 16:02:06 2016 -0700 +++ b/mutt_sasl.c Wed Apr 27 13:21:15 2016 -0700 @@ -30,7 +30,7 @@ #include <errno.h> #include <netdb.h> #include <sasl/sasl.h> -#include <sys/socket.h> +#include "sys_socket.h" #include <netinet/in.h> static int getnameinfo_err(int ret) diff -r a6a4d6ed0f19 -r 8083387557d9 mutt_socket.c --- a/mutt_socket.c Sun Apr 10 16:02:06 2016 -0700 +++ b/mutt_socket.c Wed Apr 27 13:21:15 2016 -0700 @@ -40,7 +40,7 @@ #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif -#include <sys/socket.h> +#include "sys_socket.h" #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif diff -r a6a4d6ed0f19 -r 8083387557d9 mutt_ssl.c --- a/mutt_ssl.c Sun Apr 10 16:02:06 2016 -0700 +++ b/mutt_ssl.c Wed Apr 27 13:21:15 2016 -0700 @@ -82,6 +82,7 @@ static int ssl_socket_close (CONNECTION * conn); static int tls_close (CONNECTION* conn); static void ssl_err (sslsockdata *data, int err); +static void ssl_dprint_err_stack (void); static int ssl_cache_trusted_cert (X509 *cert); static int ssl_check_certificate (CONNECTION *conn, sslsockdata * data); static int interactive_check_cert (X509 *cert, int idx, int len); @@ -334,7 +335,17 @@ data = (sslsockdata *) safe_calloc (1, sizeof (sslsockdata)); conn->sockdata = data; - data->ctx = SSL_CTX_new (SSLv23_client_method ()); + if (! (data->ctx = SSL_CTX_new (SSLv23_client_method ()))) + { + /* L10N: an SSL context is a data structure returned by the OpenSSL + * function SSL_CTX_new(). In this case it returned NULL: an + * error condition. + */ + mutt_error (_("Unable to create SSL context")); + ssl_dprint_err_stack (); + mutt_socket_close (conn); + return -1; + } /* disable SSL protocols as needed */ if (!option(OPTTLSV1)) @@ -533,6 +544,30 @@ dprint (1, (debugfile, "SSL error: %s\n", errmsg)); } +static void ssl_dprint_err_stack (void) +{ +#ifdef DEBUG + BIO *bio; + char *buf = NULL; + long buflen; + char *output; + + if (! (bio = BIO_new (BIO_s_mem ()))) + return; + ERR_print_errors (bio); + if ((buflen = BIO_get_mem_data (bio, &buf)) > 0) + { + output = safe_malloc (buflen + 1); + memcpy (output, buf, buflen); + output[buflen] = '\0'; + dprint (1, (debugfile, "SSL error stack: %s\n", output)); + FREE (&output); + } + BIO_free (bio); +#endif +} + + static char *x509_get_part (char *line, const char *ndx) { static char ret[SHORT_STRING]; diff -r a6a4d6ed0f19 -r 8083387557d9 mutt_tunnel.c --- a/mutt_tunnel.c Sun Apr 10 16:02:06 2016 -0700 +++ b/mutt_tunnel.c Wed Apr 27 13:21:15 2016 -0700 @@ -27,7 +27,7 @@ #include <netinet/in.h> #include <sys/types.h> -#include <sys/socket.h> +#include "sys_socket.h" #include <sys/wait.h> #include <fcntl.h> #include <errno.h> diff -r a6a4d6ed0f19 -r 8083387557d9 muttlib.c --- a/muttlib.c Sun Apr 10 16:02:06 2016 -0700 +++ b/muttlib.c Wed Apr 27 13:21:15 2016 -0700 @@ -1291,14 +1291,26 @@ len = mutt_strlen (buf); wid = mutt_strwidth (buf); - /* try to consume as many columns as we can, if we don't have - * memory for that, use as much memory as possible */ pad = (COLS - col - wid) / pw; - if (pad > 0 && wlen + (pad * pl) + len > destlen) - pad = ((signed)(destlen - wlen - len)) / pl; - if (pad > 0) + if (pad >= 0) { - while (pad--) + /* try to consume as many columns as we can, if we don't have + * memory for that, use as much memory as possible */ + if (wlen + (pad * pl) + len > destlen) + pad = (destlen > wlen + len) ? ((destlen - wlen - len) / pl) : 0; + else + { + /* Add pre-spacing to make multi-column pad characters and + * the contents after padding line up */ + while ((col + (pad * pw) + wid < COLS) && + (wlen + (pad * pl) + len < destlen)) + { + *wptr++ = ' '; + wlen++; + col++; + } + } + while (pad-- > 0) { memcpy (wptr, src, pl); wptr += pl; @@ -1309,13 +1321,22 @@ else if (soft && pad < 0) { int offset = ((flags & M_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; + int avail_cols = (COLS > offset) ? (COLS - offset) : 0; /* \0-terminate dest for length computation in mutt_wstr_trunc() */ *wptr = 0; /* make sure right part is at most as wide as display */ - len = mutt_wstr_trunc (buf, destlen, COLS-offset, &wid); + len = mutt_wstr_trunc (buf, destlen, avail_cols, &wid); /* truncate left so that right part fits completely in */ - wlen = mutt_wstr_trunc (dest, destlen - len, col + pad*pw -offset, &col); + wlen = mutt_wstr_trunc (dest, destlen - len, avail_cols - wid, &col); wptr = dest + wlen; + /* Multi-column characters may be truncated in the middle. + * Add spacing so the right hand side lines up. */ + while ((col + wid < avail_cols) && (wlen + len < destlen)) + { + *wptr++ = ' '; + wlen++; + col++; + } } if (len + wlen > destlen) len = mutt_wstr_trunc (buf, destlen - wlen, COLS - col, NULL); diff -r a6a4d6ed0f19 -r 8083387557d9 pager.c --- a/pager.c Sun Apr 10 16:02:06 2016 -0700 +++ b/pager.c Wed Apr 27 13:21:15 2016 -0700 @@ -1011,10 +1011,14 @@ for (; len > 0; buf += k, len -= k) { k = mbrtowc (NULL, (char *) buf, len, &mbstate); - if (k == -2) + if (k == (size_t)(-2)) break; - else if (k == -1 || k == 0) + else if (k == (size_t)(-1) || k == 0) + { + if (k == (size_t)(-1)) + memset (&mbstate, 0, sizeof (mbstate)); k = 1; + } } *buf = '\0'; @@ -1092,7 +1096,8 @@ { int space = -1; /* index of the last space or TAB */ int col = option (OPTMARKERS) ? (*lineInfo)[n].continuation : 0; - int ch, vch, k, last_special = -1, special = 0, t; + size_t k; + int ch, vch, last_special = -1, special = 0, t; wchar_t wc; mbstate_t mbstate; int wrap_cols = mutt_term_width ((flags & M_PAGER_NOWRAP) ? 0 : Wrap); @@ -1123,8 +1128,10 @@ break; k = mbrtowc (&wc, (char *)buf+ch, cnt-ch, &mbstate); - if (k == -2 || k == -1) + if (k == (size_t)(-2) || k == (size_t)(-1)) { + if (k == (size_t)(-1)) + memset(&mbstate, 0, sizeof(mbstate)); dprint (1, (debugfile, "%s:%d: mbrtowc returned %d; errno = %d.\n", __FILE__, __LINE__, k, errno)); if (col + 4 > wrap_cols) @@ -1150,15 +1157,18 @@ { wchar_t wc1; mbstate_t mbstate1; - int k1, k2; + size_t k1, k2; - while ((wc1 = 0, mbstate1 = mbstate, - k1 = k + mbrtowc (&wc1, (char *)buf+ch+k, cnt-ch-k, &mbstate1), - k1 - k > 0 && wc1 == '\b') && - (wc1 = 0, - k2 = mbrtowc (&wc1, (char *)buf+ch+k1, cnt-ch-k1, &mbstate1), - k2 > 0 && IsWPrint (wc1))) + mbstate1 = mbstate; + k1 = mbrtowc (&wc1, (char *)buf+ch+k, cnt-ch-k, &mbstate1); + while ((k1 != (size_t)(-2)) && (k1 != (size_t)(-1)) && + (k1 > 0) && (wc1 == '\b')) { + k2 = mbrtowc (&wc1, (char *)buf+ch+k+k1, cnt-ch-k-k1, &mbstate1); + if ((k2 == (size_t)(-2)) || (k2 == (size_t)(-1)) || + (k2 == 0) || (!IsWPrint (wc1))) + break; + if (wc == wc1) { special |= (wc == '_' && special & A_UNDERLINE) @@ -1174,9 +1184,11 @@ /* special = 0; / * overstrike: nothing to do! */ wc = wc1; } - ch += k1; + + ch += k + k1; k = k2; mbstate = mbstate1; + k1 = mbrtowc (&wc1, (char *)buf+ch+k, cnt-ch-k, &mbstate1); } } diff -r a6a4d6ed0f19 -r 8083387557d9 po/fr.po --- a/po/fr.po Sun Apr 10 16:02:06 2016 -0700 +++ b/po/fr.po Wed Apr 27 13:21:15 2016 -0700 @@ -21,8 +21,8 @@ msgstr "" "Project-Id-Version: Mutt 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-02 11:15-0700\n" -"PO-Revision-Date: 2016-03-21 01:29+0100\n" +"POT-Creation-Date: 2016-04-11 21:15+0200\n" +"PO-Revision-Date: 2016-04-11 21:17+0200\n" "Last-Translator: Vincent Lefevre <vinc...@vinc17.net>\n" "Language-Team: Vincent Lefevre <vinc...@vinc17.net>\n" "Language: fr\n" @@ -41,12 +41,12 @@ msgid "Password for %s@%s: " msgstr "Mot de passe pour %s@%s : " -#: addrbook.c:37 browser.c:46 pager.c:1532 postpone.c:41 query.c:48 +#: addrbook.c:37 browser.c:46 pager.c:1544 postpone.c:41 query.c:48 #: recvattach.c:53 msgid "Exit" msgstr "Quitter" -#: addrbook.c:38 curs_main.c:482 pager.c:1539 postpone.c:42 +#: addrbook.c:38 curs_main.c:482 pager.c:1551 postpone.c:42 msgid "Del" msgstr "Effacer" @@ -59,7 +59,7 @@ msgstr "Sélectionner" #: addrbook.c:41 browser.c:49 compose.c:96 crypt-gpgme.c:4022 curs_main.c:488 -#: mutt_ssl.c:1049 mutt_ssl_gnutls.c:1003 pager.c:1631 pgpkey.c:522 +#: mutt_ssl.c:1076 mutt_ssl_gnutls.c:1003 pager.c:1643 pgpkey.c:522 #: postpone.c:44 query.c:53 recvattach.c:57 smime.c:439 msgid "Help" msgstr "Aide" @@ -1294,7 +1294,7 @@ msgid "All matching keys are marked expired/revoked." msgstr "Toutes les clés correspondantes sont marquées expirées/révoquées." -#: crypt-gpgme.c:4014 mutt_ssl.c:1047 mutt_ssl_gnutls.c:1001 pgpkey.c:515 +#: crypt-gpgme.c:4014 mutt_ssl.c:1074 mutt_ssl_gnutls.c:1001 pgpkey.c:515 #: smime.c:434 msgid "Exit " msgstr "Quitter " @@ -1493,41 +1493,41 @@ msgid "Passphrase(s) forgotten." msgstr "Phrase(s) de passe oubliée(s)." -#: crypt.c:149 +#: crypt.c:152 msgid "Inline PGP can't be used with attachments. Revert to PGP/MIME?" msgstr "PGP en ligne est impossible avec des attachements. Utiliser PGP/MIME ?" -#: crypt.c:151 +#: crypt.c:154 msgid "Mail not sent: inline PGP can't be used with attachments." msgstr "" "Message non envoyé : PGP en ligne est impossible avec des attachements." -#: crypt.c:158 cryptglue.c:110 pgpkey.c:563 pgpkey.c:753 +#: crypt.c:161 cryptglue.c:110 pgpkey.c:563 pgpkey.c:753 msgid "Invoking PGP..." msgstr "Appel de PGP..." -#: crypt.c:167 +#: crypt.c:170 msgid "Message can't be sent inline. Revert to using PGP/MIME?" msgstr "Le message ne peut pas être envoyé en ligne. Utiliser PGP/MIME ?" -#: crypt.c:169 send.c:1608 +#: crypt.c:172 send.c:1608 msgid "Mail not sent." msgstr "Message non envoyé." -#: crypt.c:482 +#: crypt.c:485 msgid "S/MIME messages with no hints on content are unsupported." msgstr "" "Les messages S/MIME sans indication sur le contenu ne sont pas supportés." -#: crypt.c:702 crypt.c:746 +#: crypt.c:705 crypt.c:749 msgid "Trying to extract PGP keys...\n" msgstr "Tentative d'extraction de clés PGP...\n" -#: crypt.c:726 crypt.c:766 +#: crypt.c:729 crypt.c:769 msgid "Trying to extract S/MIME certificates...\n" msgstr "Tentative d'extraction de certificats S/MIME...\n" -#: crypt.c:913 +#: crypt.c:916 #, c-format msgid "" "[-- Error: Unknown multipart/signed protocol %s! --]\n" @@ -1536,7 +1536,7 @@ "[-- Erreur : Protocole multipart/signed %s inconnu ! --]\n" "\n" -#: crypt.c:947 +#: crypt.c:950 msgid "" "[-- Error: Inconsistent multipart/signed structure! --]\n" "\n" @@ -1544,7 +1544,7 @@ "[-- Erreur : Structure multipart/signed incohérente ! --]\n" "\n" -#: crypt.c:986 +#: crypt.c:989 #, c-format msgid "" "[-- Warning: We can't verify %s/%s signatures. --]\n" @@ -1553,7 +1553,7 @@ "[-- Attention : les signatures %s/%s ne peuvent pas être vérifiées. --]\n" "\n" -#: crypt.c:998 +#: crypt.c:1001 msgid "" "[-- The following data is signed --]\n" "\n" @@ -1561,7 +1561,7 @@ "[-- Les données suivantes sont signées --]\n" "\n" -#: crypt.c:1004 +#: crypt.c:1007 msgid "" "[-- Warning: Can't find any signatures. --]\n" "\n" @@ -1569,7 +1569,7 @@ "[-- Attention : Impossible de trouver des signatures. --]\n" "\n" -#: crypt.c:1010 +#: crypt.c:1013 msgid "" "\n" "[-- End of signed data --]\n" @@ -1597,7 +1597,7 @@ msgid "Exit Mutt?" msgstr "Quitter Mutt ?" -#: curs_lib.c:521 mutt_socket.c:577 mutt_ssl.c:415 +#: curs_lib.c:521 mutt_socket.c:577 mutt_ssl.c:426 msgid "unknown error" msgstr "erreur inconnue" @@ -1661,7 +1661,7 @@ msgid "Mail" msgstr "Message" -#: curs_main.c:486 pager.c:1540 +#: curs_main.c:486 pager.c:1552 msgid "Reply" msgstr "Répondre" @@ -1708,7 +1708,7 @@ msgstr "Numéro de message invalide." #. L10N: CHECK_ACL -#: curs_main.c:872 curs_main.c:1970 pager.c:2390 +#: curs_main.c:872 curs_main.c:1970 pager.c:2402 msgid "Cannot delete message(s)" msgstr "Impossible d'effacer le(s) message(s)" @@ -1735,7 +1735,7 @@ msgid "To view all messages, limit to \"all\"." msgstr "Pour voir tous les messages, limiter à \"all\"." -#: curs_main.c:946 pager.c:1939 +#: curs_main.c:946 pager.c:1951 msgid "Quit Mutt?" msgstr "Quitter Mutt ?" @@ -1744,7 +1744,7 @@ msgstr "Marquer les messages correspondant à : " #. L10N: CHECK_ACL -#: curs_main.c:1046 curs_main.c:2268 pager.c:2704 +#: curs_main.c:1046 curs_main.c:2268 pager.c:2716 msgid "Cannot undelete message(s)" msgstr "Impossible de récupérer le(s) message(s)" @@ -1830,11 +1830,11 @@ msgid "You are on the first message." msgstr "Vous êtes sur le premier message." -#: curs_main.c:1555 menu.c:757 pager.c:2057 pattern.c:1489 +#: curs_main.c:1555 menu.c:757 pager.c:2069 pattern.c:1489 msgid "Search wrapped to top." msgstr "La recherche est repartie du début." -#: curs_main.c:1564 pager.c:2079 pattern.c:1500 +#: curs_main.c:1564 pager.c:2091 pattern.c:1500 msgid "Search wrapped to bottom." msgstr "La recherche est repartie de la fin." @@ -1860,7 +1860,7 @@ msgstr "Impossible de marquer le message" #. L10N: CHECK_ACL -#: curs_main.c:1673 pager.c:2668 +#: curs_main.c:1673 pager.c:2680 msgid "Cannot toggle new" msgstr "Impossible d'inverser l'indic. 'nouveau'" @@ -1877,7 +1877,7 @@ msgstr "Cette discussion contient des messages non-lus." #. L10N: CHECK_ACL -#: curs_main.c:1928 pager.c:2358 +#: curs_main.c:1928 pager.c:2370 msgid "Cannot delete message" msgstr "Impossible d'effacer le message" @@ -1892,7 +1892,7 @@ msgstr "Impossible de marquer le(s) message(s) comme lu(s)" #. L10N: CHECK_ACL -#: curs_main.c:2240 pager.c:2688 +#: curs_main.c:2240 pager.c:2700 msgid "Cannot undelete message" msgstr "Impossible de récupérer le message" @@ -2169,15 +2169,15 @@ msgid "%s: unable to attach file" msgstr "%s : impossible d'attacher le fichier" -#: help.c:306 +#: help.c:310 msgid "ERROR: please report this bug" msgstr "ERREUR : veuillez signaler ce problème" -#: help.c:348 +#: help.c:352 msgid "<UNKNOWN>" msgstr "<INCONNU>" -#: help.c:360 +#: help.c:364 msgid "" "\n" "Generic bindings:\n" @@ -2187,7 +2187,7 @@ "Affectations génériques :\n" "\n" -#: help.c:364 +#: help.c:368 msgid "" "\n" "Unbound functions:\n" @@ -2198,7 +2198,7 @@ "\n" # , c-format -#: help.c:372 +#: help.c:376 #, c-format msgid "Help for %s" msgstr "Aide pour %s" @@ -2300,7 +2300,7 @@ msgid "Create mailbox: " msgstr "Créer la boîte aux lettres : " -#: imap/browse.c:283 imap/browse.c:338 +#: imap/browse.c:283 imap/browse.c:336 msgid "Mailbox must have a name." msgstr "La boîte aux lettres doit avoir un nom." @@ -2308,17 +2308,21 @@ msgid "Mailbox created." msgstr "Boîte aux lettres créée." -#: imap/browse.c:330 +#: imap/browse.c:324 +msgid "Cannot rename root folder" +msgstr "Impossible de renommer le dossier racine" + +#: imap/browse.c:328 #, c-format msgid "Rename mailbox %s to: " msgstr "Renommer la boîte aux lettres %s en : " -#: imap/browse.c:346 +#: imap/browse.c:344 #, c-format msgid "Rename failed: %s" msgstr "Le renommage a échoué : %s" -#: imap/browse.c:351 +#: imap/browse.c:349 msgid "Mailbox renamed." msgstr "Boîte aux lettres renommée." @@ -3102,15 +3106,15 @@ msgid "You are on the first entry." msgstr "Vous êtes sur la première entrée." -#: menu.c:731 pager.c:2101 pattern.c:1428 +#: menu.c:731 pager.c:2113 pattern.c:1428 msgid "Search for: " msgstr "Rechercher : " -#: menu.c:731 pager.c:2101 pattern.c:1428 +#: menu.c:731 pager.c:2113 pattern.c:1428 msgid "Reverse search for: " msgstr "Rechercher en arrière : " -#: menu.c:775 pager.c:2054 pager.c:2076 pager.c:2196 pattern.c:1543 +#: menu.c:775 pager.c:2066 pager.c:2088 pager.c:2208 pattern.c:1543 msgid "Not found." msgstr "Non trouvé." @@ -3214,34 +3218,42 @@ msgid "Could not connect to %s (%s)." msgstr "Impossible de se connecter à %s (%s)." -#: mutt_ssl.c:225 +#: mutt_ssl.c:226 msgid "Failed to find enough entropy on your system" msgstr "Impossible de trouver assez d'entropie sur votre système" -#: mutt_ssl.c:249 +#: mutt_ssl.c:250 #, c-format msgid "Filling entropy pool: %s...\n" msgstr "Remplissage du tas d'entropie : %s...\n" -#: mutt_ssl.c:257 +#: mutt_ssl.c:258 #, c-format msgid "%s has insecure permissions!" msgstr "%s a des droits d'accès peu sûrs !" -#: mutt_ssl.c:276 +#: mutt_ssl.c:277 msgid "SSL disabled due to the lack of entropy" msgstr "SSL désactivé par manque d'entropie" -#: mutt_ssl.c:409 +#. L10N: an SSL context is a data structure returned by the OpenSSL +#. * function SSL_CTX_new(). In this case it returned NULL: an +#. * error condition. +#. +#: mutt_ssl.c:344 +msgid "Unable to create SSL context" +msgstr "Impossible de créer le contexte SSL" + +#: mutt_ssl.c:420 msgid "I/O error" msgstr "erreur d'E/S" -#: mutt_ssl.c:418 +#: mutt_ssl.c:429 #, c-format msgid "SSL failed: %s" msgstr "SSL a échoué : %s" -#: mutt_ssl.c:427 mutt_ssl_gnutls.c:1079 mutt_ssl_gnutls.c:1114 +#: mutt_ssl.c:438 mutt_ssl_gnutls.c:1079 mutt_ssl_gnutls.c:1114 #: mutt_ssl_gnutls.c:1124 msgid "Unable to get certificate from peer" msgstr "Impossible d'obtenir le certificat de la machine distante" @@ -3251,106 +3263,106 @@ #. %1$s is version (e.g. "TLSv1.2") #. %2$s is cipher_version (e.g. "TLSv1/SSLv3") #. %3$s is cipher_name (e.g. "ECDHE-RSA-AES128-GCM-SHA256") -#: mutt_ssl.c:439 +#: mutt_ssl.c:450 #, c-format msgid "%s connection using %s (%s)" msgstr "Connexion %s utilisant %s (%s)" -#: mutt_ssl.c:541 +#: mutt_ssl.c:568 msgid "Unknown" msgstr "Inconnu" # , c-format -#: mutt_ssl.c:566 mutt_ssl_gnutls.c:598 +#: mutt_ssl.c:593 mutt_ssl_gnutls.c:598 #, c-format msgid "[unable to calculate]" msgstr "[impossible de calculer]" # , c-format -#: mutt_ssl.c:584 mutt_ssl_gnutls.c:621 +#: mutt_ssl.c:611 mutt_ssl_gnutls.c:621 msgid "[invalid date]" msgstr "[date invalide]" -#: mutt_ssl.c:712 +#: mutt_ssl.c:739 msgid "Server certificate is not yet valid" msgstr "Le certificat du serveur n'est pas encore valide" -#: mutt_ssl.c:719 +#: mutt_ssl.c:746 msgid "Server certificate has expired" msgstr "Le certificat du serveur a expiré" -#: mutt_ssl.c:841 +#: mutt_ssl.c:868 msgid "cannot get certificate subject" msgstr "impossible d'obtenir le détenteur du certificat (subject)" -#: mutt_ssl.c:851 mutt_ssl.c:860 +#: mutt_ssl.c:878 mutt_ssl.c:887 msgid "cannot get certificate common name" msgstr "impossible d'obtenir le nom du détenteur du certificat (CN)" -#: mutt_ssl.c:874 +#: mutt_ssl.c:901 #, c-format msgid "certificate owner does not match hostname %s" msgstr "le propriétaire du certificat ne correspond pas au nom %s" -#: mutt_ssl.c:915 +#: mutt_ssl.c:942 #, c-format msgid "Certificate host check failed: %s" msgstr "Échec de vérification de machine : %s" -#: mutt_ssl.c:993 mutt_ssl_gnutls.c:860 +#: mutt_ssl.c:1020 mutt_ssl_gnutls.c:860 msgid "This certificate belongs to:" msgstr "Ce certificat appartient à :" -#: mutt_ssl.c:1006 mutt_ssl_gnutls.c:899 +#: mutt_ssl.c:1033 mutt_ssl_gnutls.c:899 msgid "This certificate was issued by:" msgstr "Ce certificat a été émis par :" -#: mutt_ssl.c:1017 mutt_ssl_gnutls.c:938 +#: mutt_ssl.c:1044 mutt_ssl_gnutls.c:938 #, c-format msgid "This certificate is valid" msgstr "Ce certificat est valide" -#: mutt_ssl.c:1018 mutt_ssl_gnutls.c:941 +#: mutt_ssl.c:1045 mutt_ssl_gnutls.c:941 #, c-format msgid " from %s" msgstr " de %s" -#: mutt_ssl.c:1020 mutt_ssl_gnutls.c:945 +#: mutt_ssl.c:1047 mutt_ssl_gnutls.c:945 #, c-format msgid " to %s" msgstr " à %s" -#: mutt_ssl.c:1026 +#: mutt_ssl.c:1053 #, c-format msgid "Fingerprint: %s" msgstr "Empreinte : %s" -#: mutt_ssl.c:1029 mutt_ssl_gnutls.c:982 +#: mutt_ssl.c:1056 mutt_ssl_gnutls.c:982 #, c-format msgid "SSL Certificate check (certificate %d of %d in chain)" msgstr "Vérification du certificat SSL (certificat %d sur %d dans la chaîne)" -#: mutt_ssl.c:1037 mutt_ssl_gnutls.c:991 +#: mutt_ssl.c:1064 mutt_ssl_gnutls.c:991 msgid "(r)eject, accept (o)nce, (a)ccept always" msgstr "(r)ejeter, accepter (u)ne fois, (a)ccepter toujours" -#: mutt_ssl.c:1038 mutt_ssl_gnutls.c:992 +#: mutt_ssl.c:1065 mutt_ssl_gnutls.c:992 msgid "roa" msgstr "rua" -#: mutt_ssl.c:1042 mutt_ssl_gnutls.c:996 +#: mutt_ssl.c:1069 mutt_ssl_gnutls.c:996 msgid "(r)eject, accept (o)nce" msgstr "(r)ejeter, accepter (u)ne fois" -#: mutt_ssl.c:1043 mutt_ssl_gnutls.c:997 +#: mutt_ssl.c:1070 mutt_ssl_gnutls.c:997 msgid "ro" msgstr "ru" -#: mutt_ssl.c:1074 mutt_ssl_gnutls.c:1046 +#: mutt_ssl.c:1101 mutt_ssl_gnutls.c:1046 msgid "Warning: Couldn't save certificate" msgstr "Attention : le certificat n'a pas pu être sauvé" -#: mutt_ssl.c:1079 mutt_ssl_gnutls.c:1051 +#: mutt_ssl.c:1106 mutt_ssl_gnutls.c:1051 msgid "Certificate saved" msgstr "Certificat sauvé" @@ -3601,39 +3613,39 @@ msgid "Integer overflow -- can't allocate memory." msgstr "Dépassement de capacité sur entier -- impossible d'allouer la mémoire." -#: pager.c:1533 +#: pager.c:1545 msgid "PrevPg" msgstr "PgPréc" -#: pager.c:1534 +#: pager.c:1546 msgid "NextPg" msgstr "PgSuiv" -#: pager.c:1538 +#: pager.c:1550 msgid "View Attachm." msgstr "Voir attach." -#: pager.c:1541 +#: pager.c:1553 msgid "Next" msgstr "Suivant" -#: pager.c:1955 pager.c:1986 pager.c:2018 pager.c:2294 +#: pager.c:1967 pager.c:1998 pager.c:2030 pager.c:2306 msgid "Bottom of message is shown." msgstr "La fin du message est affichée." -#: pager.c:1971 pager.c:1993 pager.c:2000 pager.c:2007 +#: pager.c:1983 pager.c:2005 pager.c:2012 pager.c:2019 msgid "Top of message is shown." msgstr "Le début du message est affiché." -#: pager.c:2232 +#: pager.c:2244 msgid "Help is currently being shown." msgstr "L'aide est actuellement affichée." -#: pager.c:2261 +#: pager.c:2273 msgid "No more quoted text." msgstr "Il n'y a plus de texte cité." -#: pager.c:2274 +#: pager.c:2286 msgid "No more unquoted text after quoted text." msgstr "Il n'y a plus de texte non cité après le texte cité." @@ -4383,15 +4395,15 @@ msgid "Save attachments in Fcc?" msgstr "Sauver les attachements dans Fcc ?" -#: send.c:1897 +#: send.c:1898 msgid "Could not send the message." msgstr "Impossible d'envoyer le message." -#: send.c:1902 +#: send.c:1903 msgid "Mail sent." msgstr "Message envoyé." -#: send.c:1902 +#: send.c:1903 msgid "Sending in background." msgstr "Envoi en tâche de fond." diff -r a6a4d6ed0f19 -r 8083387557d9 rfc2047.c --- a/rfc2047.c Sun Apr 10 16:02:06 2016 -0700 +++ b/rfc2047.c Wed Apr 27 13:21:15 2016 -0700 @@ -410,7 +410,7 @@ int ret = 0; char *buf; size_t bufpos, buflen; - char *u, *t0, *t1, *t; + char *u = NULL, *t0, *t1, *t; char *s0, *s1; size_t ulen, r, n, wlen; encoder_t encoder; @@ -423,7 +423,7 @@ { ret = 1; icode = 0; - u = safe_malloc ((ulen = dlen) + 1); + safe_realloc (&u, (ulen = dlen) + 1); memcpy (u, d, dlen); u[ulen] = 0; } diff -r a6a4d6ed0f19 -r 8083387557d9 sys_socket.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys_socket.h Wed Apr 27 13:21:15 2016 -0700 @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2016 Kevin J. McCarthy <ke...@8t8.us> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Solaris, OpenIndiana, and probably other derivatives + * are including sys/stream.h inside their sys/socket.h. + * + * This include file is defining macros M_CMD and M_READ which + * are conflicting with the same macros Mutt defines in mutt.h + * + * To minimize breakage with out-of-tree patches, this is a workaround. + */ + +#ifdef M_CMD +# define MUTT_ORIG_CMD M_CMD +# undef M_CMD +#endif + +#ifdef M_READ +# define MUTT_ORIG_READ M_READ