Closed
Bug 224012
Opened 21 years ago
Closed 15 years ago
VerReg.c warning: "VR_FILE_SEP" redefined
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: timeless, Assigned: philor)
References
Details
Attachments
(1 file, 2 obsolete files)
4.09 KB,
patch
|
dveditz
:
review+
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
/Users/timeless/mozilla/modules/libreg/src/VerReg.c 284:1: warning: "VR_FILE_SEP" redefined 278:1: warning: this is the location of the previous definition
Attachment #134368 -
Flags: superreview?(dveditz+bmo)
Attachment #134368 -
Flags: review?(dveditz+bmo)
Comment 2•21 years ago
|
||
Comment on attachment 134368 [details] [diff] [review] fix warning r=dveditz
Attachment #134368 -
Flags: superreview?(dveditz+bmo)
Attachment #134368 -
Flags: review?(dveditz+bmo)
Attachment #134368 -
Flags: review+
Attachment #134368 -
Flags: superreview?(dbaron)
Doesn't this *change* what VR_FILE_SEP is for XP_MACOSX + XP_UNIX?
no it does not change XP_UNIX, but it does change XP_MACOSX. I think that the change satisfies the spirit of the code. i can try to have someone confirm that changing it does not break anything...
I meant when both are defined, and it seems like XP_MACOSX may need "/".
Comment 6•21 years ago
|
||
I think this change is bad. I think we want the seperator to be '/' on OS X. Reasoning: The seperator is used here: http://lxr.mozilla.org/seamonkey/source/modules/libreg/src/VerReg.c#287 and that's called through here: http://lxr.mozilla.org/seamonkey/source/modules/libreg/src/VerReg.c#555 http://lxr.mozilla.org/seamonkey/ident?i=vr_GetPathname Tracing back we find one of the places the directory string is initialized is here: http://lxr.mozilla.org/seamonkey/source/modules/libreg/src/reg.c#269 Which calls: FSRefMakePath, which is documented here: http://developer.apple.com/documentation/Carbon/Reference/File_Manager/file_manager/function_group_8.html as "returning paths suitable for POSIX-style calls". ie, it'll use '/' So I think you need to rethink so the seperator on OS X remains '/'
Attachment #134368 -
Flags: superreview?(dbaron) → superreview-
Attachment #134368 -
Attachment is obsolete: true
Attachment #141024 -
Flags: review?(lordpixel)
Comment 8•21 years ago
|
||
Is XP_UNIX defined for Mac OS X builds? It might be clearer to write: #elif defined(XP_UNIX) || defined(XP_BEOS) || defined(XP_MACOS_X) Just so people less familar with OS X or the vagarities of Mozilla's #defines realize that we're not taking the XP_MAC branch.
yeah it's defined. standard usage is: #if defined(XP_UNIX) && !defined(XP_MACOSX) http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/modules/plugin/base/src/ns4xPlugin.cpp&rev=1.105&mark=469#445
Status: NEW → ASSIGNED
Comment 10•21 years ago
|
||
Apologies for the stream of questions, but is XP_MAC defined on OSX? If it is you're going to get the wrong answer. I still think it would be clearer is XP_MACOSX appeared in the if-then-else explicitly. I'd rather the code said what it does than have to know that XP_MAC is not defiend (counterintuitive) and XP_UNIX is defined (not immediately obvious).
Reporter | ||
Comment 11•21 years ago
|
||
nope, XP_MAC and XP_MACOSX are exclusive hence things like: /embedding/browser/webBrowser/nsWebBrowser.cpp, line 70 -- #if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
Assignee | ||
Comment 12•16 years ago
|
||
Comment on attachment 141024 [details] [diff] [review] fix warning but keep behavior Conveniently enough, in the intervening five years XP_MAC has become undefined, so now you can do a simpler version without it (and r+sr? dveditz, because you're not getting anything out of lordpixel).
Attachment #141024 -
Attachment is obsolete: true
Attachment #141024 -
Flags: review?(lordpixel)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [timeless: need new patch]
Comment 13•16 years ago
|
||
Surprise! Not entirely clear what you're proposing. What change do you believe should be made?
Assignee | ||
Comment 14•16 years ago
|
||
You had your chance, in 2004. Too late now.
Assignee | ||
Comment 15•16 years ago
|
||
Time to sweep it out, before the corpse starts to smell (any more).
Assignee: timeless → philringnalda
Attachment #355521 -
Flags: superreview?
Attachment #355521 -
Flags: review?
Assignee | ||
Comment 16•16 years ago
|
||
Comment on attachment 355521 [details] [diff] [review] XP_MAC is long dead Curse you, "failed to match any Bugzilla usernames."
Attachment #355521 -
Flags: superreview?(dveditz)
Attachment #355521 -
Flags: superreview?
Attachment #355521 -
Flags: review?(dveditz)
Attachment #355521 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Comment 17•16 years ago
|
||
Your patch looks good.
Comment 18•15 years ago
|
||
Comment on attachment 355521 [details] [diff] [review] XP_MAC is long dead r/sr=dveditz, but isn't libreg dead already?
Attachment #355521 -
Flags: superreview?(dveditz)
Attachment #355521 -
Flags: superreview+
Attachment #355521 -
Flags: review?(dveditz)
Attachment #355521 -
Flags: review+
Assignee | ||
Comment 19•15 years ago
|
||
'e's not dead, 'e's just resting. It's hypothetically used by migration, I think to hypothetically find Suite and 4.x profiles to import, which hypothetically still works even though we've started claiming it's unsupported despite the code still being around.
Assignee | ||
Comment 20•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/151cf0a020b0
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•