mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18:31 +00:00
Remove some problematic APIs
In order to improve our chances of success building other open source projects we shouldn't define APIs that'll lead any ./configure script astray. For example: - brk() and sbrk() can break mac/windows support - syscall() is a superb way to break portability - arch_prctl() is the greatest of all horror shows
This commit is contained in:
parent
7512318a2a
commit
32682f0ce7
24 changed files with 37 additions and 919 deletions
|
@ -29,7 +29,9 @@
|
|||
*/
|
||||
char *setlocale(int category, const char *locale) {
|
||||
if (!locale || (*locale == '\0')) return "C";
|
||||
if (!strcmp(locale, "C") || !strcmp(locale, "POSIX")) {
|
||||
if (!strcmp(locale, "C") || //
|
||||
!strcmp(locale, "POSIX") || //
|
||||
!strcmp(locale, "C.UTF-8")) {
|
||||
return locale;
|
||||
} else {
|
||||
return NULL;
|
||||
|
|
|
@ -32,9 +32,12 @@ struct lconv {
|
|||
|
||||
int wcwidth(wchar_t) pureconst;
|
||||
int wcswidth(const wchar_t *, size_t) strlenesque;
|
||||
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;
|
||||
struct lconv *localeconv(void);
|
||||
|
||||
#ifdef COSMO
|
||||
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_STR_UNICODE_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue