Mercurial > hg > truffle
comparison src/share/vm/utilities/vmError.cpp @ 603:dbbe28fc66b5
6778669: Patch from Red Hat -- fixes compilation errors
Summary: Some fixes which are required to build on recent GCCs.
Reviewed-by: never, kvn
Contributed-by: langel@redhat.com
author | twisti |
---|---|
date | Fri, 27 Feb 2009 03:35:40 -0800 |
parents | dabd8d202164 |
children | 7bb995fbd3c0 |
comparison
equal
deleted
inserted
replaced
602:ed6404fac86b | 603:dbbe28fc66b5 |
---|---|
1 /* | 1 /* |
2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
304 size_t len = strlen(file); | 304 size_t len = strlen(file); |
305 size_t buflen = sizeof(buf); | 305 size_t buflen = sizeof(buf); |
306 | 306 |
307 strncpy(buf, file, buflen); | 307 strncpy(buf, file, buflen); |
308 if (len + 10 < buflen) { | 308 if (len + 10 < buflen) { |
309 sprintf(buf + len, ":" SIZE_FORMAT, _lineno); | 309 sprintf(buf + len, ":%d", _lineno); |
310 } | 310 } |
311 st->print(" (%s)", buf); | 311 st->print(" (%s)", buf); |
312 } else { | 312 } else { |
313 st->print(" (0x%x)", _id); | 313 st->print(" (0x%x)", _id); |
314 } | 314 } |
418 frame fr = _context ? os::fetch_frame_from_context(_context) | 418 frame fr = _context ? os::fetch_frame_from_context(_context) |
419 : os::current_frame(); | 419 : os::current_frame(); |
420 | 420 |
421 if (fr.sp()) { | 421 if (fr.sp()) { |
422 st->print(", sp=" PTR_FORMAT, fr.sp()); | 422 st->print(", sp=" PTR_FORMAT, fr.sp()); |
423 st->print(", free space=%dk", | 423 st->print(", free space=%" INTPTR_FORMAT "k", |
424 ((intptr_t)fr.sp() - (intptr_t)stack_bottom) >> 10); | 424 ((intptr_t)fr.sp() - (intptr_t)stack_bottom) >> 10); |
425 } | 425 } |
426 | 426 |
427 st->cr(); | 427 st->cr(); |
428 } | 428 } |