Closed Bug 1725363 Opened 3 years ago Closed 2 years ago

Replace PL_strcasecmp with nsCRT::strcasecmp

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: smurfd, Assigned: smurfd)

Details

Attachments

(4 files)

We should replace NSPR functions with standard C functions when they are available on all platforms, or in this case a wrapper since a standard C function is not available on all platforms.

Following work done in this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1308104 and some others like that, i filed this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1724649 that needed more work before being possible

Lets :

  1. Replace PL_strcasecmp() calls with nsCRT::strcasecmp() outside of nsprpub/ and security/ code
    https://searchfox.org/mozilla-central/search?case=true&q=PL_strcasecmp

  2. Add #include "nsCRT.h" if it's needed for nsCRT::strcasecmp()'s function declaration.

  3. Remove #include "plstr.h" if it's no longer needed for other NSPR string function declarations.

Assignee: nobody → smurfd
Status: NEW → ASSIGNED

Hey, will skip this part for now, will instead file a specific bug to replace all possible PL_ in nsCRT.h

It could probably be ok to change the nsCRT implementation to use the standard C function instead of the PL_
https://searchfox.org/mozilla-central/rev/f71cb98fc35da418d2cb9ce31a0416d532dc9d69/xpcom/ds/nsCRT.h#43-53

i see there was a warning in layout/base/PresShell.cpp but the line where i did the changes is allright.
It could be that i was not up-to-date with the tree. updated yesterday.

Let me know if there is questions :)

edited....

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

Im thinking this should still be ok to land...

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/eb288627e25c
Replace PL_strcasecmp with nsCRT::strcasecmp modules/libjar/ r=valentin
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/b5794d191c27
Replace PL_strcasecmp with nsCRT::strcasecmp image/ r=aosmond
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/d0877f8a8fac
Replace PL_strcasecmp with nsCRT::strcasecmp r=jrmuizel
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/c568a569c161
Replace PL_strcasecmp with nsCRT::strcasecmp layout/ r=tnikkel
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: