Skip to content

Commit

Permalink
Support sigprocmask.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Jul 6, 2000
1 parent c46a5ba commit 56a2a85
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 1 deletion.
7 changes: 7 additions & 0 deletions defines.ds
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@
/* Define if you have the sigsetmask function. */
#define HAVE_SIGSETMASK 0

/* Define if you have the sigprocmask function. */
#define HAVE_SIGPROCMASK 0

/* Define if you have the sigset_t type and sigemptyset macro */
#define HAVE_SIGSET_T 0
#define HAVE_SIGEMPTYSET 0

/* Define if you have the stat function. */
#define HAVE_STAT 1

Expand Down
7 changes: 7 additions & 0 deletions defines.o2
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@
/* Define if you have the sigsetmask function. */
#define HAVE_SIGSETMASK 0

/* Define if you have the sigprocmask function. */
#define HAVE_SIGPROCMASK 0

/* Define if you have the sigset_t type and sigemptyset macro */
#define HAVE_SIGSET_T 0
#define HAVE_SIGEMPTYSET 0

/* Define if you have the stat function. */
#define HAVE_STAT 1

Expand Down
7 changes: 7 additions & 0 deletions defines.o9
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@
/* Define if you have the sigsetmask function. */
#define HAVE_SIGSETMASK 0

/* Define if you have the sigprocmask function. */
#define HAVE_SIGPROCMASK 0

/* Define if you have the sigset_t type and sigemptyset macro */
#define HAVE_SIGSET_T 0
#define HAVE_SIGEMPTYSET 0

/* Define if you have the stat function. */
#define HAVE_STAT 0

Expand Down
7 changes: 7 additions & 0 deletions defines.wn
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
/* Define if you have the sigsetmask function. */
#define HAVE_SIGSETMASK 0

/* Define if you have the sigprocmask function. */
#define HAVE_SIGPROCMASK 0

/* Define if you have the sigset_t type and sigemptyset macro */
#define HAVE_SIGSET_T 0
#define HAVE_SIGEMPTYSET 0

/* Define if you have the stat function. */
#define HAVE_STAT 1

Expand Down
14 changes: 14 additions & 0 deletions less.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,20 @@ struct textlist
#define LSIGNAL(sig,func) signal(sig,func)
#endif

#if HAVE_SIGPROCMASK
#if HAVE_SIGSET_T
#else
#undef HAVE_SIGPROCMASK
#endif
#endif
#if HAVE_SIGPROCMASK
#if HAVE_SIGEMPTYSET
#else
#undef sigemptyset
#define sigemptyset(mp) *(mp) = 0
#endif
#endif

#define S_INTERRUPT 01
#define S_STOP 02
#define S_WINCH 04
Expand Down
8 changes: 8 additions & 0 deletions os.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ iread(fd, buf, len)
* We jumped here from intread.
*/
reading = 0;
#if HAVE_SIGPROCMASK
{
sigset_t mask;
sigemptyset(&mask);
sigprocmask(SIG_SETMASK, &mask, NULL);
}
#else
#if HAVE_SIGSETMASK
sigsetmask(0);
#else
#ifdef _OSK
sigmask(~0);
#endif
#endif
#endif
return (READ_INTR);
}
Expand Down
3 changes: 2 additions & 1 deletion version.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ v354 3/23/00 Add support for PCRE; add --with-regex configure option.
-----------------------------------------------------------------
v355 6/28/00 Add -# option (thanks to Andy Levinson).
v356 7/5/00 Add -J option.
v357 7/6/00 Support sigprocmask.
*/

char version[] = "356";
char version[] = "357";

0 comments on commit 56a2a85

Please sign in to comment.