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

Unified Diff: third_party/tcmalloc/vendor/src/windows/port.h

Issue 9316021: Update the tcmalloc vendor branch to r144 (gperftools 2.0). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reuploading Created 8 years, 9 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
Index: third_party/tcmalloc/vendor/src/windows/port.h
diff --git a/third_party/tcmalloc/vendor/src/windows/port.h b/third_party/tcmalloc/vendor/src/windows/port.h
index 300c72d10b058d1a660a22558e1186633bf26cdc..e9a020656b36fd63ea3251de42a8d0bc4a0e2900 100644
--- a/third_party/tcmalloc/vendor/src/windows/port.h
+++ b/third_party/tcmalloc/vendor/src/windows/port.h
@@ -65,14 +65,15 @@
/*
* 4018: signed/unsigned mismatch is common (and ok for signed_i < unsigned_i)
- * 4244: otherwise we get problems when substracting two size_t's to an int
+ * 4244: otherwise we get problems when subtracting two size_t's to an int
* 4288: VC++7 gets confused when a var is defined in a loop and then after it
* 4267: too many false positives for "conversion gives possible data loss"
* 4290: it's ok windows ignores the "throw" directive
* 4996: Yes, we're ok using "unsafe" functions like vsnprintf and getenv()
+ * 4146: internal_logging.cc intentionally negates an unsigned value
*/
#ifdef _MSC_VER
-#pragma warning(disable:4018 4244 4288 4267 4290 4996)
+#pragma warning(disable:4018 4244 4288 4267 4290 4996 4146)
#endif
#ifndef __cplusplus
@@ -414,10 +415,14 @@ inline unsigned int sleep(unsigned int seconds) {
return 0;
}
+// mingw64 seems to define timespec (though mingw.org mingw doesn't),
+// protected by the _TIMESPEC_DEFINED macro.
+#ifndef _TIMESPEC_DEFINED
struct timespec {
int tv_sec;
int tv_nsec;
};
+#endif
inline int nanosleep(const struct timespec *req, struct timespec *rem) {
Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000);
« no previous file with comments | « third_party/tcmalloc/vendor/src/windows/patch_functions.cc ('k') | third_party/tcmalloc/vendor/src/windows/preamble_patcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698