Closed Bug 786118 Opened 7 years ago Closed 6 years ago

xpcom/io/nsLocalFileUnix.cpp -Wdeprecated-declarations 'lstat64' is deprecated: first deprecated in Mac OS X 10.6

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: gps, Assigned: jaas)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

compiling xpcom/io/nsLocalFileUnix.cpp with Clang on OS X Mountain Lion (possibly earlier releases) is spewing the following compiler warnings about deprecated functions being used:

xpcom/io/nsLocalFileUnix.cpp:271:9 [-Wdeprecated-declarations] 'stat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:273:13 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1009:9 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1048:9 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1142:9 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1502:9 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1574:9 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6
xpcom/io/nsLocalFileUnix.cpp:1617:13 [-Wdeprecated-declarations] 'lstat64' is deprecated: first deprecated in Mac OS X 10.6

The man page for stat has some interesting history regarding this function on OS X. I'm not sure what it all translates to in the context of shipping Firefox OS X binaries. All I know is I see some compiler warnings.
Assignee: nobody → joshmoz
Did some research, seems like we should just use stat/lstat on OS X now. OS X 10.6 only supports 64-bit stat/lstat.

The situation is more complicated if you need to target 10.5, but we don't.
Attached patch macstat1.patchSplinter Review
Attachment #813931 - Flags: review?(benjamin)
Attachment #813931 - Flags: review?(benjamin) → review+
Duplicate of this bug: 666614
Blocks: buildwarning
https://hg.mozilla.org/mozilla-central/rev/3fe96a7f8934
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.