From 49e0326aeef4cdc75898bf3049bfa3c123688e0f Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 11 Apr 2012 20:59:57 -0500 Subject: [PATCH] Undid wrapping of setjmp() and sigsetjmp() of 4548981fb45fbc917cc2c26b7c96b31cf a14bc9b. What a bad idea. --- MACHINES | 2 +- Makefile.am | 4 ++-- h/m_setjmp.h | 16 ---------------- sbr/getans.c | 2 +- sbr/getansreadline.c | 2 +- sbr/m_setjmp.c | 25 ------------------------- uip/mhlsbr.c | 6 +++--- uip/mhshowsbr.c | 4 ++-- uip/msh.c | 4 ++-- uip/prompter.c | 4 ++-- uip/rcvtty.c | 6 +++--- uip/sendsbr.c | 4 ++-- uip/slocal.c | 4 ++-- 13 files changed, 21 insertions(+), 62 deletions(-) delete mode 100644 h/m_setjmp.h delete mode 100644 sbr/m_setjmp.c diff --git a/MACHINES b/MACHINES index 9a55e2c..4506620 100644 --- a/MACHINES +++ b/MACHINES @@ -45,7 +45,7 @@ Cygwin: Be sure to install Cygwin packages libncurses-devel and libncurses10, in the Libs category. -You may notice a few (three) compile warnings: they can be ignored. +The few minor compile warnings can be ignored. -------------------------------------- HPUX: diff --git a/Makefile.am b/Makefile.am index 80d87f5..56ecdb1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -136,7 +136,7 @@ noinst_LIBRARIES = sbr/libmh.a sbr/libdtimep.a mts/libmts.a ## them, but that might change in the future. ## noinst_HEADERS = h/addrsbr.h h/aliasbr.h h/crawl_folders.h h/dropsbr.h \ - h/fmt_compile.h h/fmt_scan.h h/m_setjmp.h h/md5.h h/mf.h \ + h/fmt_compile.h h/fmt_scan.h h/md5.h h/mf.h \ h/mh.h h/mhcachesbr.h h/mhparse.h h/mime.h h/msh.h \ h/mts.h h/nmh.h h/picksbr.h h/popsbr.h h/prototypes.h \ h/rcvmail.h h/scansbr.h h/signals.h h/tws.h h/utils.h \ @@ -470,7 +470,7 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/brkstring.c \ sbr/fmt_rfc2047.c sbr/fmt_scan.c sbr/lock_file.c \ sbr/m_atoi.c sbr/m_backup.c sbr/m_convert.c \ sbr/m_draft.c sbr/m_getfld.c sbr/m_gmprot.c \ - sbr/m_maildir.c sbr/m_name.c sbr/m_setjmp.c \ + sbr/m_maildir.c sbr/m_name.c \ sbr/makedir.c sbr/mts.c sbr/norm_charmap.c sbr/path.c \ sbr/peekc.c sbr/pidwait.c sbr/pidstatus.c \ sbr/print_help.c sbr/print_sw.c sbr/print_version.c \ diff --git a/h/m_setjmp.h b/h/m_setjmp.h deleted file mode 100644 index 767c3f1..0000000 --- a/h/m_setjmp.h +++ /dev/null @@ -1,16 +0,0 @@ - -/* - * m_setjmp.h -- Wraps setjmp() and sigsetjmp(), to help prevent warnings - * -- about arguments and variables that might be clobbered by - * -- a setjmp call with gcc -Wclobbered. - * - * This code is Copyright (c) 2012, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ - -#include - -int m_setjmp(jmp_buf); - -int m_sigsetjmp(sigjmp_buf, int); diff --git a/sbr/getans.c b/sbr/getans.c index 9c10fd3..3ef01ed 100644 --- a/sbr/getans.c +++ b/sbr/getans.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/sbr/getansreadline.c b/sbr/getansreadline.c index 7c862f2..26a0574 100644 --- a/sbr/getansreadline.c +++ b/sbr/getansreadline.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/sbr/m_setjmp.c b/sbr/m_setjmp.c deleted file mode 100644 index f19546b..0000000 --- a/sbr/m_setjmp.c +++ /dev/null @@ -1,25 +0,0 @@ - -/* - * m_setjmp.h -- Wraps setjmp() and sigsetjmp(), to help prevent warnings - * -- about arguments and variables that might be clobbered by - * -- a setjmp call with gcc -Wclobbered. - * - * This code is Copyright (c) 2012, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ - -#include - - -int -m_setjmp(jmp_buf env) { - return setjmp(env); -} - - -int -m_sigsetjmp(sigjmp_buf env, int savesigs) { - return sigsetjmp(env, savesigs); -} - diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 7c13bec..be63c25 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -868,7 +868,7 @@ process (char *folder, char *fname, int ofilen, int ofilec) struct mcomp *c1; struct stat st; - switch (m_setjmp (env)) { + switch (setjmp (env)) { case OK: if (fname) { fp = mhl_action ? (*mhl_action) (fname) : fopen (fname, "r"); @@ -1772,7 +1772,7 @@ mhlsbr (int argc, char **argv, FILE *(*action)()) char *cp = NULL; struct mcomp *c1; - switch (m_setjmp (mhlenv)) { + switch (setjmp (mhlenv)) { case OK: cp = invo_name; sleepsw = 0; /* XXX */ diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 6bfc0bc..9c1c0de 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -535,7 +535,7 @@ show_content_aux2 (CT ct, int serial, int alternate, char *cracked, char *buffer SIGNAL_HANDLER istat; istat = SIGNAL (SIGINT, intrser); - if ((intr = m_sigsetjmp (intrenv, 1)) == OK) { + if ((intr = sigsetjmp (intrenv, 1)) == OK) { fflush (stdout); prompt[0] = 0; read (fileno (stdout), prompt, sizeof(prompt)); diff --git a/uip/msh.c b/uip/msh.c index 7b5575e..80bc1d2 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -1915,7 +1915,7 @@ pFIN (void) { int status; - switch (m_setjmp (peerenv)) { + switch (setjmp (peerenv)) { case OK: SIGNAL (SIGALRM, alrmser); alarm (ALARM); diff --git a/uip/prompter.c b/uip/prompter.c index ecfd05f..981e820 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include @@ -353,7 +353,7 @@ getln (char *buffer, int n) cp = buffer; *cp = 0; - switch (m_setjmp (sigenv)) { + switch (setjmp (sigenv)) { case OK: wtuser = 1; break; diff --git a/uip/rcvtty.c b/uip/rcvtty.c index f61f0b9..048407a 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -198,7 +198,7 @@ message_fd (char **vec) return header_fd (); } else if (child_id) { /* parent process */ - if (!m_setjmp (myctx)) { + if (!setjmp (myctx)) { SIGNAL (SIGALRM, alrmser); bytes = fstat(fileno (stdin), &st) != NOTOK ? (int) st.st_size : 100; @@ -284,7 +284,7 @@ alert (char *tty, int md) if (stat (ttyspec, &st) == NOTOK || (st.st_mode & mask) == 0) return; - if (!m_setjmp (myctx)) { + if (!setjmp (myctx)) { SIGNAL (SIGALRM, alrmser); alarm (2); td = open (ttyspec, O_WRONLY); diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 91eaddf..d866ebc 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include @@ -110,7 +110,7 @@ sendsbr (char **vec, int vecp, char *drft, struct stat *st, int rename_drft, cha } done=armed_done; - switch (m_setjmp (env)) { + switch (setjmp (env)) { case OK: /* * If given -push and -unique (which is undocumented), then diff --git a/uip/slocal.c b/uip/slocal.c index 5026d82..71e09ff 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -1123,7 +1123,7 @@ usr_pipe (int fd, char *cmd, char *pgm, char **vec, int suppress) default: /* parent process */ - if (! m_setjmp (myctx)) { + if (! setjmp (myctx)) { SIGNAL (SIGALRM, alrmser); bytes = fstat (fd, &st) != -1 ? (int) st.st_size : 100; -- 1.7.10.4