190 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
191 #endif
192
193 inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
194 // If number of characters written == count, Windows doesn't write a
195 // terminating NULL, so we do it ourselves.
196 int ret = _vsnprintf(buf, count, fmt, argptr);
197 if (count > 0) buf[count-1] = '\0';
198 return ret;
199 }
200
201 // Portability macros
202 #define PRAGMA_INTERFACE
203 #define PRAGMA_IMPLEMENTATION
204 #define PRAGMA_IMPLEMENTATION_(arg)
205 #define VALUE_OBJ_CLASS_SPEC : public _ValueObj
206
207 // Formatting.
208 #define FORMAT64_MODIFIER "I64"
209
210 #define offset_of(klass,field) offsetof(klass,field)
211
212 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP
|
190 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
191 #endif
192
193 inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
194 // If number of characters written == count, Windows doesn't write a
195 // terminating NULL, so we do it ourselves.
196 int ret = _vsnprintf(buf, count, fmt, argptr);
197 if (count > 0) buf[count-1] = '\0';
198 return ret;
199 }
200
201 // Portability macros
202 #define PRAGMA_INTERFACE
203 #define PRAGMA_IMPLEMENTATION
204 #define PRAGMA_IMPLEMENTATION_(arg)
205 #define VALUE_OBJ_CLASS_SPEC : public _ValueObj
206
207 // Formatting.
208 #define FORMAT64_MODIFIER "I64"
209
210 // Visual Studio doesn't provide inttypes.h so provide appropriate definitions here.
211 // The 32 bits ones might need I32 but seem to work ok without it.
212 #define PRId32 "d"
213 #define PRIu32 "u"
214 #define PRIx32 "x"
215
216 #define PRId64 "I64d"
217 #define PRIu64 "I64u"
218 #define PRIx64 "I64x"
219
220 #define PRIdPTR "d"
221 #define PRIuPTR "u"
222 #define PRIxPTR "x"
223
224 #define offset_of(klass,field) offsetof(klass,field)
225
226 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP
|