[Freeswitch-svn] [commit] r5226 - in freeswitch/trunk/libs/libedit: . src

Freeswitch SVN mikej at freeswitch.org
Mon May 28 01:52:34 EDT 2007


Author: mikej
Date: Mon May 28 01:52:34 2007
New Revision: 5226

Modified:
   freeswitch/trunk/libs/libedit/Makefile.am
   freeswitch/trunk/libs/libedit/src/el.c
   freeswitch/trunk/libs/libedit/src/sig.c
   freeswitch/trunk/libs/libedit/src/sig.h
   freeswitch/trunk/libs/libedit/src/term.c
   freeswitch/trunk/libs/libedit/src/unvis.c
   freeswitch/trunk/libs/libedit/src/vi.c
   freeswitch/trunk/libs/libedit/src/vis.c

Log:
fix bsd build

Modified: freeswitch/trunk/libs/libedit/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/libedit/Makefile.am	(original)
+++ freeswitch/trunk/libs/libedit/Makefile.am	Mon May 28 01:52:34 2007
@@ -1,7 +1,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = src examples doc
+SUBDIRS = src
 
 ## GENERATED BY SCRIPT - DO NOT EDIT BELOW
 

Modified: freeswitch/trunk/libs/libedit/src/el.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/el.c	(original)
+++ freeswitch/trunk/libs/libedit/src/el.c	Mon May 28 01:52:34 2007
@@ -522,7 +522,9 @@
 	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 */

Modified: freeswitch/trunk/libs/libedit/src/sig.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/sig.c	(original)
+++ freeswitch/trunk/libs/libedit/src/sig.c	Mon May 28 01:52:34 2007
@@ -83,9 +83,11 @@
 		term__flush();
 		break;
 
+#ifdef SIGWINCH
 	case SIGWINCH:
 		el_resize(sel);
 		break;
+#endif
 
 	default:
 		tty_cookedmode(sel);

Modified: freeswitch/trunk/libs/libedit/src/sig.h
==============================================================================
--- freeswitch/trunk/libs/libedit/src/sig.h	(original)
+++ freeswitch/trunk/libs/libedit/src/sig.h	Mon May 28 01:52:34 2007
@@ -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;

Modified: freeswitch/trunk/libs/libedit/src/term.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/term.c	(original)
+++ freeswitch/trunk/libs/libedit/src/term.c	Mon May 28 01:52:34 2007
@@ -905,7 +905,9 @@
 	int lins, cols;
 
 	(void) sigemptyset(&nset);
+#ifdef SIGWINCH
 	(void) sigaddset(&nset, SIGWINCH);
+#endif
 	(void) sigprocmask(SIG_BLOCK, &nset, &oset);
 
 	area = buf;

Modified: freeswitch/trunk/libs/libedit/src/unvis.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/unvis.c	(original)
+++ freeswitch/trunk/libs/libedit/src/unvis.c	Mon May 28 01:52:34 2007
@@ -63,7 +63,7 @@
 #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))
 
 /*

Modified: freeswitch/trunk/libs/libedit/src/vi.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/vi.c	(original)
+++ freeswitch/trunk/libs/libedit/src/vi.c	Mon May 28 01:52:34 2007
@@ -915,14 +915,14 @@
  * 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;
 

Modified: freeswitch/trunk/libs/libedit/src/vis.c
==============================================================================
--- freeswitch/trunk/libs/libedit/src/vis.c	(original)
+++ freeswitch/trunk/libs/libedit/src/vis.c	Mon May 28 01:52:34 2007
@@ -106,7 +106,7 @@
 #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 @@
 	}								      \
 	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++ = '\\';		      \



More information about the Freeswitch-svn mailing list