Benjamin-Dobell / Heimdall

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy devices.
MIT License
2.62k stars 587 forks source link

"#define nullptr 0" breaks build w/libc++ #432

Closed dtzWill closed 6 years ago

dtzWill commented 7 years ago

This is done in heimdall/source/Heimdall.h and libpit/source/libpit.h.

Unfortunately this breaks the build for me (w/libc++ and clang 4.0), but I'm surprised it doesn't break elsewhere--nullptr needs to be std::nullptr_t not int.

I'm guessing this code is meant as part of transition to C++11, presumably it can be removed now?

git blame points to this commit for what it's worth.

If there's a platform that needs this for compatibility reasons perhaps instead of guarding with #ifndef the code instead checks for C++ version (#if __cplusplus < 201103L) or so?

dtzWill commented 6 years ago

(no longer want to track this, hopefully no longer a problem :))