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

Side by Side Diff: src/platform-win32.cc

Issue 9428027: Fix compilation with MinGW-w64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/globals.h ('k') | src/win32-headers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #ifdef __MINGW32__ 51 #ifdef __MINGW32__
52 52
53 int localtime_s(tm* out_tm, const time_t* time) { 53 int localtime_s(tm* out_tm, const time_t* time) {
54 tm* posix_local_time_struct = localtime(time); 54 tm* posix_local_time_struct = localtime(time);
55 if (posix_local_time_struct == NULL) return 1; 55 if (posix_local_time_struct == NULL) return 1;
56 *out_tm = *posix_local_time_struct; 56 *out_tm = *posix_local_time_struct;
57 return 0; 57 return 0;
58 } 58 }
59 59
60 60
61 // Not sure this the correct interpretation of _mkgmtime
62 time_t _mkgmtime(tm* timeptr) {
63 return mktime(timeptr);
64 }
65
66
67 int fopen_s(FILE** pFile, const char* filename, const char* mode) { 61 int fopen_s(FILE** pFile, const char* filename, const char* mode) {
68 *pFile = fopen(filename, mode); 62 *pFile = fopen(filename, mode);
69 return *pFile != NULL ? 0 : 1; 63 return *pFile != NULL ? 0 : 1;
70 } 64 }
71 65
72 66
67 #ifndef __MINGW64_VERSION_MAJOR
68
69 // Not sure this the correct interpretation of _mkgmtime
70 time_t _mkgmtime(tm* timeptr) {
71 return mktime(timeptr);
72 }
73
74
73 #define _TRUNCATE 0 75 #define _TRUNCATE 0
74 #define STRUNCATE 80 76 #define STRUNCATE 80
75 77
78 #endif // __MINGW64_VERSION_MAJOR
79
80
76 int _vsnprintf_s(char* buffer, size_t sizeOfBuffer, size_t count, 81 int _vsnprintf_s(char* buffer, size_t sizeOfBuffer, size_t count,
77 const char* format, va_list argptr) { 82 const char* format, va_list argptr) {
78 ASSERT(count == _TRUNCATE); 83 ASSERT(count == _TRUNCATE);
79 return _vsnprintf(buffer, sizeOfBuffer, format, argptr); 84 return _vsnprintf(buffer, sizeOfBuffer, format, argptr);
80 } 85 }
81 86
82 87
83 int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) { 88 int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
84 CHECK(source != NULL); 89 CHECK(source != NULL);
85 CHECK(dest != NULL); 90 CHECK(dest != NULL);
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 2039
2035 2040
2036 void Sampler::Stop() { 2041 void Sampler::Stop() {
2037 ASSERT(IsActive()); 2042 ASSERT(IsActive());
2038 SamplerThread::RemoveActiveSampler(this); 2043 SamplerThread::RemoveActiveSampler(this);
2039 SetActive(false); 2044 SetActive(false);
2040 } 2045 }
2041 2046
2042 2047
2043 } } // namespace v8::internal 2048 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/win32-headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698