mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 227841 - AIX: Thunderbird fails to build because of redefined macros
r+sr=mscott@mozilla.org
This commit is contained in:
parent
e7fce02b98
commit
b534e1ea18
@ -47,15 +47,16 @@
|
||||
#include "nsICmdLineHandler.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIContentHandler.h"
|
||||
#include "rdf.h"
|
||||
|
||||
class nsILocalFile;
|
||||
class nsIAbDirectory;
|
||||
|
||||
#define NC_RDF_NEWABCARD "http://home.netscape.com/NC-rdf#NewCard"
|
||||
#define NC_RDF_MODIFY "http://home.netscape.com/NC-rdf#Modify"
|
||||
#define NC_RDF_DELETE "http://home.netscape.com/NC-rdf#Delete"
|
||||
#define NC_RDF_DELETECARD "http://home.netscape.com/NC-rdf#DeleteCards"
|
||||
#define NC_RDF_NEWDIRECTORY "http://home.netscape.com/NC-rdf#NewDirectory"
|
||||
#define NC_RDF_NEWABCARD NC_NAMESPACE_URI "NewCard"
|
||||
#define NC_RDF_MODIFY NC_NAMESPACE_URI "Modify"
|
||||
#define NC_RDF_DELETE NC_NAMESPACE_URI "Delete"
|
||||
#define NC_RDF_DELETECARD NC_NAMESPACE_URI "DeleteCards"
|
||||
#define NC_RDF_NEWDIRECTORY NC_NAMESPACE_URI "NewDirectory"
|
||||
|
||||
#define EXPORT_ATTRIBUTES_TABLE_COUNT 53
|
||||
|
||||
|
@ -65,17 +65,15 @@ nsNNTPNewsgroupPost::~nsNNTPNewsgroupPost()
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<=HEADER_LAST; i++)
|
||||
if (m_header[i]) PR_FREEIF(m_header[i]);
|
||||
PR_FREEIF(m_header[i]);
|
||||
|
||||
PR_FREEIF(m_body);
|
||||
PR_FREEIF(m_messageBuffer);
|
||||
NS_IF_RELEASE(m_postMessageFile);
|
||||
}
|
||||
|
||||
char *
|
||||
nsNNTPNewsgroupPost::AppendAndAlloc(char *string,
|
||||
const char *newSubstring,
|
||||
PRBool withComma)
|
||||
static char *
|
||||
AppendAndAlloc(char *string, const char *newSubstring, PRBool withComma)
|
||||
{
|
||||
if (!newSubstring) return NULL;
|
||||
|
||||
@ -100,7 +98,7 @@ nsNNTPNewsgroupPost::AppendAndAlloc(char *string,
|
||||
nsresult
|
||||
nsNNTPNewsgroupPost::AddNewsgroup(const char *newsgroup)
|
||||
{
|
||||
m_header[HEADER_NEWSGROUPS]=AppendAndAlloc(m_header[HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
|
||||
m_header[IDX_HEADER_NEWSGROUPS]=AppendAndAlloc(m_header[IDX_HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -45,34 +45,34 @@
|
||||
#include "prmem.h"
|
||||
#include "nsISupportsObsolete.h"
|
||||
|
||||
#define HEADER_FROM 0
|
||||
#define HEADER_NEWSGROUPS 1
|
||||
#define HEADER_SUBJECT 2
|
||||
#define IDX_HEADER_FROM 0
|
||||
#define IDX_HEADER_NEWSGROUPS 1
|
||||
#define IDX_HEADER_SUBJECT 2
|
||||
|
||||
// set this to the last required header
|
||||
#define HEADER_LAST_REQUIRED HEADER_SUBJECT
|
||||
#define IDX_HEADER_LAST_REQUIRED IDX_HEADER_SUBJECT
|
||||
|
||||
#define HEADER_PATH 3
|
||||
#define HEADER_DATE 4
|
||||
#define IDX_HEADER_PATH 3
|
||||
#define IDX_HEADER_DATE 4
|
||||
|
||||
#define HEADER_REPLYTO 5
|
||||
#define HEADER_SENDER 6
|
||||
#define HEADER_FOLLOWUPTO 7
|
||||
#define HEADER_DATERECEIVED 8
|
||||
#define HEADER_EXPIRES 9
|
||||
#define HEADER_CONTROL 10
|
||||
#define HEADER_DISTRIBUTION 11
|
||||
#define HEADER_ORGANIZATION 12
|
||||
#define HEADER_REFERENCES 13
|
||||
#define IDX_HEADER_REPLYTO 5
|
||||
#define IDX_HEADER_SENDER 6
|
||||
#define IDX_HEADER_FOLLOWUPTO 7
|
||||
#define IDX_HEADER_DATERECEIVED 8
|
||||
#define IDX_HEADER_EXPIRES 9
|
||||
#define IDX_HEADER_CONTROL 10
|
||||
#define IDX_HEADER_DISTRIBUTION 11
|
||||
#define IDX_HEADER_ORGANIZATION 12
|
||||
#define IDX_HEADER_REFERENCES 13
|
||||
|
||||
// stuff that's required to be in the message,
|
||||
// but probably generated on the server
|
||||
#define HEADER_RELAYVERSION 14
|
||||
#define HEADER_POSTINGVERSION 15
|
||||
#define HEADER_MESSAGEID 16
|
||||
#define IDX_HEADER_RELAYVERSION 14
|
||||
#define IDX_HEADER_POSTINGVERSION 15
|
||||
#define IDX_HEADER_MESSAGEID 16
|
||||
|
||||
// keep this in sync with the above
|
||||
#define HEADER_LAST HEADER_MESSAGEID
|
||||
#define HEADER_LAST IDX_HEADER_MESSAGEID
|
||||
|
||||
class nsNNTPNewsgroupPost : public nsINNTPNewsgroupPost {
|
||||
|
||||
@ -83,39 +83,36 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// Required headers
|
||||
NS_IMPL_CLASS_GETSET_STR(RelayVersion, m_header[HEADER_RELAYVERSION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(PostingVersion, m_header[HEADER_POSTINGVERSION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(From, m_header[HEADER_FROM]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Date, m_header[HEADER_DATE]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Subject, m_header[HEADER_SUBJECT]);
|
||||
NS_IMPL_CLASS_GETSET_STR(RelayVersion, m_header[IDX_HEADER_RELAYVERSION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(PostingVersion, m_header[IDX_HEADER_POSTINGVERSION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(From, m_header[IDX_HEADER_FROM]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Date, m_header[IDX_HEADER_DATE]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Subject, m_header[IDX_HEADER_SUBJECT]);
|
||||
|
||||
NS_IMPL_CLASS_GETTER_STR(GetNewsgroups, m_header[HEADER_NEWSGROUPS]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Path, m_header[HEADER_PATH]);
|
||||
NS_IMPL_CLASS_GETTER_STR(GetNewsgroups, m_header[IDX_HEADER_NEWSGROUPS]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Path, m_header[IDX_HEADER_PATH]);
|
||||
|
||||
// Optional Headers
|
||||
NS_IMPL_CLASS_GETSET_STR(ReplyTo, m_header[HEADER_REPLYTO]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Sender, m_header[HEADER_SENDER]);
|
||||
NS_IMPL_CLASS_GETSET_STR(FollowupTo, m_header[HEADER_FOLLOWUPTO]);
|
||||
NS_IMPL_CLASS_GETSET_STR(DateRecieved, m_header[HEADER_DATERECEIVED]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Expires, m_header[HEADER_EXPIRES]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Control, m_header[HEADER_CONTROL]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Distribution, m_header[HEADER_DISTRIBUTION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Organization, m_header[HEADER_ORGANIZATION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(ReplyTo, m_header[IDX_HEADER_REPLYTO]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Sender, m_header[IDX_HEADER_SENDER]);
|
||||
NS_IMPL_CLASS_GETSET_STR(FollowupTo, m_header[IDX_HEADER_FOLLOWUPTO]);
|
||||
NS_IMPL_CLASS_GETSET_STR(DateRecieved, m_header[IDX_HEADER_DATERECEIVED]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Expires, m_header[IDX_HEADER_EXPIRES]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Control, m_header[IDX_HEADER_CONTROL]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Distribution, m_header[IDX_HEADER_DISTRIBUTION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Organization, m_header[IDX_HEADER_ORGANIZATION]);
|
||||
NS_IMPL_CLASS_GETSET_STR(Body, m_body);
|
||||
NS_IMPL_CLASS_GETTER_STR(GetReferences, m_header[HEADER_REFERENCES]);
|
||||
NS_IMPL_CLASS_GETTER_STR(GetReferences, m_header[IDX_HEADER_REFERENCES]);
|
||||
|
||||
NS_IMPL_CLASS_GETTER(GetIsControl, PRBool, m_isControl);
|
||||
|
||||
// the message can be stored in a file....allow accessors for getting and setting
|
||||
// the file name to post...
|
||||
NS_IMETHOD SetPostMessageFile(nsIFileSpec * aFileName);
|
||||
NS_IMETHOD GetPostMessageFile(nsIFileSpec ** aFileName);
|
||||
// the file name to post...
|
||||
NS_IMETHOD SetPostMessageFile(nsIFileSpec * aFileName);
|
||||
NS_IMETHOD GetPostMessageFile(nsIFileSpec ** aFileName);
|
||||
|
||||
NS_IMETHOD AddNewsgroup(const char *newsgroupName);
|
||||
|
||||
// helper routines
|
||||
static char *AppendAndAlloc(char *string, const char *newSubstring,
|
||||
PRBool withComma);
|
||||
private:
|
||||
nsIFileSpec *m_postMessageFile;
|
||||
char *m_header[HEADER_LAST+1];
|
||||
|
Loading…
Reference in New Issue
Block a user