[kaffe] CVS kaffe (robilad): Cross-compilation fix for libkaffevm
Kaffe CVS
cvs-commits at kaffe.org
Sun Mar 13 12:23:33 PST 2005
PatchSet 5552
Date: 2005/03/13 20:18:49
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Cross-compilation fix for libkaffevm
2005-03-13 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/debug.h:
(kaffe_dprintf_fd) Made static.
(dbgSetDprintfFD) New function.
* kaffe/kaffevm/debug.h:
(kaffe_dprintf_fd) Removed prototype.
(dbgSetDprintfFD) Added prototype.
* kaffe/kaffe/main.c (options):
Replace use of kaffe_dprintf_fd by dbgSetDprintfFD.
Members:
ChangeLog:1.3726->1.3727
kaffe/kaffe/main.c:1.78->1.79
kaffe/kaffevm/debug.c:1.62->1.63
kaffe/kaffevm/debug.h:1.41->1.42
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3726 kaffe/ChangeLog:1.3727
--- kaffe/ChangeLog:1.3726 Sun Mar 13 19:56:32 2005
+++ kaffe/ChangeLog Sun Mar 13 20:18:49 2005
@@ -1,5 +1,18 @@
2005-03-13 Dalibor Topic <robilad at kaffe.org>
+ * kaffe/kaffevm/debug.h:
+ (kaffe_dprintf_fd) Made static.
+ (dbgSetDprintfFD) New function.
+
+ * kaffe/kaffevm/debug.h:
+ (kaffe_dprintf_fd) Removed prototype.
+ (dbgSetDprintfFD) Added prototype.
+
+ * kaffe/kaffe/main.c (options):
+ Replace use of kaffe_dprintf_fd by dbgSetDprintfFD.
+
+2005-03-13 Dalibor Topic <robilad at kaffe.org>
+
* kaffe/kaffevm/debug.c
(kaffevmDebugMask) Made static.
(dbgGetMask) New function.
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.78 kaffe/kaffe/kaffe/main.c:1.79
--- kaffe/kaffe/kaffe/main.c:1.78 Tue Feb 15 10:43:58 2005
+++ kaffe/kaffe/kaffe/main.c Sun Mar 13 20:18:51 2005
@@ -848,7 +848,7 @@
_("Error: -debug-fd an open descriptor.\n"));
exit(1);
}
- kaffe_dprintf_fd = strtol(argv[i], &end, 10);
+ dbgSetDprintfFD(strtol(argv[i], &end, 10));
if (end != 0 && *end != '\0') {
fprintf(stderr,
_("Error: -debug-fd requires an integer.\n"));
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.62 kaffe/kaffe/kaffevm/debug.c:1.63
--- kaffe/kaffe/kaffevm/debug.c:1.62 Sun Mar 13 19:56:34 2005
+++ kaffe/kaffe/kaffevm/debug.c Sun Mar 13 20:18:51 2005
@@ -49,7 +49,18 @@
static size_t bufferBegin = 0;
static size_t bufferSz = 16 * 1024;
static int bufferOutput = 0;
-int kaffe_dprintf_fd = 2;
+static int kaffe_dprintf_fd = 2;
+
+/**
+ * Set the file descriptor used for debug output.
+ *
+ * @param fd new file descriptor
+ */
+void
+dbgSetDprintfFD(int fd)
+{
+ kaffe_dprintf_fd = fd;
+}
#if defined(NDEBUG) || !defined(KAFFE_VMDEBUG)
/* --- Debugging is NOT enabled --- */
Index: kaffe/kaffe/kaffevm/debug.h
diff -u kaffe/kaffe/kaffevm/debug.h:1.41 kaffe/kaffe/kaffevm/debug.h:1.42
--- kaffe/kaffe/kaffevm/debug.h:1.41 Sun Mar 13 19:56:34 2005
+++ kaffe/kaffe/kaffevm/debug.h Sun Mar 13 20:18:51 2005
@@ -207,7 +207,7 @@
#define KFUNC_FORMAT(archtype,fmt,arg)
#endif
-extern int kaffe_dprintf_fd;
+extern void dbgSetDprintfFD(int fd);
int kaffe_dprintf(const char *fmt, ...) KFUNC_FORMAT(printf,1,2);
/* Set the debugging mask to use. (give the mask) */
More information about the kaffe
mailing list