diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-04-13 12:53:54 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-04-13 12:53:54 +0200 |
commit | 962c3d69f189f6fa451153faf3ce261c50d23d5a (patch) | |
tree | 0fa63bcf31f60ede9b58fea7bd49c2e31901df74 /libjava/java | |
parent | 4b990a03bd4cd6cf13ae1b5ab6c965dadf404619 (diff) | |
download | gcc-962c3d69f189f6fa451153faf3ce261c50d23d5a.zip gcc-962c3d69f189f6fa451153faf3ce261c50d23d5a.tar.gz gcc-962c3d69f189f6fa451153faf3ce261c50d23d5a.tar.bz2 |
cobol: Avoid conflict with timespec_t in system headers [PR119217]
util.cc doesn't compile on Solaris:
/vol/gcc/src/hg/master/local/gcc/cobol/util.cc:2135:7: error: using typedef-name ‘timespec_t’ after ‘class’
2135 | class timespec_t {
| ^~~~~~~~~~
This happens because <time.h> declares timespec_t itself. In fact,
POSIX.1 reserves every *_t identifier, so this is benign.
To avoid the problem, this patch renames the cobol timespec_t to
cbl_timespec.
Bootstrapped without regressions on amd64-pc-solaris2.11,
sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
2025-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/cobol:
PR cobol/119217
* util.cc (class timespec_t): Rename to cbl_timespec.
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions