Closed Bug 530290 Opened 16 years ago Closed 15 years ago

Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in netwerk/

Categories

(Core :: Networking, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: lusian, Assigned: lusian)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091120 Minefield/3.7a1pre (.NET CLR 3.5.30729) Build Identifier: Please see Bug #512106. Reproducible: Always
Blocks: 518502
Version: unspecified → Trunk
Attached patch Search&Replace, 0 (obsolete) — Splinter Review
Attachment #413805 - Flags: review?(cbiesinger)
Comment on attachment 413805 [details] [diff] [review] Search&Replace, 0 +++ b/netwerk/base/src/nsStandardURL.cpp + result.SetCapacity(mSpec.Length() + NS_MIN + ((nsACString_internal::size_type)32, mSpec.Length()/10)); remove the _internal part if you put the first argument on the same line as the NS_MIN, does it still fit into 80 characters? Can you use a constructor-style cast here? +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp + mRedirectionLimit = NS_MIN(value, (PRUint32)0xff); use NS_MIN(value, PRUint32(0xff)) alternatively, would 0xffU work? +++ b/netwerk/protocol/http/src/nsHttpTransaction.cpp + char *p = LocateHttpStart(buf, NS_MIN(count, (PRUint32)8)); same +++ b/netwerk/streamconv/converters/nsBinHexDecoder.cpp + aStream->Read(mDataBuffer, NS_MIN(aCount, (PRUint32)DATA_BUFFER_SIZE - 1), &numBytesRead); same also, this line is too long, please break at 80 characters +++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp + description.Truncate(NS_MIN((nsAString_internal::size_type)71, description.Length() - 28)); same (cast-style and line length)
Attachment #413805 - Flags: review?(cbiesinger) → review-
Attachment #413805 - Attachment is obsolete: true
Attachment #413808 - Flags: review?(cbiesinger)
Assignee: nobody → lusian
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #413808 - Flags: review?(cbiesinger) → review+
Keywords: checkin-needed
Attachment #413808 - Attachment description: Search&Replace, 1, comment #2 → Search&Replace, 1, comment #2, [check-in needed]
Attachment #413917 - Flags: review?(cbiesinger)
Attachment #413917 - Attachment description: Search&Replace, 0 → Search&Replace, 0 (gnomevfs)
Attachment #413917 - Flags: review?(cbiesinger) → review+
Attachment #413917 - Attachment description: Search&Replace, 0 (gnomevfs) → Search&Replace, 0 (gnomevfs), [check-in needed]
nsAboutCacheEntry.cpp /Users/philor/mc/mozilla/netwerk/protocol/about/src/nsAboutCacheEntry.cpp: In member function ‘nsresult nsAboutCacheEntry::WriteCacheEntryDescription(nsIOutputStream*, nsICacheEntryDescriptor*)’: /Users/philor/mc/mozilla/netwerk/protocol/about/src/nsAboutCacheEntry.cpp:392: error: no matching function for call to ‘NS_MIN(PRUint32&, long unsigned int)’ make[7]: *** [nsAboutCacheEntry.o] Error 1
Keywords: checkin-needed
And, eventually... nsGnomeVFSProtocolHandler.cpp /tools/gcc-4.3.3/installed/bin/g++ -o nsGnomeVFSProtocolHandler.o -c -I../../dist/system_wrappers -include /builds/slave/sendchange-linux-unittest/mozilla/config/gcc_hidden.h -DOSTYPE=\"Linux2.6.18-53.1.19\" -DOSARCH=Linux -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gnome-vfs-module-2.0 -I/builds/slave/sendchange-linux-unittest/mozilla/extensions/gnomevfs -I. -I../../dist/include -I../../dist/include/nsprpub -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nspr -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsGnomeVFSProtocolHandler.pp /builds/slave/sendchange-linux-unittest/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp /builds/slave/sendchange-linux-unittest/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp: In member function ‘GnomeVFSResult nsGnomeVFSInputStream::DoRead(char*, PRUint32, PRUint32*)’: /builds/slave/sendchange-linux-unittest/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp:526: error: ‘NS_MIN’ was not declared in this scope
Fixed by bug 661584.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: