OSDN Git Service

exfat-fuse: Don't export UTF conversion functions
authorSteve Kondik <steve@cyngn.com>
Thu, 21 Jan 2016 22:46:00 +0000 (14:46 -0800)
committerSteve Kondik <steve@cyngn.com>
Thu, 21 Jan 2016 22:46:00 +0000 (14:46 -0800)
 * These will collide with other tools during static linking. Convert
   them to inlines instead.

Change-Id: Icea3a5c2cb46fe034264c6a161868b8253923d03

libexfat/Android.mk
libexfat/exfat.h
libexfat/lookup.c
libexfat/node.c
libexfat/utf.h [moved from libexfat/utf.c with 96% similarity]
libexfat/utils.c
mkfs/main.c
mkfs/rootdir.c

index 7bbeb46..b85361a 100644 (file)
@@ -1,6 +1,6 @@
 LOCAL_PATH := $(call my-dir)
 
-common_src_files = cluster.c io.c log.c lookup.c mount.c node.c time.c utf.c utils.c
+common_src_files = cluster.c io.c log.c lookup.c mount.c node.c time.c utils.c
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := libexfat
index 5beba7c..a8676ec 100644 (file)
@@ -194,12 +194,6 @@ void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb);
 void exfat_print_info(const struct exfat_super_block* sb,
                uint32_t free_clusters);
 
-int utf16_to_utf8(char* output, const le16_t* input, size_t outsize,
-               size_t insize);
-int utf8_to_utf16(le16_t* output, const char* input, size_t outsize,
-               size_t insize);
-size_t utf16_length(const le16_t* str);
-
 struct exfat_node* exfat_get_node(struct exfat_node* node);
 void exfat_put_node(struct exfat* ef, struct exfat_node* node);
 int exfat_cleanup_node(struct exfat* ef, struct exfat_node* node);
index d5bb389..0b0d5aa 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "exfat.h"
+#include "utf.h"
 #include <string.h>
 #include <errno.h>
 #include <inttypes.h>
index 4dd4dc6..bf76036 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "exfat.h"
+#include "utf.h"
 #include <errno.h>
 #include <string.h>
 #include <inttypes.h>
similarity index 96%
rename from libexfat/utf.c
rename to libexfat/utf.h
index 6f14882..1ec5b71 100644 (file)
@@ -101,7 +101,7 @@ static const le16_t* utf16_to_wchar(const le16_t* input, wchar_t* wc,
        }
 }
 
-int utf16_to_utf8(char* output, const le16_t* input, size_t outsize,
+static inline int utf16_to_utf8(char* output, const le16_t* input, size_t outsize,
                size_t insize)
 {
        const le16_t* inp = input;
@@ -195,7 +195,7 @@ static le16_t* wchar_to_utf16(le16_t* output, wchar_t wc, size_t outsize)
        return output + 2;
 }
 
-int utf8_to_utf16(le16_t* output, const char* input, size_t outsize,
+ static inline int utf8_to_utf16(le16_t* output, const char* input, size_t outsize,
                size_t insize)
 {
        const char* inp = input;
@@ -221,7 +221,7 @@ int utf8_to_utf16(le16_t* output, const char* input, size_t outsize,
        return 0;
 }
 
-size_t utf16_length(const le16_t* str)
+static inline size_t utf16_length(const le16_t* str)
 {
        size_t i = 0;
 
index 388f360..32c1e62 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "exfat.h"
+#include "utf.h"
 #include <string.h>
 #include <stdio.h>
 #include <inttypes.h>
index 2ee6da6..0cf972d 100644 (file)
@@ -26,6 +26,7 @@
 #include "cbm.h"
 #include "uct.h"
 #include "rootdir.h"
+#include <utf.h>
 #include <exfat.h>
 #include <sys/types.h>
 #include <sys/time.h>
index 84fa31f..f31d5e0 100644 (file)
@@ -24,6 +24,7 @@
 #include "uct.h"
 #include "cbm.h"
 #include "uctc.h"
+#include <utf.h>
 #include <string.h>
 
 static off_t rootdir_alignment(void)