changed error message a bit...
authorAndreas Eversberg <andreas@eversberg.eu>
Tue, 6 Jan 2009 17:34:05 +0000 (18:34 +0100)
committerAndreas Eversberg <andreas@eversberg.eu>
Tue, 6 Jan 2009 17:34:05 +0000 (18:34 +0100)
added support for asterisk 1.6. it now compiles with both 1.4 and 1.6. (tested with 1.4 only) thanx to gregor for his valuable help!

modified:   bchannel.c
modified:   chan_lcr.c
modified:   config.h.in
modified:   configure
modified:   configure.ac
modified:   lcradmin.c
modified:   main.c

bchannel.c
chan_lcr.c
config.h.in
configure
configure.ac
lcradmin.c
main.c

index c25d770..473de82 100644 (file)
 #define MISDN_OLD_AF_COMPATIBILITY 1
 #include <compat_af_isdn.h>
 
 #define MISDN_OLD_AF_COMPATIBILITY 1
 #include <compat_af_isdn.h>
 
+#define HAVE_ATTRIBUTE_always_inline 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_TIMERSUB 1
+
+#include <asterisk/compiler.h>
 #include <asterisk/frame.h>
 
 
 #include <asterisk/frame.h>
 
 
index acc485d..53a7fb6 100644 (file)
@@ -121,6 +121,12 @@ it is called from ast_channel process which has already locked ast_channel.
 
 #include <semaphore.h>
 
 
 #include <semaphore.h>
 
+#define HAVE_ATTRIBUTE_always_inline 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_TIMERSUB 1
+
+#include <asterisk/compiler.h>
+#include <asterisk/buildopts.h>
 #include <asterisk/module.h>
 #include <asterisk/channel.h>
 #include <asterisk/config.h>
 #include <asterisk/module.h>
 #include <asterisk/channel.h>
 #include <asterisk/config.h>
index 34a46bf..75fe0e3 100644 (file)
@@ -3,8 +3,8 @@
 /* Define to 1 if you have the <assert.h> header file. */
 #undef HAVE_ASSERT_H
 
 /* Define to 1 if you have the <assert.h> header file. */
 #undef HAVE_ASSERT_H
 
-/* Define to 1 if you have the <asterisk/channel.h> header file. */
-#undef HAVE_ASTERISK_CHANNEL_H
+/* Define to 1 if you have the <asterisk/compiler.h> header file. */
+#undef HAVE_ASTERISK_COMPILER_H
 
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
index a0a90f8..f4e4de6 100755 (executable)
--- a/configure
+++ b/configure
@@ -5828,7 +5828,7 @@ fi
 
 if test "x$with_asterisk" != xno; then
 
 
 if test "x$with_asterisk" != xno; then
 
-for ac_header in asterisk/channel.h
+for ac_header in asterisk/compiler.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -5978,9 +5978,9 @@ else
   if test "x$with_asterisk" != xcheck ; then
                       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   if test "x$with_asterisk" != xcheck ; then
                       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-asterisk was given, but test for header-file asterisk/channel.h failed
+{ { $as_echo "$as_me:$LINENO: error: --with-asterisk was given, but test for header-file asterisk/compiler.h failed
 See \`config.log' for more details." >&5
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-asterisk was given, but test for header-file asterisk/channel.h failed
+$as_echo "$as_me: error: --with-asterisk was given, but test for header-file asterisk/compiler.h failed
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
                      fi
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
                      fi
index ef76a4e..9012f57 100644 (file)
@@ -59,11 +59,11 @@ AC_ARG_WITH([asterisk],
        [with_asterisk="check"])
 
 AS_IF([test "x$with_asterisk" != xno],
        [with_asterisk="check"])
 
 AS_IF([test "x$with_asterisk" != xno],
-      [AC_CHECK_HEADERS([asterisk/channel.h],
+      [AC_CHECK_HEADERS([asterisk/compiler.h],
                        [with_asterisk="yes"],
                        [if test "x$with_asterisk" != xcheck ; then
                       AC_MSG_FAILURE(
                        [with_asterisk="yes"],
                        [if test "x$with_asterisk" != xcheck ; then
                       AC_MSG_FAILURE(
-                        [--with-asterisk was given, but test for header-file asterisk/channel.h failed])
+                        [--with-asterisk was given, but test for header-file asterisk/compiler.h failed])
                      fi
                     ])
       ])
                      fi
                     ])
       ])
index d841e49..dc80d43 100644 (file)
@@ -1393,7 +1393,7 @@ const char *admin_portinfo(int sock, int argc, char *argv[])
                        printf("\t port = unknown\n");
                else
                        printf("\t port = %d \"%s\"\n",m[i].u.i.portnum, m[i].u.i.portname);
                        printf("\t port = unknown\n");
                else
                        printf("\t port = %d \"%s\"\n",m[i].u.i.portnum, m[i].u.i.portname);
-               printf("\t extension = %s\n", (m[i].u.i.extension)?" yes":"no");
+               printf("\t extension = %s\n", (m[i].u.i.extension)?"yes":"no");
                if (m[i].u.i.block >= 2)
                {
                        printf("\t status = not loaded\n");
                if (m[i].u.i.block >= 2)
                {
                        printf("\t status = not loaded\n");
diff --git a/main.c b/main.c
index f63b9bf..0a85f46 100644 (file)
--- a/main.c
+++ b/main.c
@@ -410,16 +410,16 @@ int main(int argc, char *argv[])
                switch(errno)
                {
                        case ENOMEM:
                switch(errno)
                {
                        case ENOMEM:
-                       fprintf(stderr, "Warning: Not enough memory to lock paging, exitting...\n");
+                       fprintf(stderr, "Warning: Not enough memory to lock paging.\n");
                        break;
                        case EPERM:
                        break;
                        case EPERM:
-                       fprintf(stderr, "Warning: No permission to lock paging, exitting...\n");
+                       fprintf(stderr, "Warning: No permission to lock paging.\n");
                        break;
                        case EFAULT:
                        break;
                        case EFAULT:
-                       fprintf(stderr, "Warning: 'Bad address' while locking paging, exitting...\n");
+                       fprintf(stderr, "Warning: 'Bad address' while locking paging.\n");
                        break;
                        default:
                        break;
                        default:
-                       fprintf(stderr, "Warning: Unknown error %d while locking paging, exitting...\n", errno);
+                       fprintf(stderr, "Warning: Unknown error %d while locking paging.\n", errno);
                }
        }
 
                }
        }