[asterisk-commits] tilghman: branch 1.4 r159025 - in /branches/1.4: ./ apps/ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 24 22:50:01 CST 2008


Author: tilghman
Date: Mon Nov 24 22:50:00 2008
New Revision: 159025

URL: http://svn.digium.com/view/asterisk?view=rev&rev=159025
Log:
System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)

Modified:
    branches/1.4/apps/app_rpt.c
    branches/1.4/configure
    branches/1.4/configure.ac
    branches/1.4/include/asterisk/autoconfig.h.in

Modified: branches/1.4/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_rpt.c?view=diff&rev=159025&r1=159024&r2=159025
==============================================================================
--- branches/1.4/apps/app_rpt.c (original)
+++ branches/1.4/apps/app_rpt.c Mon Nov 24 22:50:00 2008
@@ -273,7 +273,9 @@
 #include <sys/time.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
+#ifdef HAVE_SYS_IO_H
 #include <sys/io.h>
+#endif
 #include <sys/vfs.h>
 #include <math.h>
 #include <netinet/in.h>
@@ -3362,6 +3364,7 @@
 		{
 			res = set_ic706(myrpt);
 		}
+#ifdef HAVE_IOPERM
 		else if(!strcmp(myrpt->remote, remote_rig_rbi))
 		{
 			if (ioperm(myrpt->p.iobase,1,1) == -1)
@@ -3372,6 +3375,7 @@
 			}
 			else res = setrbi(myrpt);
 		}
+#endif
 		else if(!strcmp(myrpt->remote, remote_rig_kenwood))
 		{
 			res = setkenwood(myrpt);
@@ -10987,6 +10991,7 @@
 		}		
 		rpt_mutex_lock(&myrpt->lock);
 	}
+#ifdef HAVE_IOPERM
 	if ((!strcmp(myrpt->remote, remote_rig_rbi)) &&
 	  (ioperm(myrpt->p.iobase,1,1) == -1))
 	{
@@ -10994,6 +10999,7 @@
 		ast_log(LOG_WARNING, "Cant 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);

Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?view=diff&rev=159025&r1=159024&r2=159025
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Mon Nov 24 22:50:00 2008
@@ -223,7 +223,7 @@
 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_SYS_LARGEFILE
 
@@ -265,7 +265,7 @@
 AC_FUNC_STRTOD
 AC_FUNC_UTIME_NULL
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt 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 bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf ioperm])
 
 # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
 AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])

Modified: branches/1.4/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/autoconfig.h.in?view=diff&rev=159025&r1=159024&r2=159025
==============================================================================
--- branches/1.4/include/asterisk/autoconfig.h.in (original)
+++ branches/1.4/include/asterisk/autoconfig.h.in Mon Nov 24 22:50:00 2008
@@ -178,6 +178,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the `ioperm' function. */
+#undef HAVE_IOPERM
+
 /* Define to 1 if your system has PMTU discovery on UDP sockets. */
 #undef HAVE_IP_MTU_DISCOVER
 
@@ -460,6 +463,9 @@
 
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/io.h> header file. */
+#undef HAVE_SYS_IO_H
 
 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
    */




More information about the asterisk-commits mailing list