]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix bsd build
authorMichael Jerris <mike@jerris.com>
Mon, 28 May 2007 05:52:34 +0000 (05:52 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 28 May 2007 05:52:34 +0000 (05:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5226 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/libedit/Makefile.am
libs/libedit/src/el.c
libs/libedit/src/sig.c
libs/libedit/src/sig.h
libs/libedit/src/term.c
libs/libedit/src/unvis.c
libs/libedit/src/vi.c
libs/libedit/src/vis.c

index 3d95e951a9e0593eac1239fcd8a82a136ec76d54..eed7a0c58375fb3a421c50d994522cbf54fd2bc2 100644 (file)
@@ -1,7 +1,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = src examples doc
+SUBDIRS = src
 
 ## GENERATED BY SCRIPT - DO NOT EDIT BELOW
 
index 8d748f6c2b5a6f9a1c735d8260e5f22866b896c2..eaafcc59def8193047934f1e47ebda000077c39e 100644 (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 */
index cec431911913f27f1acf1f24247c9858bb4c7fbb..4536d9ce82e9cb61baebdf2889bd3753b061fd0d 100644 (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);
index 0bf1fc37e39451adb9f04654dedee11f4e9e8693..877370e36edeec402e18d01d69d1d314ce62dc6f 100644 (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)    \
        _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;
index 34e4b23e5313f8e89049a6c164d9f548f978fc49..5fca915f66ca0579802c8e28d034ecbbea6dfee1 100644 (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;
index 31bf3e54a6b96fa9eddb1d8359e3aa59ed8985e1..fce2216c57bbfd8235f74a1376edc63a28d0643b 100644 (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))
 
 /*
index 5107bd2ec1e444e6fdb0e37680559534e187737d..bb408d329ca913a1943f87c8d13365d2a053e4f5 100644 (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;
 
index 0ad9c608911943356cbd8ad388f5d67f953b31e0..6148f42e3d9bd0e487a0694eb499f3daf6fa43d3 100644 (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++ = '\\';                 \