Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
80695b1d
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
80695b1d
编写于
2月 14, 2011
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
begin namespace-cleanup of standard C headers
上级
7fe308eb
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
102 addition
and
70 deletion
+102
-70
include/bits/limits.h
include/bits/limits.h
+3
-2
include/bits/stdio.h
include/bits/stdio.h
+8
-1
include/limits.h
include/limits.h
+7
-1
include/stdio.h
include/stdio.h
+31
-20
include/stdlib.h
include/stdlib.h
+51
-46
src/temp/mkdtemp.c
src/temp/mkdtemp.c
+1
-0
src/temp/mkstemp.c
src/temp/mkstemp.c
+1
-0
未找到文件。
include/bits/limits.h
浏览文件 @
80695b1d
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define PIPE_BUF 4096
#define PAGESIZE 4096
#define PAGE_SIZE PAGESIZE
...
...
@@ -10,9 +12,9 @@
#define ARG_MAX 131072
#define IOV_MAX 1024
#define SYMLOOP_MAX 40
#define WORD_BIT 32
#define LONG_BIT 32
#endif
#define SHRT_MIN (-1-0x7fff)
#define SHRT_MAX 0x7fff
...
...
@@ -29,4 +31,3 @@
#define LLONG_MIN (-1-0x7fffffffffffffffLL)
#define LLONG_MAX 0x7fffffffffffffffLL
#define ULLONG_MAX 0xffffffffffffffffULL
include/bits/stdio.h
浏览文件 @
80695b1d
...
...
@@ -5,6 +5,13 @@
#define TMP_MAX 10000
#define L_cuserid 20
#define L_ctermid 20
#define L_tmpnam 20
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define L_ctermid 20
#endif
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define P_tmpdir "/tmp"
#endif
include/limits.h
浏览文件 @
80695b1d
...
...
@@ -13,9 +13,13 @@
#define UCHAR_MAX 255
#define CHAR_MIN (-128)
#define CHAR_MAX 127
#define SSIZE_MAX LONG_MAX
#define MB_LEN_MAX 4
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define SSIZE_MAX LONG_MAX
#define TZNAME_MAX 6
#define TTY_NAME_MAX 20
#define HOST_NAME_MAX 255
...
...
@@ -100,3 +104,5 @@
#define _XOPEN_PATH_MAX 1024
#endif
#endif
include/stdio.h
浏览文件 @
80695b1d
...
...
@@ -8,8 +8,12 @@ extern "C" {
#define __NEED_FILE
#define __NEED_va_list
#define __NEED_size_t
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#define __NEED_ssize_t
#define __NEED_off_t
#endif
#include <bits/alltypes.h>
...
...
@@ -50,26 +54,19 @@ extern FILE *const stderr;
#define stderr (stderr)
FILE
*
fopen
(
const
char
*
,
const
char
*
);
FILE
*
fdopen
(
int
,
const
char
*
);
FILE
*
freopen
(
const
char
*
,
const
char
*
,
FILE
*
);
int
fclose
(
FILE
*
);
FILE
*
popen
(
const
char
*
,
const
char
*
);
int
pclose
(
FILE
*
);
int
remove
(
const
char
*
);
int
rename
(
const
char
*
,
const
char
*
);
int
fileno
(
FILE
*
);
int
feof
(
FILE
*
);
int
ferror
(
FILE
*
);
int
fflush
(
FILE
*
);
void
clearerr
(
FILE
*
);
int
fseek
(
FILE
*
,
long
,
int
);
int
fseeko
(
FILE
*
,
off_t
,
int
);
long
ftell
(
FILE
*
);
off_t
ftello
(
FILE
*
);
void
rewind
(
FILE
*
);
int
fgetpos
(
FILE
*
,
fpos_t
*
);
...
...
@@ -103,9 +100,6 @@ int vfprintf(FILE *, const char *, va_list);
int
vsprintf
(
char
*
,
const
char
*
,
va_list
);
int
vsnprintf
(
char
*
,
size_t
,
const
char
*
,
va_list
);
int
dprintf
(
int
,
const
char
*
,
...);
int
vdprintf
(
int
,
const
char
*
,
va_list
);
int
scanf
(
const
char
*
,
...);
int
fscanf
(
FILE
*
,
const
char
*
,
...);
int
sscanf
(
const
char
*
,
const
char
*
,
...);
...
...
@@ -115,6 +109,22 @@ int vsscanf(const char *, const char *, va_list);
void
perror
(
const
char
*
);
int
setvbuf
(
FILE
*
,
char
*
,
int
,
size_t
);
void
setbuf
(
FILE
*
,
char
*
);
char
*
tmpnam
(
char
*
);
FILE
*
tmpfile
(
void
);
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
FILE
*
fdopen
(
int
,
const
char
*
);
FILE
*
popen
(
const
char
*
,
const
char
*
);
int
pclose
(
FILE
*
);
int
fileno
(
FILE
*
);
int
fseeko
(
FILE
*
,
off_t
,
int
);
off_t
ftello
(
FILE
*
);
int
dprintf
(
int
,
const
char
*
,
...);
int
vdprintf
(
int
,
const
char
*
,
va_list
);
void
flockfile
(
FILE
*
);
int
ftrylockfile
(
FILE
*
);
void
funlockfile
(
FILE
*
);
...
...
@@ -122,20 +132,21 @@ int getc_unlocked(FILE *);
int
getchar_unlocked
(
void
);
int
putc_unlocked
(
int
,
FILE
*
);
int
putchar_unlocked
(
int
);
ssize_t
getdelim
(
char
**
,
size_t
*
,
int
,
FILE
*
);
ssize_t
getline
(
char
**
,
size_t
*
,
FILE
*
);
int
renameat
(
int
,
const
char
*
,
int
,
const
char
*
);
char
*
ctermid
(
char
*
);
#endif
int
setvbuf
(
FILE
*
,
char
*
,
int
,
size_t
);
void
setbuf
(
FILE
*
,
char
*
);
char
*
tmpnam
(
char
*
);
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
char
*
tempnam
(
const
char
*
,
const
char
*
);
FILE
*
tmpfile
(
void
);
char
*
ctermid
(
char
*
);
ssize_t
getdelim
(
char
**
,
size_t
*
,
int
,
FILE
*
);
ssize_t
getline
(
char
**
,
size_t
*
,
FILE
*
);
#endif
int
renameat
(
int
,
const
char
*
,
int
,
const
char
*
);
#if defined(_GNU_SOURCE)
#undef off64_t
#define off64_t off_t
#endif
#ifdef __cplusplus
}
...
...
include/stdlib.h
浏览文件 @
80695b1d
...
...
@@ -28,59 +28,26 @@ long double strtold (const char *, char **);
long
strtol
(
const
char
*
,
char
**
,
int
);
unsigned
long
strtoul
(
const
char
*
,
char
**
,
int
);
long
long
strtoll
(
const
char
*
,
char
**
,
int
);
unsigned
long
long
strtoull
(
const
char
*
,
char
**
,
int
);
char
*
l64a
(
long
);
long
a64l
(
const
char
*
);
long
int
random
(
void
);
void
srandom
(
unsigned
int
);
char
*
initstate
(
unsigned
int
,
char
*
,
size_t
);
char
*
setstate
(
char
*
);
int
rand
(
void
);
void
srand
(
unsigned
);
int
rand_r
(
unsigned
*
);
double
drand48
(
void
);
double
erand48
(
unsigned
short
[
3
]);
long
int
lrand48
(
void
);
long
int
nrand48
(
unsigned
short
[
3
]);
long
mrand48
(
void
);
long
jrand48
(
unsigned
short
[
3
]);
void
srand48
(
long
);
unsigned
short
*
seed48
(
unsigned
short
[
3
]);
void
lcong48
(
unsigned
short
[
7
]);
void
*
malloc
(
size_t
);
void
*
calloc
(
size_t
,
size_t
);
void
*
realloc
(
void
*
,
size_t
);
void
free
(
void
*
);
void
*
valloc
(
size_t
);
int
posix_memalign
(
void
**
,
size_t
,
size_t
);
void
abort
(
void
);
int
atexit
(
void
(
*
)
(
void
));
void
exit
(
int
);
void
_Exit
(
int
);
char
*
getenv
(
const
char
*
);
int
putenv
(
char
*
);
int
setenv
(
const
char
*
,
const
char
*
,
int
);
int
unsetenv
(
const
char
*
);
char
*
mktemp
(
char
*
);
int
mkstemp
(
char
*
);
int
system
(
const
char
*
);
char
*
realpath
(
const
char
*
,
char
*
);
void
*
bsearch
(
const
void
*
,
const
void
*
,
size_t
,
size_t
,
int
(
*
)(
const
void
*
,
const
void
*
));
void
qsort
(
void
*
,
size_t
,
size_t
,
int
(
*
)(
const
void
*
,
const
void
*
));
...
...
@@ -89,14 +56,12 @@ long labs (long);
long
long
llabs
(
long
long
);
typedef
struct
{
int
quot
,
rem
;
}
div_t
;
extern
div_t
div
(
int
,
int
);
typedef
struct
{
long
quot
,
rem
;
}
ldiv_t
;
ldiv_t
ldiv
(
long
,
long
);
typedef
struct
{
long
long
quot
,
rem
;
}
lldiv_t
;
lldiv_t
lldiv
(
long
long
,
long
long
);
div_t
div
(
int
,
int
);
ldiv_t
ldiv
(
long
,
long
);
lldiv_t
lldiv
(
long
long
,
long
long
);
int
mblen
(
const
char
*
,
size_t
);
int
mbtowc
(
wchar_t
*
,
const
char
*
,
size_t
);
...
...
@@ -104,23 +69,63 @@ int wctomb (char *, wchar_t);
size_t
mbstowcs
(
wchar_t
*
,
const
char
*
,
size_t
);
size_t
wcstombs
(
char
*
,
const
wchar_t
*
,
size_t
);
#define MB_CUR_MAX 4
#define RAND_MAX (0x7fffffff)
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
#ifndef WEXITSTATUS
#include <bits/wexitstatus.h>
#endif
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
int
posix_memalign
(
void
**
,
size_t
,
size_t
);
int
setenv
(
const
char
*
,
const
char
*
,
int
);
int
unsetenv
(
const
char
*
);
int
mkstemp
(
char
*
);
char
*
mkdtemp
(
char
*
);
int
getsubopt
(
char
**
,
char
*
const
*
,
char
**
);
int
rand_r
(
unsigned
*
);
void
setkey
(
const
char
*
);
#endif
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
int
putenv
(
char
*
);
int
posix_openpt
(
int
);
int
grantpt
(
int
);
int
unlockpt
(
int
);
char
*
ptsname
(
int
);
char
*
realpath
(
const
char
*
,
char
*
);
char
*
l64a
(
long
);
long
a64l
(
const
char
*
);
void
setkey
(
const
char
*
);
long
int
random
(
void
);
void
srandom
(
unsigned
int
);
char
*
initstate
(
unsigned
int
,
char
*
,
size_t
);
char
*
setstate
(
char
*
);
double
drand48
(
void
);
double
erand48
(
unsigned
short
[
3
]);
long
int
lrand48
(
void
);
long
int
nrand48
(
unsigned
short
[
3
]);
long
mrand48
(
void
);
long
jrand48
(
unsigned
short
[
3
]);
void
srand48
(
long
);
unsigned
short
*
seed48
(
unsigned
short
[
3
]);
void
lcong48
(
unsigned
short
[
7
]);
#endif
#define MB_CUR_MAX 4
#define RAND_MAX (0x7fffffff)
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#if defined(_GNU_SOURCE)
char
*
mktemp
(
char
*
);
void
*
valloc
(
size_t
);
void
*
memalign
(
size_t
,
size_t
);
#endif
#include <bits/wexitstatus.h>
#ifdef __cplusplus
}
...
...
src/temp/mkdtemp.c
浏览文件 @
80695b1d
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
...
...
src/temp/mkstemp.c
浏览文件 @
80695b1d
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录