Closed Bug 467015 Opened 12 years ago Closed 11 years ago

"warning C4005: 'FILE_ILLEGAL_CHARACTERS' : macro redefinition"

Categories

(MailNews Core :: Backend, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: sgautherie, Assigned: sgautherie)

References

()

Details

(Whiteboard: [eventually fixed by bug 525463])

Attachments

(2 files)

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b3pre) Gecko/20081127 SeaMonkey/2.0a2pre] (home, debug default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/28a7fa014b03
+http://hg.mozilla.org/comm-central/rev/3c516d1c1248 + bug 519592 patch)

{
nsNNTPProtocol.cpp
objdir\mozilla\dist\include\xpcom\nsCRT.h(295) : warning C4005: 'FILE_ILLEGAL_CHARACTERS' : macro redefinition
        objdir\mozilla\dist\include\msgbase\msgCore.h(216) : see previous definition of 'FILE_ILLEGAL_CHARACTERS'
}
Flags: wanted-thunderbird3?
Duplicate of this bug: 471760
Depends on: 407295
Mark Banner wrote in bug 471760 comment 1:
> This is a side effect of being part way through the migration to frozen
> linkage. We can possibly ifndef it for MOZILLA_INTERNAL_API, we definitely
> don't want to remove the duplicate definition.

That certainly beats figuring out the proper include order of header files ;-)

By the way, this copy has been out of sync with nsCRT.h since April 2008. Is there any way to avoid this duplication? Can we e.g. get these defines moved into a file that is accessible from frozen linkage?

Or, just move this copy into a new .h file, update it per nsCRT.h, and then include it from the two places you need it (nsMessenger.cpp, nsMsgUtils.cpp), making sure it's one of the last includes.
Hrm, while those defines are referenced from mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp it looks like that's all dead code* since bug 268034 was fixed.

* Everything from line 933 down at: http://hg.mozilla.org/comm-central/annotate/9115f6b583dd/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp#l933
(In reply to comment #4)
> that's all dead code* since bug 268034 was fixed.

Right, that bug removed its caller:
|NS_MsgHashIfNecessary(alteredHost);|

***

Uncompiled, but hopefully straightforward:
the "only" part worth verifying is the removal of
|#include "prprf.h"|.
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #362156 - Flags: review?(bugzilla)
Depends on: 268034
Depends on: 381483
"Same" (history) as Av1-mail.

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090211 SeaMonkey/2.0a3pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/319799933481
 +http://hg.mozilla.org/comm-central/rev/...)

(Compiled but) Untested, but hopefully straightforward.
Attachment #362158 - Flags: review?(neil)
Keywords: helpwanted
Whiteboard: [ToDo: comment 3]
Attachment #362158 - Flags: superreview+
Attachment #362158 - Flags: review?(neil)
Attachment #362158 - Flags: review+
Comment on attachment 362158 [details] [diff] [review]
(Bv1-suite) Remove code leftover by bug 381483
[Checkin: Comment 9]

r+sr=jag
Comment on attachment 362156 [details] [diff] [review]
(Av1-mail) Remove code leftover by bug 268034
[Checkin: See comment 11]

And sr=jag on this one if you want it.
Attachment #362158 - Flags: approval-seamonkey2.0a3?
Attachment #362158 - Flags: approval-seamonkey2.0a3? → approval-seamonkey2.0a3+
Comment on attachment 362158 [details] [diff] [review]
(Bv1-suite) Remove code leftover by bug 381483
[Checkin: Comment 9]


http://hg.mozilla.org/comm-central/rev/6d1a6a5cb270
Attachment #362158 - Attachment description: (Bv1-suite) Remove code leftover by bug 381483 → (Bv1-suite) Remove code leftover by bug 381483 [Checkin: Comment 9]
Attachment #362156 - Flags: review?(bugzilla) → review+
Comment on attachment 362156 [details] [diff] [review]
(Av1-mail) Remove code leftover by bug 268034
[Checkin: See comment 11]

>@@ -44,23 +44,19 @@
> #include "nsIServiceManager.h"
> #include "nsArrayUtils.h"
> #include "nsISupportsPrimitives.h"
> #include "nsNetCID.h"
> #include "nsNetUtil.h"
> #include "nsSeamonkeyProfileMigrator.h"
> #include "nsIRelativeFilePref.h"
> #include "nsAppDirectoryServiceDefs.h"
>-#include "prprf.h"
> #include "nsVoidArray.h"
> #include "msgCore.h"

This file no longer needs to include:

#include "nsIObserverService.h"
#include "nsIServiceManager.h"
#include "nsIRelativeFilePref.h"
#include "msgCore.h"

(I noticed because I expected msgCore.h removal)

r=me with those removed.
Comment on attachment 362156 [details] [diff] [review]
(Av1-mail) Remove code leftover by bug 268034
[Checkin: See comment 11]


http://hg.mozilla.org/comm-central/rev/40d87b1e00d5
with comment 10 suggestion(s).
Attachment #362156 - Attachment description: (Av1-mail) Remove code leftover by bug 268034 → (Av1-mail) Remove code leftover by bug 268034 [Checkin: Comment 11]
Attachment #362156 - Attachment description: (Av1-mail) Remove code leftover by bug 268034 [Checkin: Comment 11] → (Av1-mail) Remove code leftover by bug 268034 [Checkin: See comment 11]
Attachment #362156 - Flags: superreview+
Assignee: sgautherie.bz → nobody
Status: ASSIGNED → NEW
Serge, anything still to do here? This looks to me like an abandoned bug with some fixes that hasn't been marked resolved.
(In reply to comment #3)
> By the way, this copy has been out of sync with nsCRT.h since April 2008.

Ftr, m-c file has
#define CONTROL_CHARACTERS ...
and
#define FILE_ILLEGAL_CHARACTERS CONTROL_CHARACTERS OS_FILE_ILLEGAL_CHARACTERS

(In reply to comment #12)
> Serge, anything still to do here?

"[ToDo: comment 3+13]"
Whiteboard: [ToDo: comment 3] → [ToDo: comment 3+13]
Depends on: 537967
(In reply to comment #3)
> include it from the two places you need it (nsMessenger.cpp, nsMsgUtils.cpp),

http://mxr.mozilla.org/comm-central/search?string=FILE_ILLEGAL_CHAR&case=1&find=%2Fmailnews%2Fbase%2F

We should include nsCRTGlue.h, now that bug 537967 is fixed.
No longer depends on: 407295
Assignee: nobody → sgautherie.bz
Severity: normal → trivial
Status: NEW → RESOLVED
Closed: 11 years ago
Depends on: 525463
Flags: wanted-thunderbird3? → in-testsuite-
Keywords: helpwanted
OS: Windows 2000 → All
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [ToDo: comment 3+13] → [eventually fixed by bug 525463]
Target Milestone: --- → Thunderbird 3.0b3
No longer depends on: 537967
You need to log in before you can comment on or make changes to this bug.