提交 57ae1b51 编写于 作者: O openharmony_ci 提交者: Gitee

!19 feat: musl adapt for mksh & toybox

Merge pull request !19 from MGY917/master
#include <wchar.h>
#include <unsupported_api.h>
static const unsigned char table[] = {
#include "nonspacing.h"
......@@ -11,7 +10,6 @@ static const unsigned char wtable[] = {
int wcwidth(wchar_t wc)
{
unsupported_api(__FUNCTION__);
if (wc < 0xffU)
return (wc+1 & 0x7f) >= 0x21 ? 1 : wc ? -1 : 0;
if ((wc & 0xfffeffffU) < 0xfffe) {
......
......@@ -4,15 +4,11 @@
#include <errno.h>
#include <stdlib.h>
#include "__dirent.h"
#include <unsupported_api.h>
DIR *fdopendir(int fd)
{
DIR *dir;
struct stat st;
unsupported_api(__FUNCTION__);
if (fstat(fd, &st) < 0) {
return 0;
}
......
#include <fcntl.h>
#include <stdarg.h>
#include "syscall.h"
#include <unsupported_api.h>
int openat(int fd, const char *filename, int flags, ...)
{
mode_t mode = 0;
unsupported_api(__FUNCTION__);
if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
va_list ap;
va_start(ap, flags);
......
#include <sys/resource.h>
#include <string.h>
#include <errno.h>
#include <unsupported_api.h>
#include "syscall.h"
int getrusage(int who, struct rusage *ru)
{
int r;
unsupported_api(__FUNCTION__);
#ifdef SYS_getrusage_time64
long long kru64[18];
r = __syscall(SYS_getrusage_time64, who, kru64);
......
......@@ -47,6 +47,5 @@ int getgrnam_r(const char *name, struct group *gr, char *buf, size_t size, struc
int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size, struct group **res)
{
unsupported_api(__FUNCTION__);
return getgr_r(0, gid, gr, buf, size, res);
}
#include <unsupported_api.h>
#include "pwf.h"
#include <unsupported_api.h>
static FILE *f;
static char *line;
......
#include <unistd.h>
#include <unsupported_api.h>
#include "syscall.h"
ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t bufsize)
{
unsupported_api(__FUNCTION__);
return syscall(SYS_readlinkat, fd, path, buf, bufsize);
}
#include <unistd.h>
#include <unsupported_api.h>
#include "syscall.h"
int unlinkat(int fd, const char *path, int flag)
{
unsupported_api(__FUNCTION__);
return syscall(SYS_unlinkat, fd, path, flag);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册