Closed Bug 848264 Opened 9 years ago Closed 9 years ago

nsPluginHost.cpp: error: no member named 'strtol' in namespace 'std' (clang++ -stdlib=libc++)

Categories

(Core :: Plug-ins, defect)

x86_64
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(1 file)

nsGUIEvent.h (pulled via nsIPresShell.h) no longer provides <cstdlib>
which was implicitly used by nsPluginHost.cpp for std::strtol

dom/plugins/base/nsPluginHost.cpp:2819:31: error:
      no member named 'strtol' in namespace 'std'; did you mean 'strtok'?
    long mimetypecount = std::strtol(reader.LinePtr(), nullptr, 10);
                         ~~~~~^~~~~~
                              strtok
/usr/include/string.h:119:7: note: 'strtok' declared here
char    *strtok(char * __restrict, const char * __restrict);
         ^
dom/plugins/base/nsPluginHost.cpp:2819:65: error:
      too many arguments to function call, expected 2, have 3
    long mimetypecount = std::strtol(reader.LinePtr(), nullptr, 10);
                         ~~~~~~~~~~~                            ^~
2 errors generated.
Attachment #721632 - Flags: review?(jwalden+bmo)
Attachment #721632 - Flags: review?(jwalden+bmo) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/abe7aef12731
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.