Fix MinGW-w64 compilation

Contributed by net147@gmail.com

BUGS=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9581045
Patch from Jonathan Liu <net147@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-03-03 11:07:29 +00:00
parent 2f7dfd7f6d
commit 2a2474d297

View File

@ -112,11 +112,16 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
}
#ifndef __MINGW64_VERSION_MAJOR
inline void MemoryBarrier() {
int barrier = 0;
__asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
}
#endif // __MINGW64_VERSION_MAJOR
#endif // __MINGW32__
// Generate a pseudo-random number in the range 0-2^31-1. Usually