From 2681c79d53a8f38fb6ae228ed31d989a1871eeaa Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 25 Nov 2008 05:05:18 +0000 Subject: Merged revisions 159050 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r159050 | tilghman | 2008-11-24 23:02:11 -0600 (Mon, 24 Nov 2008) | 10 lines Merged revisions 159025 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r159025 | tilghman | 2008-11-24 22:50:00 -0600 (Mon, 24 Nov 2008) | 3 lines System call ioperm is non-portable, so check for its existence in autoconf. (Closes issue #13863) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@159053 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_rpt.c | 10 +++++++++- channels/chan_usbradio.c | 2 ++ channels/xpmr/xpmr.c | 2 ++ configure | 8 +++++--- configure.ac | 4 ++-- include/asterisk/autoconfig.h.in | 6 ++++++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/apps/app_rpt.c b/apps/app_rpt.c index be52773ac..1c2dbd4e1 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -331,7 +331,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include +#ifdef HAVE_SYS_IO_H #include +#endif #include #include #include @@ -4483,6 +4485,7 @@ struct dahdi_params par; { res = set_ic706(myrpt); } +#ifdef HAVE_IOPERM else if(!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) { if (ioperm(myrpt->p.iobase,1,1) == -1) @@ -4493,6 +4496,7 @@ struct dahdi_params par; } else res = setrbi(myrpt); } +#endif else if(!strcmp(myrpt->remoterig, remote_rig_kenwood)) { if (myrpt->iofd >= 0) setdtr(myrpt->iofd,1); @@ -10756,7 +10760,8 @@ char tmpstr[300],lstr[MAXLINKLIST]; rpt_mutex_unlock(&myrpt->lock); usleep(100000); rpt_mutex_lock(&myrpt->lock); - } + } +#ifdef HAVE_IOPERM if ((!strcmp(myrpt->remoterig, remote_rig_rbi)) && (ioperm(myrpt->p.iobase,1,1) == -1)) { @@ -10765,6 +10770,7 @@ char tmpstr[300],lstr[MAXLINKLIST]; myrpt->rpt_thread = AST_PTHREADT_STOP; pthread_exit(NULL); } +#endif strncpy(tmpstr,myrpt->rxchanname,sizeof(tmpstr) - 1); tele = strchr(tmpstr,'/'); if (!tele) @@ -13721,6 +13727,7 @@ static int rpt_exec(struct ast_channel *chan, void *data) } } +#ifdef HAVE_IOPERM if ( (!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) && (ioperm(myrpt->p.iobase,1,1) == -1)) { @@ -13728,6 +13735,7 @@ static int rpt_exec(struct ast_channel *chan, void *data) ast_log(LOG_WARNING, "Can't get io permission on IO port %x hex\n",myrpt->p.iobase); return -1; } +#endif myrpt->remoteon = 1; #ifdef OLD_ASTERISK LOCAL_USER_ADD(u); diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c index 7bb1a9c49..97e5570a0 100644 --- a/channels/chan_usbradio.c +++ b/channels/chan_usbradio.c @@ -63,7 +63,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include +#ifdef HAVE_SYS_IO_H #include +#endif #include #include #include diff --git a/channels/xpmr/xpmr.c b/channels/xpmr/xpmr.c index 2cad653c9..c2742cbc3 100755 --- a/channels/xpmr/xpmr.c +++ b/channels/xpmr/xpmr.c @@ -56,7 +56,9 @@ #include #include #include +#ifdef HAVE_SYS_IO_H #include +#endif #include #include #include diff --git a/configure b/configure index 91a39c52d..58cade0ad 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 157602 . +# From configure.ac Revision: 157785 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for asterisk 1.6. # @@ -10447,7 +10447,8 @@ fi -for ac_header in arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h + +for ac_header in arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -15297,7 +15298,8 @@ done -for ac_func in asprintf atexit dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf + +for ac_func in asprintf atexit dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/configure.ac b/configure.ac index df0260b20..1441c41c0 100644 --- a/configure.ac +++ b/configure.ac @@ -275,7 +275,7 @@ AC_FUNC_ALLOCA AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h]) AC_CHECK_HEADERS([winsock.h winsock2.h]) @@ -319,7 +319,7 @@ AC_FUNC_STRNLEN AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([asprintf atexit dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf]) +AC_CHECK_FUNCS([asprintf atexit dup2 endpwent ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf]) AC_CHECK_FUNCS([glob]) diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index 92a06c1e7..b96ddd085 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -377,6 +377,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `ioperm' function. */ +#undef HAVE_IOPERM + /* Define if your system has the IP_MTU_DISCOVER headers. */ #undef HAVE_IP_MTU_DISCOVER @@ -930,6 +933,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IO_H + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H -- cgit v1.2.3