Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gperf] Fix error in cpp17 mode #32980

Merged
merged 5 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2966,7 +2966,7 @@
},
"gperf": {
"baseline": "3.1",
"port-version": 5
"port-version": 6
},
"gperftools": {
"baseline": "2019-09-02",
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