From: Andreas Eversberg Date: Tue, 6 Jan 2009 17:34:05 +0000 (+0100) Subject: changed error message a bit... X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=bf61575a94ec0e4e02824b7bfe8b1063ddf3daa5 changed error message a bit... 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 --- diff --git a/bchannel.c b/bchannel.c index c25d770..473de82 100644 --- a/bchannel.c +++ b/bchannel.c @@ -29,6 +29,11 @@ #define MISDN_OLD_AF_COMPATIBILITY 1 #include +#define HAVE_ATTRIBUTE_always_inline 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_TIMERSUB 1 + +#include #include diff --git a/chan_lcr.c b/chan_lcr.c index acc485d..53a7fb6 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -121,6 +121,12 @@ it is called from ast_channel process which has already locked ast_channel. #include +#define HAVE_ATTRIBUTE_always_inline 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_TIMERSUB 1 + +#include +#include #include #include #include diff --git a/config.h.in b/config.h.in index 34a46bf..75fe0e3 100644 --- a/config.h.in +++ b/config.h.in @@ -3,8 +3,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ASTERISK_CHANNEL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ASTERISK_COMPILER_H /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H diff --git a/configure b/configure index a0a90f8..f4e4de6 100755 --- a/configure +++ b/configure @@ -5828,7 +5828,7 @@ fi 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 @@ -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;} -{ { $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 -$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 diff --git a/configure.ac b/configure.ac index ef76a4e..9012f57 100644 --- a/configure.ac +++ b/configure.ac @@ -59,11 +59,11 @@ AC_ARG_WITH([asterisk], [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 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 ]) ]) diff --git a/lcradmin.c b/lcradmin.c index d841e49..dc80d43 100644 --- a/lcradmin.c +++ b/lcradmin.c @@ -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 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"); diff --git a/main.c b/main.c index f63b9bf..0a85f46 100644 --- a/main.c +++ b/main.c @@ -410,16 +410,16 @@ int main(int argc, char *argv[]) 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: - fprintf(stderr, "Warning: No permission to lock paging, exitting...\n"); + fprintf(stderr, "Warning: No permission to lock paging.\n"); break; case EFAULT: - fprintf(stderr, "Warning: 'Bad address' while locking paging, exitting...\n"); + fprintf(stderr, "Warning: 'Bad address' while locking paging.\n"); 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); } }