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: https://origsvn.digium.com/svn/asterisk/trunk@159050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.2
Tilghman Lesher 17 years ago
parent 853f21e90d
commit ac296a4ad3

@ -331,7 +331,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/time.h> #include <sys/time.h>
#include <sys/file.h> #include <sys/file.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef HAVE_SYS_IO_H
#include <sys/io.h> #include <sys/io.h>
#endif
#include <sys/vfs.h> #include <sys/vfs.h>
#include <math.h> #include <math.h>
#include <dahdi/user.h> #include <dahdi/user.h>
@ -4483,6 +4485,7 @@ struct dahdi_params par;
{ {
res = set_ic706(myrpt); res = set_ic706(myrpt);
} }
#ifdef HAVE_IOPERM
else if(!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) else if(!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16))
{ {
if (ioperm(myrpt->p.iobase,1,1) == -1) if (ioperm(myrpt->p.iobase,1,1) == -1)
@ -4493,6 +4496,7 @@ struct dahdi_params par;
} }
else res = setrbi(myrpt); else res = setrbi(myrpt);
} }
#endif
else if(!strcmp(myrpt->remoterig, remote_rig_kenwood)) else if(!strcmp(myrpt->remoterig, remote_rig_kenwood))
{ {
if (myrpt->iofd >= 0) setdtr(myrpt->iofd,1); if (myrpt->iofd >= 0) setdtr(myrpt->iofd,1);
@ -10757,6 +10761,7 @@ char tmpstr[300],lstr[MAXLINKLIST];
usleep(100000); usleep(100000);
rpt_mutex_lock(&myrpt->lock); rpt_mutex_lock(&myrpt->lock);
} }
#ifdef HAVE_IOPERM
if ((!strcmp(myrpt->remoterig, remote_rig_rbi)) && if ((!strcmp(myrpt->remoterig, remote_rig_rbi)) &&
(ioperm(myrpt->p.iobase,1,1) == -1)) (ioperm(myrpt->p.iobase,1,1) == -1))
{ {
@ -10765,6 +10770,7 @@ char tmpstr[300],lstr[MAXLINKLIST];
myrpt->rpt_thread = AST_PTHREADT_STOP; myrpt->rpt_thread = AST_PTHREADT_STOP;
pthread_exit(NULL); pthread_exit(NULL);
} }
#endif
strncpy(tmpstr,myrpt->rxchanname,sizeof(tmpstr) - 1); strncpy(tmpstr,myrpt->rxchanname,sizeof(tmpstr) - 1);
tele = strchr(tmpstr,'/'); tele = strchr(tmpstr,'/');
if (!tele) 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)) && if ( (!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) &&
(ioperm(myrpt->p.iobase,1,1) == -1)) (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); ast_log(LOG_WARNING, "Can't get io permission on IO port %x hex\n",myrpt->p.iobase);
return -1; return -1;
} }
#endif
myrpt->remoteon = 1; myrpt->remoteon = 1;
#ifdef OLD_ASTERISK #ifdef OLD_ASTERISK
LOCAL_USER_ADD(u); LOCAL_USER_ADD(u);

@ -63,7 +63,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifdef HAVE_SYS_IO_H
#include <sys/io.h> #include <sys/io.h>
#endif
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/time.h> #include <sys/time.h>

@ -56,7 +56,9 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef HAVE_SYS_IO_H
#include <sys/io.h> #include <sys/io.h>
#endif
#include <fcntl.h> #include <fcntl.h>
#include <sys/time.h> #include <sys/time.h>
#include <stdlib.h> #include <stdlib.h>

12914
configure vendored

File diff suppressed because it is too large Load Diff

@ -292,7 +292,7 @@ AC_FUNC_ALLOCA
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_SYS_WAIT 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]) AC_CHECK_HEADERS([winsock.h winsock2.h])
@ -336,7 +336,7 @@ AC_FUNC_STRNLEN
AC_FUNC_STRTOD AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF 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]) AC_CHECK_FUNCS([glob])

@ -383,6 +383,9 @@
/* Define to indicate the ${IODBC_DESCRIP} library version */ /* Define to indicate the ${IODBC_DESCRIP} library version */
#undef HAVE_IODBC_VERSION #undef HAVE_IODBC_VERSION
/* Define to 1 if you have the `ioperm' function. */
#undef HAVE_IOPERM
/* Define if your system has the IP_MTU_DISCOVER headers. */ /* Define if your system has the IP_MTU_DISCOVER headers. */
#undef HAVE_IP_MTU_DISCOVER #undef HAVE_IP_MTU_DISCOVER
@ -945,6 +948,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */ /* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H #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'. /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/ */
#undef HAVE_SYS_NDIR_H #undef HAVE_SYS_NDIR_H
@ -1209,6 +1215,9 @@
#ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS
#endif #endif
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Define like PROTOTYPES; this can be used by system headers. */ /* Define like PROTOTYPES; this can be used by system headers. */
#undef __PROTOTYPES #undef __PROTOTYPES

Loading…
Cancel
Save