Skip to content

Commit 90f1599

Browse files
committed
Remove emscripten specific error messages
1 parent da6f66b commit 90f1599

File tree

5 files changed

+4
-47
lines changed

5 files changed

+4
-47
lines changed

libc/src/__support/StringUtil/platform_errors.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
#ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_PLATFORM_ERRORS_H
1010
#define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_PLATFORM_ERRORS_H
1111

12-
#if defined(__linux__) || defined(__Fuchsia__)
12+
#if defined(__linux__) || defined(__Fuchsia__) || defined(__EMSCRIPTEN__)
1313
#include "tables/linux_platform_errors.h"
14-
#elif defined(__EMSCRIPTEN__)
15-
#include "tables/emscripten_platform_errors.h"
1614
#else
1715
#include "tables/minimal_platform_errors.h"
1816
#endif

libc/src/__support/StringUtil/tables/emscripten_platform_errors.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

libc/src/__support/StringUtil/tables/posix_errors.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ LIBC_INLINE_VAR constexpr MsgTable<76> POSIX_ERRORS = {
6363
MsgMapping(EPROTO, "Protocol error"),
6464
MsgMapping(EMULTIHOP, "Multihop attempted"),
6565
MsgMapping(EBADMSG, "Bad message"),
66-
#ifdef __EMSCRIPTEN__
67-
// For now, match the musl string
68-
MsgMapping(EOVERFLOW, "Value too large for data type"),
69-
#else
7066
MsgMapping(EOVERFLOW, "Value too large for defined data type"),
71-
#endif
7267
MsgMapping(ENOTSOCK, "Socket operation on non-socket"),
7368
MsgMapping(EDESTADDRREQ, "Destination address required"),
7469
MsgMapping(EMSGSIZE, "Message too long"),

libc/src/__support/StringUtil/tables/stdc_errors.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
namespace LIBC_NAMESPACE_DECL {
1717

1818
LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRORS = {
19-
#ifdef __EMSCRIPTEN__
20-
// For now, match the musl name for errno 0.
21-
MsgMapping(0, "No error information"),
22-
#else
2319
MsgMapping(0, "Success"),
24-
#endif
2520
MsgMapping(EDOM, "Numerical argument out of domain"),
2621
MsgMapping(ERANGE, "Numerical result out of range"),
2722
MsgMapping(EILSEQ, "Invalid or incomplete multibyte or wide character"),

libc/src/setjmp/wasm/sigsetjmp.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
#include "src/setjmp/sigsetjmp.h"
1010
#include "hdr/offsetof_macros.h"
1111
#include "src/__support/common.h"
12-
#include "src/__support/macros/config.h"
13-
14-
#if !defined(LIBC_TARGET_ARCH_IS_WASM)
15-
#error "Invalid file include"
16-
#endif
1712

1813
namespace LIBC_NAMESPACE_DECL {
19-
[[gnu::returns_twice]] int sigsetjmp(jmp_buf sigjmp_buf, int savesigs) {
20-
return setjmp(sigjmp_buf);
21-
}
14+
[[gnu::returns_twice]] int sigsetjmp(jmp_buf sigjmp_buf, int _) {
15+
return setjmp(sigjmp_buf);
2216
}
17+
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)