On Nov 25, 2012, at 12:24 PM, Dimitry Andric <[email protected]> wrote:
> Hi, > > When using libc++ headers on FreeBSD, in combination with -std=c++98, > -ansi or -std=c++03, the long long type is not supported. So in this > case, several functions and types, like lldiv_t, strtoll(), are not > declared. > > The attached patch conditionalizes those types and functions for libc++, > using a _LIBCPP_HAS_NO_LONG_LONG define. This can easily be extended > to other operating systems. > > -Dimitry > <libcxx-long-long-1.diff>_______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits Thanks for the patch Dimitry. long long is used extensively throughout the libc++ headers. I'm counting over 200 uses (just a quick search which also picks up comments). The reason long long isn't already guarded is because libc++ wasn't meant to serve as a C++98/03 implementation. I'm wondering if your patch actually expands the usability of libc++ on FreeBSD. It only guards 2 of the 14 or so headers that use long long. I'm hesitant both to put in a partial solution, and also to clutter the library by guarding all uses. Can you clarify what differentiates <cstdlib> and <cwchar> from all of the other headers that use long long? Thanks, Howard _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
