Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: net/tools/balsa/balsa_frame.cc

Issue 312003002: Port net/tools/balsa to non-Linux platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compiler warnings Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/balsa/balsa_frame.h ('k') | net/tools/balsa/balsa_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/balsa/balsa_frame.cc
diff --git a/net/tools/balsa/balsa_frame.cc b/net/tools/balsa/balsa_frame.cc
index 96e91935597b734b39088d26bd10a8f6614dba25..463a678dead95cab698cda50771efa3307b861ec 100644
--- a/net/tools/balsa/balsa_frame.cc
+++ b/net/tools/balsa/balsa_frame.cc
@@ -8,7 +8,6 @@
#if __SSE2__
#include <emmintrin.h>
#endif // __SSE2__
-#include <strings.h>
#include <limits>
#include <string>
@@ -26,6 +25,13 @@
#include "net/tools/balsa/split.h"
#include "net/tools/balsa/string_piece_utils.h"
+#if defined(COMPILER_MSVC)
+#include <string.h>
+#define strncasecmp _strnicmp
+#else
+#include <strings.h>
+#endif
+
namespace net {
// Constants holding some header names for headers which can affect the way the
@@ -426,7 +432,7 @@ void BalsaFrame::ProcessFirstLine(const char* begin, const char* end) {
}
if (is_request_) {
- int version_length =
+ size_t version_length =
headers_->whitespace_4_idx_ - headers_->non_whitespace_3_idx_;
visitor_->ProcessRequestFirstLine(
begin + headers_->non_whitespace_1_idx_,
@@ -1556,9 +1562,4 @@ size_t BalsaFrame::ProcessInput(const char* input, size_t size) {
return current - input;
}
-const uint32 BalsaFrame::kValidTerm1;
-const uint32 BalsaFrame::kValidTerm1Mask;
-const uint32 BalsaFrame::kValidTerm2;
-const uint32 BalsaFrame::kValidTerm2Mask;
-
} // namespace net
« no previous file with comments | « net/tools/balsa/balsa_frame.h ('k') | net/tools/balsa/balsa_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698