]> granicus.if.org Git - graphviz/commitdiff
remove 'intptr_t' existence checks
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Nov 2022 19:29:55 +0000 (11:29 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 22 Nov 2022 16:03:15 +0000 (08:03 -0800)
The majority of Graphviz code was using the types `intptr_t` and `uintptr_t`
unconditionally. So it seems safe to assume that any compliant C99 environment
has both of these.

cmake/config_checks.cmake
config-cmake.h.in
configure.ac
lib/gvpr/compile.c
windows/include/config.h

index ab4150d958e5c54836fae2e3fd05e5420fe19e25..337af26d089765d401e8901517fb296a72775b90 100644 (file)
@@ -32,7 +32,6 @@ check_function_exists( srand48          HAVE_SRAND48         )
 include(CheckTypeSize)
 
 check_type_size( ssize_t     SSIZE_T     )
-check_type_size( intptr_t    INTPTR_T    )
 
 # Library checks
 set( HAVE_ANN       ${ANN_FOUND}        )
index af276ecac5c67242c375d0d811c469e0ee44cd34..5d17cc5c59f54845ccc470ea4e1c569d7151f080 100644 (file)
@@ -24,7 +24,6 @@
 
 // Types
 #cmakedefine HAVE_SSIZE_T
-#cmakedefine HAVE_INTPTR_T
 
 // Typedefs for missing types
 #ifndef HAVE_SSIZE_T
index eb60326197a797cb9fabac195351c1193ae8ca7f..fe48b50bc3b3db3d547903b5abb001ab11586f0f 100644 (file)
@@ -2472,17 +2472,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
        ],[AC_MSG_RESULT(no)
        ])
 
-# -----------------------------------
-
-AC_MSG_CHECKING(if intptr_t is declared)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
-  #include <stdint.h>
-       ]], [[intptr_t  abc;
-       ]])],[AC_MSG_RESULT(yes)
-       AC_DEFINE_UNQUOTED(HAVE_INTPTR_T,1,Define if intptr_t is declared)
-       ],[AC_MSG_RESULT(no)
-       ])
-
 # -----------------------------------------------------------------------
 
 # This is a historical artifact ... there are no other choices these days
index e6548fc6cf672bfbcbdd07b1e976b2ba02e56393..4a143c46bda115fbee45193adf858b9ac13bcdc2 100644 (file)
@@ -49,19 +49,11 @@ static int isedge(Agobj_t *obj) {
 #define BITS_PER_BYTE 8
 
 static void *int2ptr(Sflong_t i) {
-#ifdef HAVE_INTPTR_T
   return (void*)(intptr_t)i;
-#else
-  return (void*)i;
-#endif
 }
 
 static Sflong_t ptr2int(const void *p) {
-#ifdef HAVE_INTPTR_T
   return (Sflong_t)(intptr_t)p;
-#else
-  return (Sflong_t)p;
-#endif
 }
 
 static int iofread(void *chan, char *buf, int bufsize)
index d67a9a25bde0fd8f95e6b977299ee41ab571fb74..98c1bc14e5b2466ea9feede9bfa48823ce1a3c20 100644 (file)
 /* Define to 1 if you have the <IL/il.h> header file. */
 /* #undef HAVE_IL_IL_H */
 
-/* Define if intptr_t is declared */
-#define HAVE_INTPTR_T 1
-
 /* Define if you have the lasi library */
 /* #undef HAVE_LASI */