Skip to content

Commit

Permalink
(#5835) remove register keyword as not cpp17 complient
Browse files Browse the repository at this point in the history
* remove register keyword as not cpp17 complient

* move cpp17 fix to a patch

* add patch
  • Loading branch information
AndreyMlashkin authored Jun 11, 2021
1 parent 919b6a4 commit 39b47bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/gperf/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ sources:
"3.1":
url: "https://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz"
sha256: "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
patches:
"3.1":
- patch_file: "all/0001-assert-exception-upstream-issue-2011.patch"
base_path: "source_subfolder"
1 change: 1 addition & 0 deletions recipes/gperf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class GperfConan(ConanFile):
settings = "os", "arch", "compiler"
_source_subfolder = "source_subfolder"
_autotools = None
exports_sources = "patches/**"

@property
def _is_msvc(self):
Expand Down
13 changes: 13 additions & 0 deletions recipes/gperf/all/patches/0001-remove-register-keyword.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 ecc3e85..2d97644 100644 (file)
--- 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)

0 comments on commit 39b47bc

Please sign in to comment.