Skip to content

Commit e8bff31

Browse files
committed
options/posix: Stub catgets
1 parent 235f4d8 commit e8bff31

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

options/posix/generic/nl_types.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <nl_types.h>
2+
3+
#include <bits/ensure.h>
4+
#include <mlibc/debug.hpp>
5+
6+
char *catgets(nl_catd, int, int, const char *) {
7+
__ensure(!"Not implemented");
8+
__builtin_unreachable();
9+
}
10+

options/posix/include/nl_types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#ifndef NL_TYPES_H
22
#define NL_TYPES_H
33

4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
47

8+
typedef void *nl_catd;
9+
10+
#ifndef __MLIBC_ABI_ONLY
11+
12+
char *catgets(nl_catd __catalog, int __set, int __number, const char *__string);
13+
14+
#endif /* !__MLIBC_ABI_ONLY */
15+
16+
#ifdef __cplusplus
17+
}
18+
#endif
519

620
#endif /* NL_TYPES_H */

options/posix/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ libc_sources += files(
1414
'generic/lookup.cpp',
1515
'generic/netdb.cpp',
1616
'generic/net-if.cpp',
17+
'generic/nl_types.cpp',
1718
'generic/poll.cpp',
1819
'generic/posix_ctype.cpp',
1920
'generic/posix-file-io.cpp',

0 commit comments

Comments
 (0)