Skip to content

Commit

Permalink
[gperf] Fix error in cpp17 mode (#32980)
Browse files Browse the repository at this point in the history
* fix gperf in cpp17 mode

* update version

* update version #2

* remove unused header patch file

* update version 3

---------

Co-authored-by: rdh <[email protected]>
  • Loading branch information
rdhafidh and rdh authored Aug 7, 2023
1 parent 3ee6678 commit 56a44f3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ports/gperf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
remove_register_keyword_cpp17.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
Expand Down
13 changes: 13 additions & 0 deletions ports/gperf/remove_register_keyword_cpp17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/getline.cc b/lib/getline.cc
index c57c633..0984a7c 100644
--- a/lib/getline.cc
+++ b/lib/getline.cc
@@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset)

for (;;)
{
- register int c = getc (stream);
+ int c = getc (stream);

/* We always want at least one char left in the buffer, since we
always (unless we get an error while reading the first char)
2 changes: 1 addition & 1 deletion ports/gperf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gperf",
"version": "3.1",
"port-version": 5,
"port-version": 6,
"description": "GNU perfect hash function generator",
"homepage": "https://www.gnu.org/software/gperf/",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2974,7 +2974,7 @@
},
"gperf": {
"baseline": "3.1",
"port-version": 5
"port-version": 6
},
"gperftools": {
"baseline": "2.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gperf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "590e19515bff5b0abc6d9f73ba20a19a71555a32",
"version": "3.1",
"port-version": 6
},
{
"git-tree": "c1dc7145f2a0607798bfdaede7bf064b88e908ac",
"version": "3.1",
Expand Down

0 comments on commit 56a44f3

Please sign in to comment.