From: Magnus Jacobsson Date: Thu, 13 Aug 2020 11:11:06 +0000 (+0200) Subject: Remove obsolete and incorrect CMake unsigned long mangling of yacc output X-Git-Tag: 2.46.0~20^2^2~119^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6238e5bcaa341b990c4b92f3dd0c0313e747a5b4;p=graphviz Remove obsolete and incorrect CMake unsigned long mangling of yacc output It is (no longer?) necessary and it was anyway incorrect in that it converted unsigned long to uint_64_t which doesn't exist. Fixes https://gitlab.com/graphviz/graphviz/-/issues/1796 --- diff --git a/cmake/modify_cgraph_grammar.cmake.in b/cmake/modify_cgraph_grammar.cmake.in index 772fe145c..231b5e938 100644 --- a/cmake/modify_cgraph_grammar.cmake.in +++ b/cmake/modify_cgraph_grammar.cmake.in @@ -1,11 +1,7 @@ file(READ @CMAKE_CURRENT_BINARY_DIR@/grammar.h file_contents) string(REPLACE "yy" "aag" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/grammar.h "${file_contents}") file(READ @CMAKE_CURRENT_BINARY_DIR@/grammar.c file_contents) string(REPLACE "yy" "aag" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/grammar.c "${file_contents}") diff --git a/cmake/modify_common_htmlparse.cmake.in b/cmake/modify_common_htmlparse.cmake.in index 5e42fcc4e..908b080b0 100644 --- a/cmake/modify_common_htmlparse.cmake.in +++ b/cmake/modify_common_htmlparse.cmake.in @@ -1,11 +1,7 @@ file(READ @CMAKE_CURRENT_BINARY_DIR@/htmlparse.h file_contents) string(REPLACE "yy" "html" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/htmlparse.h "${file_contents}") file(READ @CMAKE_CURRENT_BINARY_DIR@/htmlparse.c file_contents) string(REPLACE "yy" "html" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/htmlparse.c "${file_contents}") diff --git a/cmake/modify_gml2gv_gmlparse.cmake.in b/cmake/modify_gml2gv_gmlparse.cmake.in index c68fb5297..40cbf8c6e 100644 --- a/cmake/modify_gml2gv_gmlparse.cmake.in +++ b/cmake/modify_gml2gv_gmlparse.cmake.in @@ -1,11 +1,7 @@ file(READ @CMAKE_CURRENT_BINARY_DIR@/gmlparse.h file_contents) string(REPLACE "yy" "gml" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/gmlparse.h "${file_contents}") file(READ @CMAKE_CURRENT_BINARY_DIR@/gmlparse.c file_contents) string(REPLACE "yy" "gml" file_contents "${file_contents}") -string(REPLACE "unsigned long int" "uint_64_t" file_contents "${file_contents}") -string(REPLACE "unsigned long" "uint_64_t" file_contents "${file_contents}") file(WRITE @CMAKE_CURRENT_BINARY_DIR@/gmlparse.c "${file_contents}") diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 75e0f9149..a275b034e 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -83,8 +83,6 @@ ADD_FLEX_BISON_DEPENDENCY(Gmlscan Gmlparse) # Modify files generated by Bison and Flex, to match the Autotools build. # - Replace "yy" with "gml" in all three files -# - Replace "unsigned long int" with "uint64_t" in gmlparse.h and gmlparse.c -# - Replace "unsigned long" with "uint64_t" in gmlparse.h and gmlparse.c configure_file( "${TOP_SOURCE_DIR}/cmake/modify_gml2gv_gmlparse.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/modify_gml2gv_gmlparse.cmake" diff --git a/lib/cgraph/CMakeLists.txt b/lib/cgraph/CMakeLists.txt index 6182bf37a..10a98365e 100644 --- a/lib/cgraph/CMakeLists.txt +++ b/lib/cgraph/CMakeLists.txt @@ -4,8 +4,6 @@ ADD_FLEX_BISON_DEPENDENCY(Scan Grammar) # Modify files generated by Bison and Flex, to match the Autotools build. # - Replace "yy" with "aag" in all three files -# - Replace "unsigned long int" with "uint64_t" in grammar.h and grammar.c -# - Replace "unsigned long" with "uint64_t" in grammar.h and grammar.c # - Remove declaration of the "isatty()" function from scan.c configure_file( "${TOP_SOURCE_DIR}/cmake/modify_cgraph_grammar.cmake.in" diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt index 0dd335f76..fa9b302d2 100644 --- a/lib/common/CMakeLists.txt +++ b/lib/common/CMakeLists.txt @@ -2,8 +2,6 @@ BISON_TARGET(HTMLparse htmlparse.y ${CMAKE_CURRENT_BINARY_DIR}/htmlparse.c) # Modify files generated by Bison, to match the Autotools build. # - Replace "yy" with "aag" -# - Replace "unsigned long int" with "uint64_t" -# - Replace "unsigned long" with "uint64_t" configure_file( "${TOP_SOURCE_DIR}/cmake/modify_common_htmlparse.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/modify_common_htmlparse.cmake"