[libcxx-commits] [PATCH] D94569: [libcxx] Wipe some more macros that do not belong in C++ forwarding headers
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 13 07:15:59 PST 2021
ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.
I did some research and found the following commits (which added these `#undef`s):
commit c904ad45187326cf47abff0819ab57b971c7c78a
Author: Howard Hinnant <hhinnant at apple.com>
Date: Thu Jul 26 20:01:13 2012 +0000
Patch by Andrew C. Morrow: shims to work around macroized getc and putc on linux. On my eglibc 2.13 based Debian system 'getc' is a macro defined in
/usr/include/stdio.h. This decision to make it a macro doesn't seem to
be guarded by any feature test macro as far as I can see.
llvm-svn: 160799
commit cba3e4ca21992692491af652fa4e84798ef09990
Author: Jonathan Roelofs <jonathan at codesourcery.com>
Date: Sat Jan 10 00:08:00 2015 +0000
Support Newlib as libc++'s C library [cstdio part, part 2]
Wrappers for clearerr, feof, ferror (which newlib implements as macros).
http://reviews.llvm.org/D5420
llvm-svn: 225563
I strongly think that providing these functions as macros should be considered a bug on these C Standard Libraries, since it makes them unusable with C++ (without such workarounds). Can someone confirm whether newlib and glibc still define those as macros? If not, I suggest we remove these workarounds. If so, then I think we should pressure them to fix this and then eventually remove the workarounds.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94569/new/
https://reviews.llvm.org/D94569
More information about the libcxx-commits
mailing list