aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-01-21 14:46:00 -0800
committerMichael Bestas <mkbestas@lineageos.org>2017-12-28 14:36:33 +0200
commit3ba38c6ef2369d43338148dc357bc44b9a1d145f (patch)
treed9956bedacf752aac2b0aa124f3284f953a141b0
parent7faa340c85e1c40b858d794c9a44a9f7a7a52b13 (diff)
downloadandroid_external_exfat-staging/lineage-15.1.tar.gz
android_external_exfat-staging/lineage-15.1.tar.bz2
android_external_exfat-staging/lineage-15.1.zip
exfat-fuse: Don't export UTF conversion functionsstaging/lineage-15.1
* These will collide with other tools during static linking. Convert them to inlines instead. Change-Id: Icea3a5c2cb46fe034264c6a161868b8253923d03
-rw-r--r--libexfat/Android.mk2
-rw-r--r--libexfat/exfat.h6
-rw-r--r--libexfat/lookup.c1
-rw-r--r--libexfat/node.c1
-rw-r--r--libexfat/utf.h (renamed from libexfat/utf.c)6
-rw-r--r--libexfat/utils.c1
-rw-r--r--mkfs/main.c1
-rw-r--r--mkfs/rootdir.c1
8 files changed, 9 insertions, 10 deletions
diff --git a/libexfat/Android.mk b/libexfat/Android.mk
index 8058bc1..d542181 100644
--- a/libexfat/Android.mk
+++ b/libexfat/Android.mk
@@ -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
diff --git a/libexfat/exfat.h b/libexfat/exfat.h
index 8986aff..491fd4b 100644
--- a/libexfat/exfat.h
+++ b/libexfat/exfat.h
@@ -198,12 +198,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);
diff --git a/libexfat/lookup.c b/libexfat/lookup.c
index 137a84a..f58579e 100644
--- a/libexfat/lookup.c
+++ b/libexfat/lookup.c
@@ -21,6 +21,7 @@
*/
#include "exfat.h"
+#include "utf.h"
#include <string.h>
#include <errno.h>
#include <inttypes.h>
diff --git a/libexfat/node.c b/libexfat/node.c
index b544bd9..c161df7 100644
--- a/libexfat/node.c
+++ b/libexfat/node.c
@@ -21,6 +21,7 @@
*/
#include "exfat.h"
+#include "utf.h"
#include <errno.h>
#include <string.h>
#include <inttypes.h>
diff --git a/libexfat/utf.c b/libexfat/utf.h
index d8968db..f902e65 100644
--- a/libexfat/utf.c
+++ b/libexfat/utf.h
@@ -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;
@@ -202,7 +202,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;
@@ -235,7 +235,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;
diff --git a/libexfat/utils.c b/libexfat/utils.c
index c080d4c..939e4ba 100644
--- a/libexfat/utils.c
+++ b/libexfat/utils.c
@@ -21,6 +21,7 @@
*/
#include "exfat.h"
+#include "utf.h"
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
diff --git a/mkfs/main.c b/mkfs/main.c
index 02ac9c7..c6efa8f 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -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>
diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c
index a8cc834..e98ed7c 100644
--- a/mkfs/rootdir.c
+++ b/mkfs/rootdir.c
@@ -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)