mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
scripts/check-obsolete-constructs.py: Process all headers as UTF-8.
A few of our installed headers contain UTF-8 in comments. check-obsolete-constructs opened files without explicitly specifying their encoding, so it would barf on these headers if “make check” was run in a non-UTF-8 locale. * scripts/check-obsolete-constructs.py (HeaderChecker.check): Specify encoding="utf-8" when opening headers to check.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2019-03-14 Zack Weinberg <zackw@panix.com>
|
||||||
|
|
||||||
|
* scripts/check-obsolete-constructs.py (HeaderChecker.check):
|
||||||
|
Specify encoding="utf-8" when opening headers to check.
|
||||||
|
|
||||||
2019-03-13 Joseph Myers <joseph@codesourcery.com>
|
2019-03-13 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* scripts/build-many-glibcs.py (Context.checkout): Default Linux
|
* scripts/build-many-glibcs.py (Context.checkout): Default Linux
|
||||||
|
@ -437,7 +437,7 @@ class HeaderChecker:
|
|||||||
def check(self, fname):
|
def check(self, fname):
|
||||||
self.fname = fname
|
self.fname = fname
|
||||||
try:
|
try:
|
||||||
with open(fname, "rt") as fp:
|
with open(fname, "rt", encoding="utf-8") as fp:
|
||||||
contents = fp.read()
|
contents = fp.read()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
sys.stderr.write("{}: {}\n".format(fname, e.strerror))
|
sys.stderr.write("{}: {}\n".format(fname, e.strerror))
|
||||||
|
Reference in New Issue
Block a user