]> granicus.if.org Git - graphviz/commitdiff
remove getenv detection
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 26 Nov 2021 06:03:00 +0000 (22:03 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 2 Dec 2021 15:47:07 +0000 (07:47 -0800)
The code base extensively uses `getenv` without checking the `HAVE_GETENV` macro
this detection supplies. This is not a problem because `getenv` is provided as
far back as C89, and can be guaranteed to exist on all platforms for which
Graphviz currently compiles, as we require C99.

cmake/config_checks.cmake
config-cmake.h.in
configure.ac
windows/include/config.h

index c53963a138ca045a5593f5001d413ff8d061c922..28cb2fc48cb99d2b48d41d138c6bad68a3083ea5 100644 (file)
@@ -24,7 +24,6 @@ include(CheckFunctionExists)
 check_function_exists( dl_iterate_phdr  HAVE_DL_ITERATE_PHDR )
 check_function_exists( drand48          HAVE_DRAND48         )
 check_function_exists( getpagesize      HAVE_GETPAGESIZE     )
-check_function_exists( getenv           HAVE_GETENV          )
 check_function_exists( lrand48          HAVE_LRAND48         )
 check_function_exists( setenv           HAVE_SETENV          )
 check_function_exists( setmode          HAVE_SETMODE         )
index 4948011b7e2db8956f5bd9928d20a22ef96a9ea7..0272b8b230c7eab78e4760f484050fd8a0de8bbf 100644 (file)
@@ -20,7 +20,6 @@
 #cmakedefine HAVE_DL_ITERATE_PHDR
 #cmakedefine HAVE_DRAND48
 #cmakedefine HAVE_GETPAGESIZE
-#cmakedefine HAVE_GETENV
 #cmakedefine HAVE_LRAND48
 #cmakedefine HAVE_SETENV
 #cmakedefine HAVE_SETMODE
index af448cf8d7ae676832000b910f313b43f924d66a..7f2bac1958e3b1c2ad31aa48d616cbd3671397f6 100644 (file)
@@ -456,7 +456,7 @@ LIBS=$save_LIBS
 # -----------------------------------
 
 # Checks for library functions
-AC_CHECK_FUNCS([lrand48 drand48 srand48 setmode setenv getenv \
+AC_CHECK_FUNCS([lrand48 drand48 srand48 setmode setenv \
        getpagesize \
   ftruncate lseek64 stat64 select dl_iterate_phdr])
 
index 5681eb6146b27023b859097da6b2b5f9d6e06b2a..c58e1616b377ff72a28154e36b188445c30dfe95 100644 (file)
@@ -96,9 +96,6 @@
 /* Define if the GD library supports XPM */
 /* #undef HAVE_GD_XPM */
 
-/* Define to 1 if you have the `getenv' function. */
-#define HAVE_GETENV 1
-
 /* Define if you have the glade library */
 #define HAVE_GLADE 1