Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
08c1af37
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看板
提交
08c1af37
编写于
6月 28, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
!46 添加ntohs相关接口实现,同时创建BUILD.gn构建脚本
Merge pull request !46 from Caoruihong/liteos_m_build_gn
上级
66ba9b70
9ea63d56
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
212 addition
and
1 deletion
+212
-1
porting/liteos_m/kernel/BUILD.gn
porting/liteos_m/kernel/BUILD.gn
+167
-0
porting/liteos_m/kernel/src/network/htonl.c
porting/liteos_m/kernel/src/network/htonl.c
+8
-0
porting/liteos_m/kernel/src/network/htons.c
porting/liteos_m/kernel/src/network/htons.c
+8
-0
porting/liteos_m/kernel/src/network/ntohl.c
porting/liteos_m/kernel/src/network/ntohl.c
+8
-0
porting/liteos_m/kernel/src/network/ntohs.c
porting/liteos_m/kernel/src/network/ntohs.c
+8
-0
porting/liteos_m/kernel/src/stdio/fclose.c
porting/liteos_m/kernel/src/stdio/fclose.c
+7
-1
porting/liteos_m/kernel/src/stdio/fflush.c
porting/liteos_m/kernel/src/stdio/fflush.c
+6
-0
未找到文件。
porting/liteos_m/kernel/BUILD.gn
0 → 100644
浏览文件 @
08c1af37
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
libc = "musl-c"
libm = "musl-m"
config("include") {
include_dirs = [
"include",
]
}
static_library(libc) {
sources = [
#"src/errno/strerror.c",
"src/internal/shgetc.c",
"src/internal/intscan.c",
"src/stdlib/atoi.c",
#"src/stdlib/strtol.c",
"src/stdlib/atol.c",
"src/stdlib/atoll.c",
"src/stdlib/abs.c",
"src/network/h_errno.c",
"src/network/htonl.c",
"src/network/htons.c",
"src/network/ntohl.c",
"src/network/ntohs.c",
"src/exit/abort.c",
"src/exit/assert.c",
"src/ctype/isascii.c",
"src/ctype/isxdigit.c",
"src/ctype/isdigit.c",
"src/ctype/isupper.c",
"src/ctype/isspace.c",
"src/ctype/isalnum.c",
"src/ctype/islower.c",
"src/ctype/tolower.c",
"src/ctype/toupper.c",
"src/ctype/isprint.c",
"src/misc/dirname.c",
"src/locale/__lctrans.c",
"src/locale/langinfo.c",
"src/locale/c_locale.c",
"src/stdio/fputs.c",
"src/stdio/__stdio_close.c",
"src/stdio/fflush.c",
"src/stdio/__toread.c",
"src/stdio/ofl_add.c",
"src/stdio/__stdio_seek.c",
"src/stdio/__uflow.c",
"src/stdio/ftell.c",
"src/stdio/__stdio_read.c",
"src/stdio/fwrite.c",
"src/stdio/fread.c",
"src/stdio/fclose.c",
"src/stdio/stderr.c",
"src/stdio/fileno.c",
"src/stdio/perror.c",
"src/stdio/__lockfile.c",
"src/stdio/fgets.c",
"src/stdio/clearerr.c",
"src/stdio/__stdio_write.c",
"src/stdio/__fmodeflags.c",
"src/stdio/__fdopen.c",
"src/stdio/ofl.c",
"src/stdio/fseek.c",
"src/stdio/__stdout_write.c",
"src/stdio/rewind.c",
"src/stdio/__towrite.c",
"src/stdio/feof.c",
"src/stdio/fopen.c",
"src/stdio/stdout.c",
"src/time/strptime.c",
"src/time/strftime.c",
"src/time/__year_to_secs.c",
"src/time/__month_to_secs.c",
"src/time/__tz.c",
"src/time/__tm_to_secs.c",
"src/prng/random.c",
"src/regex/regexec.c",
"src/regex/regcomp.c",
"src/regex/tre-mem.c",
"src/string/strrchr.c",
"src/string/memcmp.c",
"src/string/strcspn.c",
"src/string/strstr.c",
"src/string/strchrnul.c",
"src/string/strchr.c",
"src/string/memcpy.c",
"src/string/strncmp.c",
"src/string/strcasecmp.c",
"src/string/strcmp.c",
"src/string/strncasecmp.c",
"src/string/memchr.c",
"src/string/memrchr.c",
"src/string/strdup.c",
"src/string/wcslen.c",
"src/string/memset.c",
"src/string/strlen.c",
"src/string/wcschr.c",
]
include_dirs = [
"src/include",
"src/internal",
]
include_dirs += [
"//kernel/liteos_m/kernel/arch/include",
"//kernel/liteos_m/kernel/include",
"//kernel/liteos_m/utils",
]
public_configs = [ ":include" ]
}
static_library(libm) {
sources = [
"src/math/pow.c",
"src/math/log.c",
"src/math/sqrt.c",
"src/math/pow_data.c",
"src/math/log_data.c",
"src/math/exp_data.c",
"src/math/round.c",
]
include_dirs = [
"src/include",
"src/internal",
]
public_configs = [ ":include" ]
}
group("kernel") {
public_deps = [
":$libc",
":$libm",
]
}
porting/liteos_m/kernel/src/network/htonl.c
0 → 100644
浏览文件 @
08c1af37
#include <netinet/in.h>
#include <byteswap.h>
uint32_t
htonl
(
uint32_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_32
(
n
)
:
n
;
}
porting/liteos_m/kernel/src/network/htons.c
0 → 100644
浏览文件 @
08c1af37
#include <netinet/in.h>
#include <byteswap.h>
uint16_t
htons
(
uint16_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_16
(
n
)
:
n
;
}
porting/liteos_m/kernel/src/network/ntohl.c
0 → 100644
浏览文件 @
08c1af37
#include <netinet/in.h>
#include <byteswap.h>
uint32_t
ntohl
(
uint32_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_32
(
n
)
:
n
;
}
porting/liteos_m/kernel/src/network/ntohs.c
0 → 100644
浏览文件 @
08c1af37
#include <netinet/in.h>
#include <byteswap.h>
uint16_t
ntohs
(
uint16_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_16
(
n
)
:
n
;
}
porting/liteos_m/kernel/src/stdio/fclose.c
浏览文件 @
08c1af37
...
...
@@ -34,4 +34,10 @@ int __fclose(FILE *f)
return
r
;
}
weak_alias
(
__fclose
,
fclose
);
\ No newline at end of file
weak_alias
(
__fclose
,
fclose
);
int
__wrap_fclose
(
FILE
*
f
)
{
return
__fclose
(
f
);
}
porting/liteos_m/kernel/src/stdio/fflush.c
浏览文件 @
08c1af37
...
...
@@ -46,3 +46,9 @@ int __fflush(FILE *f)
weak_alias
(
fflush
,
fflush_unlocked
);
weak_alias
(
__fflush
,
fflush
);
int
__wrap_fflush
(
FILE
*
f
)
{
return
__fflush
(
f
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录