diff options
author | 2009-07-05 20:09:26 +0300 | |
---|---|---|
committer | 2009-07-05 20:09:26 +0300 | |
commit | ae00eadddf49f3389516fcf7fc79325da4d7d08d (patch) | |
tree | 379bb27a421494d729d0d845758ca6cdef93bdc7 /cutils.c | |
parent | Add X2APIC support. (diff) | |
parent | Rename target_cpu to target_arch2 (diff) | |
download | qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.tar.gz qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.tar.bz2 qemu-kvm-ae00eadddf49f3389516fcf7fc79325da4d7d08d.zip |
Merge commit '600309b6108484a60be4a84cfe68e6b8d645799c' into upstream-merge
* commit '600309b6108484a60be4a84cfe68e6b8d645799c':
Rename target_cpu to target_arch2
monitor: Fix typo in documentation
target-mips: fix MADD and MSUB/MSUBU instructions
Fix hxtool.
Use ctz64 in favor of ffsll
Respect the standard
Use pstrcpy and pstrcat to avoid OpenBSD linker warning
Suppress a GCC warning
Fix breakage by obsolete _P() for good
Fix sdl_zoom compile problems on OpenBSD
Fix missing strnlen problems
Fix typo
Remove bogus -Werror
Conflicts:
configure
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'cutils.c')
-rw-r--r-- | cutils.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -109,6 +109,19 @@ int stristart(const char *str, const char *val, const char **ptr) return 1; } +/* XXX: use host strnlen if available ? */ +int qemu_strnlen(const char *s, int max_len) +{ + int i; + + for(i = 0; i < max_len; i++) { + if (s[i] == '\0') { + break; + } + } + return i; +} + time_t mktimegm(struct tm *tm) { time_t t; |