From a63b830554920476881837eeacd4a6b507632b19 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 30 Aug 2020 12:36:15 +0200 Subject: Make the code C++17 compliant. * lib/getline.cc (getstr): Don't use the 'register' keyword. --- ChangeLog | 5 +++++ lib/getline.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29551e9..25615b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-08-30 Bruno Haible + + Make the code C++17 compliant. + * lib/getline.cc (getstr): Don't use the 'register' keyword. + 2020-08-29 Bruno Haible Fix link error on native Windows with MSVC/clang. diff --git a/lib/getline.cc b/lib/getline.cc index ecc3e85..2d97644 100644 --- a/lib/getline.cc +++ b/lib/getline.cc @@ -1,6 +1,6 @@ /* getline.c -- Replacement for GNU C library function getline - Copyright (C) 1993, 1996, 2001-2003 Free Software Foundation, Inc. + Copyright (C) 1993, 1996, 2001-2003, 2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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) -- cgit v1.2.1