Bug 553032 - move MOZ_FORMAT_PRINTF to mfbt; r?froydnj
MozReview-Commit-ID: 2aC4ZUOsGPK
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -564,9 +564,19 @@
# include "mozilla/Compiler.h"
# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 1)
# define MOZ_HAVE_REF_QUALIFIERS
# endif
#endif
#endif /* __cplusplus */
+/**
+ * Printf style formats
+ */
+#ifdef __GNUC__
+#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck) \
+ __attribute__ ((format (printf, stringIndex, firstToCheck)))
+#else
+#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)
+#endif
+
#endif /* mozilla_Attributes_h */
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -155,26 +155,16 @@
# define MOZ_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
# define MOZ_DEPRECATED __declspec(deprecated)
#else
# define MOZ_DEPRECATED
#endif
/**
- * Printf style formats
- */
-#ifdef __GNUC__
-#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck) \
- __attribute__ ((format (printf, stringIndex, firstToCheck)))
-#else
-#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)
-#endif
-
-/**
* Generic API modifiers which return the standard XPCOM nsresult type
*
* - NS_IMETHOD: use for in-class declarations and definitions.
* - NS_IMETHODIMP: use for out-of-class definitions.
* - NS_METHOD: usually used in conjunction with NS_CALLBACK.
* - NS_CALLBACK: used in some legacy situations. Best avoided.
*/
#define NS_IMETHOD NS_IMETHOD_(nsresult)