Skip to content

Commit

Permalink
Cleanup log2() portability checks
Browse files Browse the repository at this point in the history
  • Loading branch information
svoj committed May 26, 2018
1 parent 3e63fa6 commit 8f888ab
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion cmake/os/WindowsCache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ SET(HAVE_LDIV 1 CACHE INTERNAL "")
SET(HAVE_LIMITS_H 1 CACHE INTERNAL "")
SET(HAVE_LOCALE_H 1 CACHE INTERNAL "")
SET(HAVE_LOCALTIME_R 1 CACHE INTERNAL "")
#SET(HAVE_LOG2 CACHE INTERNAL "")
SET(HAVE_LRAND48 CACHE INTERNAL "")
SET(HAVE_LSTAT CACHE INTERNAL "")
SET(HAVE_MADVISE CACHE INTERNAL "")
Expand Down
1 change: 0 additions & 1 deletion config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
#cmakedefine HAVE_LDIV 1
#cmakedefine HAVE_LRAND48 1
#cmakedefine HAVE_LOCALTIME_R 1
#cmakedefine HAVE_LOG2 1
#cmakedefine HAVE_LSTAT 1
#cmakedefine HAVE_MEMALIGN 1
/* #cmakedefine HAVE_MLOCK 1 see Bug#54662 */
Expand Down
2 changes: 0 additions & 2 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,6 @@ CHECK_SYMBOL_EXISTS(TIOCSTAT "sys/ioctl.h" TIOCSTAT_IN_SYS_IOCTL)
CHECK_SYMBOL_EXISTS(FIONREAD "sys/filio.h" FIONREAD_IN_SYS_FILIO)
CHECK_SYMBOL_EXISTS(gettimeofday "sys/time.h" HAVE_GETTIMEOFDAY)

CHECK_SYMBOL_EXISTS(log2 math.h HAVE_LOG2)

#
# Test for endianness
#
Expand Down
11 changes: 0 additions & 11 deletions include/my_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,17 +843,6 @@ inline unsigned long long my_double2ulonglong(double d)
#define M_LN2 0.69314718055994530942
#endif

#ifndef HAVE_LOG2
/*
This will be slightly slower and perhaps a tiny bit less accurate than
doing it the IEEE754 way but log2() should be available on C99 systems.
*/
static inline double log2(double x)
{
return (log(x) / M_LN2);
}
#endif

/*
Max size that must be added to a so that we know Size to make
addressable obj.
Expand Down

0 comments on commit 8f888ab

Please sign in to comment.