Skip to content

Commit

Permalink
Merge pull request #50 from zapping-vbi/static-declaration-of-sincos-…
Browse files Browse the repository at this point in the history
…follows-non-static-declaration

Fix for static declaration of ‘sincos’ follows non-static declaration
  • Loading branch information
ileanadumitrescu95 committed Mar 19, 2024
2 parents e0ff90c + 429cf93 commit ae74ae5
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ AC_CHECK_FUNCS([alarm dup2 gethostbyaddr gethostbyname getopt_long gettimeofday
inet_ntoa localtime_r memmove memset mkdir modf munmap
nl_langinfo putenv select setenv setlocale socket strcasecmp
strchr strdup strerror strncasecmp strndup strrchr strstr
strtol strtoul tzset strptime getaddrinfo ffs __builtin_ffs])
strtol strtoul tzset strptime getaddrinfo ffs __builtin_ffs sincos])

AM_CONDITIONAL(HAVE_STRPTIME, [test "x$HAVE_STRPTIME" = xyes])

Expand All @@ -112,28 +112,6 @@ dnl autoconf 2.71 required additional quotations and usages of "AC_LANG_SOURCE".
dnl "Noteworthy changes in autoconf version 2.66 through 2.68"
dnl <https://autotools.info/forwardporting/autoconf.html>

dnl sincos() is a GNU extension (a macro, not a function).
dnl If not present we use a replacement.
AC_MSG_CHECKING([for sincos])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <stdio.h>
#include <math.h>
int main (void) {
double s, c;
/* Make sure the compiler does not optimize sincos() away
so the linker can confirm its availability. */
scanf ("%f", &s);
sincos (s, &s, &c);
printf ("%f %f", s, c);
return 0;
}
])],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SINCOS, 1, [Define if the sincos() function is available])
],[
AC_MSG_RESULT([no])
])

dnl log2() is a GNU extension (a macro, not a function).
dnl If not present we use a replacement.
AC_MSG_CHECKING([for log2])
Expand Down

0 comments on commit ae74ae5

Please sign in to comment.