fix bsd build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5226 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-05-28 05:52:34 +00:00
parent f704b3f623
commit f7b787c700
8 changed files with 24 additions and 7 deletions

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src examples doc
SUBDIRS = src
## GENERATED BY SCRIPT - DO NOT EDIT BELOW

View File

@ -522,7 +522,9 @@ el_resize(EditLine *el)
sigset_t oset, nset;
(void) sigemptyset(&nset);
#ifdef SIGWINCH
(void) sigaddset(&nset, SIGWINCH);
#endif
(void) sigprocmask(SIG_BLOCK, &nset, &oset);
/* get the correct window size */

View File

@ -83,9 +83,11 @@ sig_handler(int signo)
term__flush();
break;
#ifdef SIGWINCH
case SIGWINCH:
el_resize(sel);
break;
#endif
default:
tty_cookedmode(sel);

View File

@ -48,6 +48,7 @@
* Define here all the signals we are going to handle
* The _DO macro is used to iterate in the source code
*/
#ifdef SIGWINCH
#define ALLSIGS \
_DO(SIGINT) \
_DO(SIGTSTP) \
@ -57,6 +58,16 @@
_DO(SIGTERM) \
_DO(SIGCONT) \
_DO(SIGWINCH)
#else
#define ALLSIGS \
_DO(SIGINT) \
_DO(SIGTSTP) \
_DO(SIGSTOP) \
_DO(SIGQUIT) \
_DO(SIGHUP) \
_DO(SIGTERM) \
_DO(SIGCONT)
#endif
typedef void (*el_signalhandler_t)(int);
typedef el_signalhandler_t *el_signal_t;

View File

@ -905,7 +905,9 @@ term_set(EditLine *el, const char *term)
int lins, cols;
(void) sigemptyset(&nset);
#ifdef SIGWINCH
(void) sigaddset(&nset, SIGWINCH);
#endif
(void) sigprocmask(SIG_BLOCK, &nset, &oset);
area = buf;

View File

@ -63,7 +63,7 @@ __weak_alias(strunvis,_strunvis)
#define S_HEX1 7 /* hex digit */
#define S_HEX2 8 /* hex digit 2 */
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
#define isoctal(c) (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7')
#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
/*

View File

@ -915,14 +915,14 @@ vi_comment_out(EditLine *el, int c)
* NB: posix implies that we should enter insert mode, however
* this is against historical precedent...
*/
#ifdef __weak_reference
#if defined(__weak_reference) && !defined(__FreeBSD__)
extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
#endif
protected el_action_t
/*ARGSUSED*/
vi_alias(EditLine *el, int c)
{
#ifdef __weak_reference
#if defined(__weak_reference) && !defined(__FreeBSD__)
char alias_name[3];
char *alias_text;

View File

@ -106,7 +106,7 @@ __weak_alias(vis,_vis)
#undef BELL
#define BELL '\a'
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
#define isoctal(c) (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7')
#define iswhite(c) (c == ' ' || c == '\t' || c == '\n')
#define issafe(c) (c == '\b' || c == BELL || c == '\r')
#define xtoa(c) "0123456789abcdef"[c]
@ -208,8 +208,8 @@ do { \
} \
if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { \
*dst++ = '\\'; \
*dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0'; \
*dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0'; \
*dst++ = (unsigned char)(((u_int32_t)(unsigned char)c >> 6) & 03) + '0'; \
*dst++ = (unsigned char)(((u_int32_t)(unsigned char)c >> 3) & 07) + '0'; \
*dst++ = (c & 07) + '0'; \
} else { \
if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; \