diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2015-03-16 15:11:14 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2015-03-16 15:11:14 +0800 |
commit | 82d29e4a85507816e28199b108209a643a8b6a93 (patch) | |
tree | 3b3be511835284414f5e8749d30b3ef4d41b1bf3 | |
parent | b6b2ce5f9f87a09b14499cb00c600c601f022634 (diff) | |
download | libc-bench-82d29e4a85507816e28199b108209a643a8b6a93.tar.gz |
Make it compile for Android Lollipop 5.1
Change-Id: Ib8555c9d31f9375c65e8a05e9ed4ec0c0fcde30a
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | Android.mk | 23 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | main.c | 4 | ||||
-rw-r--r-- | regex.c | 4 | ||||
-rw-r--r-- | string.c | 4 |
5 files changed, 31 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..1dc1a0b --- /dev/null +++ b/Android.mk @@ -0,0 +1,23 @@ +LOCAL_PATH := $(my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= main.c \ + malloc.c \ + pthread.c \ + regex.c \ + stdio.c \ + string.c \ + +LOCAL_MODULE := libcbench + +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) + +LOCAL_MULTILIB := both +LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE) +LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 + +LOCAL_MODULE_TAGS := debug + +LOCAL_CFLAGS += -std=gnu99 -D_XOPEN_SOURCE=700 + +include $(BUILD_EXECUTABLE) @@ -0,0 +1,2 @@ +The original repository is here: + git://git.musl-libc.org/libc-bench @@ -85,8 +85,8 @@ int main() RUN(b_pthread_createjoin_minimal1, 0); RUN(b_pthread_createjoin_minimal2, 0); - RUN(b_utf8_bigbuf, 0); - RUN(b_utf8_onebyone, 0); + //RUN(b_utf8_bigbuf, 0); + //RUN(b_utf8_onebyone, 0); RUN(b_stdio_putcgetc, 0); RUN(b_stdio_putcgetc_unlocked, 0); @@ -4,7 +4,7 @@ #include <regex.h> #include <locale.h> -size_t b_regex_compile(void *s) +void b_regex_compile(void *s) { regex_t re; size_t i; @@ -15,7 +15,7 @@ size_t b_regex_compile(void *s) } } -size_t b_regex_search(void *s) +void b_regex_search(void *s) { char buf[260000]; regex_t re; @@ -19,7 +19,7 @@ size_t b_string_strstr(void *dummy) memcpy(haystack + l*i, needle, l+1); for (i=0; i<50; i++) { haystack[0]^=1; - cs += (int)strstr(haystack, needle); + cs += (char *)strstr(haystack, needle); } free(haystack); return cs; @@ -45,7 +45,7 @@ size_t b_string_strchr(void *dummy) buf[BUFLEN-2] = 'b'; for (i=0; i<100; i++) { buf[i] = '0'+i%8; - cs += (int)strchr(buf, 'b'); + cs += (char *)strchr(buf, 'b'); } free(buf); return cs; |