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

Unified Diff: runtime/platform/globals.h

Issue 23578046: Replace the memcpy macro with a lint check. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « runtime/bin/process_win.cc ('k') | runtime/vm/os_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
===================================================================
--- runtime/platform/globals.h (revision 27636)
+++ runtime/platform/globals.h (working copy)
@@ -417,22 +417,6 @@
}
-// A macro to ensure that memcpy cannot be called. memcpy does not handle
-// overlapping memory regions. Even though this is well documented it seems
-// to be used in error quite often. To avoid problems we disallow the direct
-// use of memcpy here.
-//
-// On Android and Windows the basic libraries use memcpy and therefore
-// compilation will fail if memcpy is overwritten even if user code does not
-// use memcpy.
-#if defined(memcpy)
-#undef memcpy
-#endif
-#if !( defined(TARGET_OS_ANDROID) || defined(TARGET_OS_WINDOWS) )
-#define memcpy "Please use memmove instead of memcpy."
-#endif
-
-
// On Windows the reentrent version of strtok is called
// strtok_s. Unify on the posix name strtok_r.
#if defined(TARGET_OS_WINDOWS)
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/vm/os_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698