Commit graph

1037 commits

Author SHA1 Message Date
liuhaitao
8637e2a550 Merge remote-tracking branch 'remotes/mirtos/dev-nuttx-10.1-20210927' into dev
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: If5a0166dbc7c9a595db9b7758cbacaf6af278d5d
2021-10-18 22:12:06 +08:00
anjiahao
b82c943d92 fix time_t overflow
VELAPLATFO-442

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: I93d2b9bb4e3e7c3a595a688becc3fa08b61b8c91
2021-10-18 11:39:45 +08:00
Xiang Xiao
1158068ade libc/vsprintf_internal: Call va_copy just like vsyslog
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I96cf364d9a6d438bcca4bf01f1a56c6cc172d19c
2021-10-11 12:04:38 +08:00
Xiang Xiao
7a017b5be0 lib/vasprintf: Shouldn't call va_end(ap) to avoid the double free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I20e10803e7923fbbd8b5fdccca1fdb4c9d090434
2021-10-11 12:04:38 +08:00
liuhaitao
999fe1f9f8 Merge remote-tracking branch 'mirtos/master' into dev
Last commit id:
commit 649f99ce30 (mirtos/master)
Author: FASTSHIFT <vifextech@foxmail.com>
Date:   Wed Sep 22 15:38:43 2021 +0800

    libc/misc: add lib_glob.

    Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I2f584a4432f835c661e3c02cf7324d5e92e9c738
2021-09-26 21:59:56 +08:00
FASTSHIFT
649f99ce30 libc/misc: add lib_glob.
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
2021-09-25 07:54:39 -03:00
FASTSHIFT
f3477a86d2 libc/string: add lib_strchrnul. 2021-09-22 09:20:06 -03:00
Abdelatif Guettouche
0aa4f07e93 libc/sched/sched_backtrace.c: Include unistd.h to avoid warning about
getpid function.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-21 09:22:28 -03:00
Juha Niskanen
17bfa18679 libc/unistd: getopt: add some NULL pointer checks
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-09-13 22:44:00 +08:00
Jiuzhu Dong
c68880c0d7 getaddrinfo: support AF_RPMSG
The hostname is as rp_cpu, the servname is as rp_name

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:57:44 +08:00
Jiuzhu Dong
352f636b38 getaddrinfo: support AF_LOCAL
the hostname is as sun_path.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:57:44 +08:00
Jiuzhu Dong
dfb4b6e3d8 lib_vsprintf: Add %pV format support
test case:
void test(const char *fmt, ...)
{
  struct va_format vaf;
  va_list ap;

  va_start(ap, fmt);
  vaf.fmt = fmt;
  vaf.va = &ap;
  printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
  va_end(ap);
}

int main(int argc, FAR char *argv[])
{
  char str[] = "Hello Boy and Girl!";
  int count = 10;

  test("%s %d", str, count);
  return 0;
}

>> test
func:test, Hello Boy and Girl! 10, line:49

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:46 +08:00
Jiuzhu Dong
2438403f23 libc/rexec/rexec_af: support remote execution
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:06 +08:00
Jiuzhu Dong
d8ea482b58 errno: use staic errno to replace tl_errno before tls initialization
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:48:31 +08:00
Jiuzhu Dong
34397094d7 lib_fread: return the number of bytes actually read when error occurs.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:36:03 +08:00
zhuyanlin
4d1affa210 uClibc++:remove typeinfo.cpp that confict with libsupc++
Typeinfo.cpp already defined in libsupc++

Change-Id: Ie61b95d8fa9da2034b57498de006dce8551c5ad5
2021-09-10 15:32:17 +08:00
Jiuzhu Dong
aa1c65a364 errno: use staic errno to replace tl_errno before tls initialization
Change-Id: I44a53b2f5cdb3f4e6c755e5663867cd74361bc7c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 21:18:32 +08:00
zhuyanlin
803599faeb uClibc++:remove typeinfo.cpp that confict with libsupc++
Typeinfo.cpp already defined in libsupc++
2021-09-09 16:38:30 +08:00
Jiuzhu Dong
06ef56386b getaddrinfo: support AF_RPMSG
The hostname is as rp_cpu, the servname is as rp_name

