Bug 659825 - Rename NS_DEPRECATED to MOZ_DEPRECATED to avoid conflict with Mac 10.7 SDK. r=jcranmer sr=bsmedberg
authorJesse Ruderman <jruderman@gmail.com>
Wed, 08 Jun 2011 09:34:02 +0200
changeset 71420 8199563892a39a896d8cf17fa31d7fc7a6b0c04a
parent 71419 dd319f22d679d224e9a1ec70a4ececb2566840d7
child 71421 571b534acde91ee4cb00dfd57ba313a82929158b
push id45
push userffxbld
push dateThu, 22 Sep 2011 17:29:26 +0000
treeherdermozilla-release@b3273da80b44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, bsmedberg
bugs659825
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 659825 - Rename NS_DEPRECATED to MOZ_DEPRECATED to avoid conflict with Mac 10.7 SDK. r=jcranmer sr=bsmedberg
xpcom/base/nscore.h
xpcom/idl-parser/header.py
xpcom/typelib/xpidl/xpidl_header.c
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -253,21 +253,21 @@
 #define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \
   ret (NS_STDCALL class::*name) args
 #endif
 
 /**
  * Deprecated declarations.
  */
 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
-# define NS_DEPRECATED __attribute__((deprecated))
+# define MOZ_DEPRECATED __attribute__((deprecated))
 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
-# define NS_DEPRECATED __declspec(deprecated)
+# define MOZ_DEPRECATED __declspec(deprecated)
 #else
-# define NS_DEPRECATED
+# define MOZ_DEPRECATED
 #endif
 
 /**
  * Generic API modifiers which return the standard XPCOM nsresult type
  */
 #define NS_IMETHOD          NS_IMETHOD_(nsresult)
 #define NS_IMETHODIMP       NS_IMETHODIMP_(nsresult)
 #define NS_METHOD           NS_METHOD_(nsresult)
--- a/xpcom/idl-parser/header.py
+++ b/xpcom/idl-parser/header.py
@@ -340,17 +340,17 @@ def write_interface(iface, fd):
             foundcdata = True
 
     if not foundcdata:
         fd.write("NS_NO_VTABLE ")
 
     if iface.attributes.scriptable:
         fd.write("NS_SCRIPTABLE ")
     if iface.attributes.deprecated:
-        fd.write("NS_DEPRECATED ")
+        fd.write("MOZ_DEPRECATED ")
     fd.write(iface.name)
     if iface.base:
         fd.write(" : public %s" % iface.base)
     fd.write(iface_prolog % names)
     for member in iface.members:
         if isinstance(member, xpidl.ConstMember):
             write_const_decl(member)
         elif isinstance(member, xpidl.Attribute):
--- a/xpcom/typelib/xpidl/xpidl_header.c
+++ b/xpcom/typelib/xpidl/xpidl_header.c
@@ -240,17 +240,17 @@ interface(TreeState *state)
     if (IDL_tree_property_get(IDL_INTERFACE(iface).ident, "deprecated"))
         deprecated = TRUE;
 
     /* The interface declaration itself. */
     fprintf(state->file,
             "class %s%s%s%s",
             (keepvtable ? "" : "NS_NO_VTABLE "),
             (scriptable ? "NS_SCRIPTABLE " : ""),
-            (deprecated ? "NS_DEPRECATED " : ""),
+            (deprecated ? "MOZ_DEPRECATED " : ""),
             className);
     
     if ((iter = IDL_INTERFACE(iface).inheritance_spec)) {
         fputs(" : ", state->file);
         if (IDL_LIST(iter).next != NULL) {
             IDL_tree_error(iter,
                            "multiple inheritance is not supported by xpidl");
             FAIL;
@@ -787,17 +787,17 @@ write_attr_accessor(IDL_tree attr_tree, 
                     gboolean getter, int mode, const char *className)
 {
     char *attrname = ATTR_IDENT(attr_tree).str;
     const char *binaryname;
     IDL_tree ident = IDL_LIST(IDL_ATTR_DCL(attr_tree).simple_declarations).data;
 
     if (mode == AS_DECL) {
         if (IDL_tree_property_get(ident, "deprecated"))
-            fputs("NS_DEPRECATED ", outfile);
+            fputs("MOZ_DEPRECATED ", outfile);
         if (is_method_scriptable(attr_tree, ident))
             fputs("NS_SCRIPTABLE ", outfile);
 
         fputs("NS_IMETHOD ", outfile);
     } else if (mode == AS_IMPL) {
         fprintf(outfile, "NS_IMETHODIMP %s::", className);
     }
     fprintf(outfile, "%cet",
@@ -1041,17 +1041,17 @@ write_method_signature(IDL_tree method_t
     gboolean op_context =
         (IDL_tree_property_get(op->ident, "implicit_jscontext") != NULL);
     const char *name;
     const char *binaryname;
     IDL_tree iter;
 
     if (mode == AS_DECL) {
         if (IDL_tree_property_get(op->ident, "deprecated"))
-            fputs("NS_DEPRECATED ", outfile);
+            fputs("MOZ_DEPRECATED ", outfile);
         if (is_method_scriptable(method_tree, op->ident))
             fputs("NS_SCRIPTABLE ", outfile);
 
         if (op_notxpcom) {
             fputs("NS_IMETHOD_(", outfile);
             if (!write_type(op->op_type_spec, WT_PLAIN, FALSE, outfile))
                 return FALSE;
             fputc(')', outfile);