summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-09-09 08:27:12 +0100
committerAndreas Kling <kling@serenityos.org>2020-09-27 01:02:11 +0200
commitdb31452bc2ac1e64c682f85ae7aeae2f49b596ec (patch)
tree51adea4877465a0afd6b3de79f6f69f62d3f5825
parent5fbb8f9c6adfddae3c4761e3e49165a7be865fc8 (diff)
downloadserenity-db31452bc2ac1e64c682f85ae7aeae2f49b596ec.zip
LibC: Made mbtowc return int instead of size_t
-rw-r--r--Libraries/LibC/stdlib.cpp2
-rw-r--r--Libraries/LibC/stdlib.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibC/stdlib.cpp b/Libraries/LibC/stdlib.cpp
index 04a02b0cb0..90e4c639d0 100644
--- a/Libraries/LibC/stdlib.cpp
+++ b/Libraries/LibC/stdlib.cpp
@@ -796,7 +796,7 @@ size_t mbstowcs(wchar_t*, const char*, size_t)
ASSERT_NOT_REACHED();
}
-size_t mbtowc(wchar_t* wch, const char* data, size_t data_size)
+int mbtowc(wchar_t* wch, const char* data, size_t data_size)
{
// FIXME: This needs a real implementation.
UNUSED_PARAM(data_size);
diff --git a/Libraries/LibC/stdlib.h b/Libraries/LibC/stdlib.h
index fe4fe37a65..089d47b389 100644
--- a/Libraries/LibC/stdlib.h
+++ b/Libraries/LibC/stdlib.h
@@ -74,7 +74,7 @@ int mkstemp(char*);
char* mkdtemp(char*);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*));
size_t mbstowcs(wchar_t*, const char*, size_t);
-size_t mbtowc(wchar_t*, const char*, size_t);
+int mbtowc(wchar_t*, const char*, size_t);
int wctomb(char*, wchar_t);
size_t wcstombs(char*, const wchar_t*, size_t);
char* realpath(const char* pathname, char* buffer);