Change-Id: Icc2128f26192fe71e657dc6b65cec6f104d31aa2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
Jiuzhu Dong
a214fe03eb getaddrinfo: support AF_LOCAL
Change-Id: I1e6a5d3cb64acaeeecad49315ea5e5874bc9440e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
Jiuzhu Dong
3149af15b9 lib_fread: return the number of bytes when error occurs.
Change-Id: I12228f53cf928c9f29bf739e57a25bca120a9ec1
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-07 22:10:31 +08:00
zhuyanlin
a2d6632e7c uClibcxx: remove function that conflict with libsupc++
The New_/del_ function already contain in libsupc++.
2021-09-07 10:33:11 +08:00
Alin Jerpelea
a9bfe50fe1 author: Brennan Ashton: update licenses to Apache
Brennan Ashton has submitted the ICLA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
abf8a72ef0 LICENSE: add libs/libc/math/ to license file
Add Sun Microsystems license for libs/libc/math/__sin.c
and libs/libc/math/__cos.c

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
4e5a9b168a libs: libc: armv8-m: revert to original license
Revert to the BSD Arm lincese

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
zhuyanlin
2ff63388b3 uClibcxx: remove function that conflict with libsupc++
The New_/del_ function already contain in libsupc++.
2021-09-02 13:59:10 +08:00
zhuyanlin
ba44da9a32 Revert "libxx:uClibxx:add-weak-function-for-new-del-operations"
This reverts commit 40a110b4a8.
2021-09-02 13:59:10 +08:00
Neo Xu
5941532fb5 libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2021-09-01 14:35:24 -03:00
Gustavo Henrique Nihei
c260fee516 libs/libxx: Enforce RTTI for building libcxxabi
It is okay for the application to be built without RTTI (-fno-rrti), but
libcxxabi requires RTTI at least for the library.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-01 21:02:17 +08:00
Xiang Xiao
90c839abbb libxx: Move the partial c++ abi implementation to libcxxmini sub folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2bc9b8be2962451a44352ab90623c9481bd162b2
2021-09-01 18:03:06 +08:00
zhuyanlin
cf2d061be3 libxx: use libxxabi, uClibxx in local code
N/A

Change-Id: I8322f89eb3afb2e404eb2d0164f578785870a3d3
2021-09-01 11:30:28 +08:00
Xu Xingliang
e42c3ea8a8 libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: Ic88876b254e29ac6156f8b2b15c5321af62f4e24
2021-08-31 18:18:02 +08:00
Xiang Xiao
c8b93ed45e libxx: Move the partial c++ abi implementation to libcxxmini sub folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2bc9b8be2962451a44352ab90623c9481bd162b2
2021-08-31 06:52:10 -03:00
zhuyanlin
af3d84cb19 libc:machine: add atomic_load/store/exchange API
Add atomic_load/store/exchange API

Change-Id: I6196b077d1e76cd1e0506ee66e2885e541525eb1
2021-08-31 14:16:34 +08:00
Xiang Xiao
a901ab35ad libxx: Remove the unused libxx_stdthrow.cxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-31 11:39:21 +08:00
Xiang Xiao
19e5ba9ef4 libxx: Move libcxxabi special setting from libcxx.defs to libcxxabi.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-31 11:39:12 +08:00
Xiang Xiao
7768b66bf4 libxx: Give VERSION make variable prefix to avoid the conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icca26524e3154300ed863650db24f88a9a8e295a
2021-08-31 11:39:01 +08:00
Abdelatif Guettouche
eb621457d0 libs/libxx/uClibc++.defs: Download the correct file type.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-31 11:37:30 +08:00
zhuyanlin
40a110b4a8 libxx:uClibxx:add-weak-function-for-new-del-operations
Add-weak-function-for-new-del-operations

Change-Id: Ie44528529e457d714a581881e247c41f01f2231b
2021-08-31 11:23:29 +08:00
zhuyanlin
8940d85668 libxx:uClibcxx:fix-GCC-specific-definitiion error
Use __GNUC__ instead of __GCC__

Change-Id: I285bd099cf973a89e21c5c7825250d1840615f36
2021-08-31 11:23:29 +08:00
Jiuzhu Dong
4743c089d0 libc/rexec: support remote execution
Change-Id: I0f61326081f87d9bdf7234088f352328b8828adb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 10:19:09 +08:00
Xiang Xiao
d6c3381ef1 libxx: Remove the unused libxx_stdthrow.cxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 15:57:22 -03:00
Xiang Xiao
ce73f9cbfc libxx: Move libcxxabi special setting from libcxx.defs to libcxxabi.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 10:44:24 +02:00
Xiang Xiao
397d329966 libxx: Give VERSION make variable prefix to avoid the conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 10:44:24 +02:00
zhuyanlin
e01e5f5008 libc:machine: add atomic_load/store/exchange API
Add atomic_load/store/exchange API

Change-Id: I6196b077d1e76cd1e0506ee66e2885e541525eb1
2021-08-30 11:10:11 +08:00
Xiang Xiao
ab5d2adbca libxx: Change CXX_LIBSUPCXX to LIBSUPCXX
align with other Kconfig(e.g. LIBCXXABI, LIBCXX, UCLIBCXX)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-29 21:32:01 +08:00
Xiang Xiao
165c4fc5ef libxx: Disable CXX_EXCEPTION by default to save the code space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1b1fafa95f0e385a615dba78f43858b797c5ce69
2021-08-29 21:31:46 +08:00
Xiang Xiao
39cafc1612 libcxx: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie91c28596f1504326e8dfbb4a79d276b712db5bc
2021-08-29 21:31:14 +08:00
Xiang Xiao
b4f597bed4 libcxxabi: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-29 21:30:16 +08:00
Abdelatif Guettouche
6af1bd5666 libs/libxx: Download C++ libraries during context.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-29 21:29:20 +08:00