mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
So apparently, some platforms don't have ffsll(3).
The manpage lies; it says that the function is in POSIX, but that's only for ffs(3), not ffsll(3). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
configure
vendored
5
configure
vendored
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.ac Revision: 227579 .
|
# From configure.ac Revision: 227580 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for asterisk 1.6.
|
# Generated by GNU Autoconf 2.61 for asterisk 1.6.
|
||||||
#
|
#
|
||||||
@@ -16715,7 +16715,8 @@ done
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ntohll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
|
|
||||||
|
for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ntohll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
|
||||||
do
|
do
|
||||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
|
@@ -390,7 +390,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 closefrom dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ntohll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
|
AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ntohll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
|
||||||
|
|
||||||
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
|
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
|
||||||
# so that AC_CHECK_FUNCS can detect functions in that library.
|
# so that AC_CHECK_FUNCS can detect functions in that library.
|
||||||
|
@@ -232,6 +232,9 @@
|
|||||||
/* Define to the version of the Ffmpeg and avcodec library library. */
|
/* Define to the version of the Ffmpeg and avcodec library library. */
|
||||||
#undef HAVE_FFMPEG_VERSION
|
#undef HAVE_FFMPEG_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ffsll' function. */
|
||||||
|
#undef HAVE_FFSLL
|
||||||
|
|
||||||
/* Define to 1 if you have the `floor' function. */
|
/* Define to 1 if you have the `floor' function. */
|
||||||
#undef HAVE_FLOOR
|
#undef HAVE_FLOOR
|
||||||
|
|
||||||
|
@@ -77,6 +77,10 @@
|
|||||||
int __attribute__((format(printf, 2, 3))) asprintf(char **str, const char *fmt, ...);
|
int __attribute__((format(printf, 2, 3))) asprintf(char **str, const char *fmt, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_FFSLL
|
||||||
|
int ffsll(long long n);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETLOADAVG
|
#ifndef HAVE_GETLOADAVG
|
||||||
int getloadavg(double *list, int nelem);
|
int getloadavg(double *list, int nelem);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -386,3 +386,16 @@ uint64_t htonll(uint64_t host64)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_FFSLL
|
||||||
|
int ffsll(long long n)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 64; i++) {
|
||||||
|
if ((1LL << i) & n) {
|
||||||
|
return i + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user