aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-11 21:35:42 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-11 21:35:42 +0000
commitca10f86763f58b7b3667e2ca7d26db3dc810eb20 (patch)
treedf0e6a1b430a4e0c68e7d11d83c1f974afe3c412 /tcg/tcg.c
parentea86e4e6007af70a5e23c4f93eea9d0732e3bcb0 (diff)
Remove osdep.c/qemu-img code duplication
(Kevin Wolf) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4191 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 379b8f230c..26e0ff80a7 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -39,7 +39,7 @@
#endif
#include "config.h"
-#include "osdep.h"
+#include "qemu-common.h"
/* Note: the long term plan is to reduce the dependancies on the QEMU
CPU definitions. Currently they are used for qemu_ld/st
@@ -147,36 +147,6 @@ int gen_new_label(void)
#include "tcg-target.c"
-/* XXX: factorize */
-static void pstrcpy(char *buf, int buf_size, const char *str)
-{
- int c;
- char *q = buf;
-
- if (buf_size <= 0)
- return;
-
- for(;;) {
- c = *str++;
- if (c == 0 || q >= buf + buf_size - 1)
- break;
- *q++ = c;
- }
- *q = '\0';
-}
-
-#if TCG_TARGET_REG_BITS == 32
-/* strcat and truncate. */
-static char *pstrcat(char *buf, int buf_size, const char *s)
-{
- int len;
- len = strlen(buf);
- if (len < buf_size)
- pstrcpy(buf + len, buf_size - len, s);
- return buf;
-}
-#endif
-
/* pool based memory allocation */
void *tcg_malloc_internal(TCGContext *s, int size)
{