Skip to content

Commit a1d4f57

Browse files
committed
COMMON: Add nullptr_t check for MacOSX i386
1 parent f0a7437 commit a1d4f57

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

common/scummsys.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,5 +506,13 @@
506506
#endif
507507
#endif
508508

509+
//
510+
// std::nullptr_t when this type is not available
511+
//
512+
#if defined(NO_CXX11_NULLPTR_T)
513+
namespace std {
514+
typedef decltype(nullptr) nullptr_t;
515+
}
516+
#endif
509517

510518
#endif

configure

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,23 @@ android | gamecube | psp | wii)
10281028
;;
10291029
esac
10301030

1031+
# Check if std::nullptr_t is available
1032+
echo_n "Checking if C++11 std::nullptr_t is available..."
1033+
cat > $TMPC << EOF
1034+
#include <cstddef>
1035+
int main(int argc, char *argv[]) {
1036+
std::nullptr_t i = nullptr;
1037+
return 0;
1038+
}
1039+
EOF
1040+
cc_check
1041+
if test "$TMPR" -eq 0; then
1042+
echo yes
1043+
else
1044+
echo no
1045+
define_in_config_if_yes yes 'NO_CXX11_NULLPTR_T'
1046+
fi
1047+
10311048
if test -n "$STRINGS"; then
10321049
_strings=$STRINGS
10331050
else

0 commit comments

Comments
 (0)