Move the QT_STRINGIFY macro to the top of qglobal.h
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 28 Mar 2012 19:27:09 +0000 (16:27 -0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Apr 2012 17:20:19 +0000 (19:20 +0200)
This will allow me to use them in qcompilerdetection.h.

Also, leave them defined.

Change-Id: I73cb39e3cfcc2463d1d47a856e4a64354ebe743c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/corelib/global/qglobal.h

index 768cf5a..1cf3838 100644 (file)
 #include <QtCore/qconfig.h>
 #endif
 
+/* These two macros makes it possible to turn the builtin line expander into a
+ * string literal. */
+#define QT_STRINGIFY2(x) #x
+#define QT_STRINGIFY(x) QT_STRINGIFY2(x)
 
 #include <QtCore/qsystemdetection.h>
 #include <QtCore/qcompilerdetection.h>
@@ -833,18 +837,8 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
 #   if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC)
 #      define Q_FUNC_INFO __FILE__ "(line number unavailable)"
 #   else
-        /* These two macros makes it possible to turn the builtin line expander into a
-         * string literal. */
-#       define QT_STRINGIFY2(x) #x
-#       define QT_STRINGIFY(x) QT_STRINGIFY2(x)
 #       define Q_FUNC_INFO __FILE__ ":" QT_STRINGIFY(__LINE__)
 #   endif
-    /* The MIPSpro and RVCT compilers postpones macro expansion,
-       and therefore macros must be in scope when being used. */
-#   if !defined(Q_CC_MIPS) && !defined(Q_CC_RVCT)
-#       undef QT_STRINGIFY2
-#       undef QT_STRINGIFY
-#   endif
 #endif