[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: ncurses-6.0-20160903 - revamped sigprocmask patch
From: |
Rich Coe |
Subject: |
Re: ANN: ncurses-6.0-20160903 - revamped sigprocmask patch |
Date: |
Sun, 4 Sep 2016 19:05:54 -0500 |
On Sun, 4 Sep 2016 02:19:57 +0000
Thomas Dickey <address@hidden> wrote:
> ncurses 6.0 - patch 20160903 - Thomas E. Dickey
> 20160903
> + correct 20100515 change for weak signals versus sigprocmask (report
> by Rich Coe).
> + modify misc/Makefile.in to work around OpenBSD "make" which unlike
> all other versions of "make" does not recognize continuation lines
> of comments.
> + amend the last change to CF_C_ENV_FLAGS to move only the
> preprocessor, optimization and warning flags to CPPFLAGS and CFLAGS,
> leaving the residue in CC. That happens to work for gcc's various
> "model" options, but may require tuning for other compilers (report
> by Sven Joachim).
I applied the patch and _nc_sigprocmask is still calling itself.
The cpp trick of wrapping the macro target in parentheses only works if the
macro itself takes arguments.
How about this patch?
--- ncurses/curses.priv.h.orig 2016-09-04 18:52:55.639691452 -0500
+++ ncurses/curses.priv.h 2016-09-04 18:53:34.248200946 -0500
@@ -561,7 +561,7 @@ weak_symbol(pthread_mutexattr_settype);
weak_symbol(pthread_mutexattr_init);
extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
# undef sigprocmask
-# define sigprocmask _nc_sigprocmask
+# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
# endif
#endif
@@ -581,7 +581,7 @@ weak_symbol(pthread_self);
weak_symbol(pthread_equal);
extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
# undef sigprocmask
-# define sigprocmask _nc_sigprocmask
+# define sigprocmask(a, b, c) _nc_sigprocmask(a, b, c)
# endif
#endif /* USE_PTHREADS_EINTR */
--
Rich Coe address@hidden