Re: [PATCH] embedding a directive within macro arguments is not portable
Dennis Preiser <[email protected]> Thu, 9 Dec 2010 17:53:38 +0100
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Dec 02, 2010 at 11:54:06PM +0100, Urs JanÃen wrote: > just to be one the safe side Another in post.c: diff -urp tin-1.9.6/src/post.c tin-1.9.6_r1/src/post.c --- tin-1.9.6/src/post.c 2010-12-04 08:41:10.000000000 +0100 +++ tin-1.9.6_r1/src/post.c 2010-12-09 17:41:50.000000000 +0100 @@ -1886,18 +1886,43 @@ post_article_loop: char keypgp[MAXKEYLEN]; #endif /* HAVE_PGP_GPG */ +#if defined(HAVE_ISPELL) && defined(HAVE_PGP_GPG) snprintf(buf, sizeof(buf), _(txt_quit_edit_xpost), printascii(keyquit, func_to_key(GLOBAL_QUIT, post_post_keys)), printascii(keyedit, func_to_key(POST_EDIT, post_post_keys)), -#ifdef HAVE_ISPELL printascii(keyispell, func_to_key(POST_ISPELL, post_post_keys)), -#endif /* HAVE_ISPELL */ -#ifdef HAVE_PGP_GPG printascii(keypgp, func_to_key(POST_PGP, post_post_keys)), -#endif /* HAVE_PGP_GPG */ printascii(keymenu, func_to_key(GLOBAL_OPTION_MENU, post_post_keys)), printascii(keypost, func_to_key(GLOBAL_POST, post_post_keys)), printascii(keypostpone, func_to_key(POST_POSTPONE, post_post_keys))); +#else +# ifdef HAVE_ISPELL + snprintf(buf, sizeof(buf), _(txt_quit_edit_xpost), + printascii(keyquit, func_to_key(GLOBAL_QUIT, post_post_keys)), + printascii(keyedit, func_to_key(POST_EDIT, post_post_keys)), + printascii(keyispell, func_to_key(POST_ISPELL, post_post_keys)), + printascii(keymenu, func_to_key(GLOBAL_OPTION_MENU, post_post_keys)), + printascii(keypost, func_to_key(GLOBAL_POST, post_post_keys)), + printascii(keypostpone, func_to_key(POST_POSTPONE, post_post_keys))); +# else +# ifdef HAVE_PGP_GPG + snprintf(buf, sizeof(buf), _(txt_quit_edit_xpost), + printascii(keyquit, func_to_key(GLOBAL_QUIT, post_post_keys)), + printascii(keyedit, func_to_key(POST_EDIT, post_post_keys)), + printascii(keypgp, func_to_key(POST_PGP, post_post_keys)), + printascii(keymenu, func_to_key(GLOBAL_OPTION_MENU, post_post_keys)), + printascii(keypost, func_to_key(GLOBAL_POST, post_post_keys)), + printascii(keypostpone, func_to_key(POST_POSTPONE, post_post_keys))); +# else + snprintf(buf, sizeof(buf), _(txt_quit_edit_xpost), + printascii(keyquit, func_to_key(GLOBAL_QUIT, post_post_keys)), + printascii(keyedit, func_to_key(POST_EDIT, post_post_keys)), + printascii(keymenu, func_to_key(GLOBAL_OPTION_MENU, post_post_keys)), + printascii(keypost, func_to_key(GLOBAL_POST, post_post_keys)), + printascii(keypostpone, func_to_key(POST_POSTPONE, post_post_keys))); +# endif /* HAVE_PGP_GPG */ +# endif /* HAVE_ISPELL */ +#endif /* HAVE_ISPELL && HAVE_PGP_GPG */ /* Superfluous force_command stuff not used in current code */ func = ( /* force_command ? ch_default : */ prompt_slk_response(func,