svn commit: r227475 - head/sys/sys
David Chisnall
theraven at FreeBSD.org
Sat Nov 12 20:25:12 UTC 2011
Author: theraven
Date: Sat Nov 12 20:25:11 2011
New Revision: 227475
URL: http://svn.freebsd.org/changeset/base/227475
Log:
Expose all of the C99 limits.h stuff when we're in C++11 mode (or some approximation thereof). C++11 finally adds long long to C++. Now even C++ programmers are allowed to use 64-bit integers!
Approved by: dim (mentor)
Modified:
head/sys/sys/cdefs.h
Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h Sat Nov 12 20:16:06 2011 (r227474)
+++ head/sys/sys/cdefs.h Sat Nov 12 20:25:11 2011 (r227475)
@@ -253,6 +253,17 @@
#define __LONG_LONG_SUPPORTED
#endif
+/* C++11 exposes a load of C99 stuff */
+#if __cplusplus >= 201103L
+# define __LONG_LONG_SUPPORTED
+# ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+# endif
+# ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+# endif
+#endif
+
/*
* GCC 2.95 provides `__restrict' as an extension to C90 to support the
* C99-specific `restrict' type qualifier. We happen to use `__restrict' as
More information about the svn-src-all
mailing list