]> granicus.if.org Git - graphviz/commitdiff
remove cbrt alternative implementation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 30 May 2021 16:55:14 +0000 (09:55 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Jun 2021 18:13:03 +0000 (11:13 -0700)
The cbrt function is guaranteed to be provided in C99, with which Graphviz is
now compiled.

cmake/config_checks.cmake
config-cmake.h.in
lib/pathplan/solvers.c
windows/include/config.h

index 8c653038c51cdf64f86fa960377b1e01aede95fe..dc7cec3a3faeea91e192aca2ccb591195b921408 100644 (file)
@@ -24,7 +24,6 @@ check_include_file( getopt.h            HAVE_GETOPT_H           )
 include(CheckFunctionExists)
 
 check_function_exists( drand48          HAVE_DRAND48        )
-check_function_exists( cbrt             HAVE_CBRT           )
 check_function_exists( getpagesize      HAVE_GETPAGESIZE    )
 check_function_exists( getenv           HAVE_GETENV         )
 check_function_exists( lrand48          HAVE_LRAND48        )
index 996497b54bf3ffcebe0e4b765d0e7c4b6c1ff97d..1b73f11d8ac71ace096455da6d9f27ccbde601f6 100644 (file)
@@ -20,7 +20,6 @@
 
 // Functions
 #cmakedefine HAVE_DRAND48
-#cmakedefine HAVE_CBRT
 #cmakedefine HAVE_GETPAGESIZE
 #cmakedefine HAVE_GETENV
 #cmakedefine HAVE_LRAND48
index 0a5be0260bf60beafb9a5becbb2d5f9626ebe55f..2039d1ddac2cb03322d9d6336302cbb8a67ce52c 100644 (file)
@@ -9,13 +9,9 @@
  *************************************************************************/
 
 
-#include "config.h"
 #include <math.h>
 #include <pathplan/solvers.h>
 
-#ifndef HAVE_CBRT
-#define cbrt(x) ((x < 0) ? (-1*pow(-x, 1.0/3.0)) : pow (x, 1.0/3.0))
-#endif
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
 #endif
index 82d1173439d06c5684db4065bffd6454b29334a3..0c32da9bb8cd4517ad9ec2dbcb5b08cba5d7ab22 100644 (file)
@@ -33,9 +33,6 @@
 /* Define if you have the ann library */
 #define HAVE_ANN 1
 
-/* Define to 1 if you have the `cbrt' function. */
-//#define HAVE_CBRT 1
-
 /* Define to 1 if you have the `deflateBound' function. */
 /* #undef HAVE_DEFLATEBOUND */