Details
Details
- Reviewers
danalbert
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It would probably make sense to add the following block to include/__config and clean up all the duplication.
#ifndef ELAST #if defined(__linux__) #define ELAST 4095 #elif defined(_NEWLIB_VERSION) && defined(__ELASTERROR) #define ELAST __ELASTERROR #endif #endif
Comment Actions
That sounds like a good idea. Maybe it's better to have it be:
#if defined(ELAST) #define LIBCPP_ELAST ELAST #elif defined(__linux__) #define LIBCPP_ELAST 4095 #elif defined(_NEWLIB_VERSION) && defined(__ELASTERROR) #define LIBCPP_ELAST __ELASTERROR #else // Error here so that the person doing the libcxx port has an easier time: #error This platform's ELAST hasn't been ported yet #endif #endif
... as I don't think it's appropriate for __config to be defining ELAST so globally.
Comment Actions
Address @danalbert's suggestion to move the configuration-ey stuff to include/__config
src/ios.cpp | ||
---|---|---|
56 | Could also define _LIBCPP_ELAST to a large dummy value that would make the second half of the conditional always true and get rid of all the pesky ifdefs. Up to you. I'm happy with the patch now. |
Could also define _LIBCPP_ELAST to a large dummy value that would make the second half of the conditional always true and get rid of all the pesky ifdefs. Up to you. I'm happy with the patch now.