Commit graph

11226 commits

Author SHA1 Message Date
Elliott Hughes
826ea44822 Merge "Remove PAGE_SIZE call sites." 2023-06-13 20:36:45 +00:00
Zijun Zhao
0594346633 Merge "Fix iconv_open(3) docs." 2023-06-13 17:20:41 +00:00
Elliott Hughes
7a5d9925b7 Fix iconv_open(3) docs.
Strictly the _doc comment_ is correct, but the names of the parameters
are the wrong way round. (Although iconv_open() follows the usual C
tradition of "destination first", iconv() itself doesn't, so these
functions are inherently confused/confusing.)

Bug: https://github.com/android/ndk/issues/1895
Test: N/A
Change-Id: Iafc9bd630ece1d3c55986b04bb9a99c477716530
2023-06-13 07:38:02 -07:00
Peter Collingbourne
bb11ee6d9c Remove PAGE_SIZE call sites.
To enable experiments with non-4KiB page sizes, introduce
an inline page_size() function that will either return the runtime
page size (if PAGE_SIZE is not 4096) or a constant 4096 (elsewhere).
This should ensure that there are no changes to the generated code on
unaffected platforms.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_16k_phone-userdebug
      m -j32 installclean
      m -j32
Test: launch_cvd \
  -kernel_path /path/to/out/android14-5.15/dist/Image \
  -initramfs_path /path/to/out/android14-5.15/dist/initramfs.img \
  -userdata_format=ext4
Bug: 277272383
Bug: 230790254
Change-Id: Ic0ed98b67f7c6b845804b90a4e16649f2fc94028
2023-06-12 10:59:39 -07:00
Zijun Zhao
71a03774d5 Merge "Nullability check for string modules." 2023-06-12 16:57:00 +00:00
Elliott Hughes
197677cfd9 Merge "Remove __INTRODUCED_IN_ architecture macros." 2023-06-12 13:40:47 +00:00
Treehugger Robot
26add4eae0 Merge "Remove __RENAME_STAT64." 2023-06-10 01:20:11 +00:00
zijunzhao
6d23a08717 Nullability check for string modules.
Bugs: b/245972273
Test: adb shell
Change-Id: I13852702ae87c1ca14ec4f073b5f4b3d42926929
2023-06-10 00:08:50 +00:00
Elliott Hughes
421b0ac28c Remove __INTRODUCED_IN_ architecture macros.
No longer used.

Test: treehugger
Change-Id: I90c2565d80fb65ab9bf3100fb85c897c3ed0afc2
2023-06-09 23:34:17 +00:00
Elliott Hughes
f242ef6f98 Remove __RENAME_STAT64.
Now API level 21 is our lowest supported API level, __RENAME_STAT64 is
useless.

Test: treehugger
Change-Id: I708b2142b30dfcf6c74e1a14475da690a8c25f59
2023-06-09 15:59:23 -07:00
Treehugger Robot
31849368bb Merge "Nullability check for fcntl module." 2023-06-09 18:38:00 +00:00
Treehugger Robot
6a65763b12 Merge "Nullability check for stdlib module." 2023-06-09 18:37:32 +00:00
Elliott Hughes
87e170df01 Merge "Remove __RENAME_LDBL." 2023-06-09 13:38:40 +00:00
zijunzhao
725c96c005 Nullability check for fcntl module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8a60f54dfc0d3104f848cbb78d05aa0f96cd783a
2023-06-09 00:53:12 +00:00
zijunzhao
f40b4247e8 Nullability check for stdlib module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0033d720b9da633d62b0b047563004e084829388
2023-06-09 00:52:55 +00:00
zijunzhao
7890484cae Implement C23 scanf 'w' length modifiers
wN: Specifies that a following b, d, i, o, u, x, or X conversion specifier applies to an integer argument with a specific width where N is a positive decimal integer with no leading zeros (the argument will have been promoted according to the integer promotions, but its value shall be converted to the unpromoted type); or that a following n conversion specifier applies to a pointer to an integer type argument with a width of N bits. All minimum-width integer types (7.22.1.2) and exact-width integer types (7.22.1.1) defined in the header <stdint.h> shall be supported. Other supported values of N are implementation-defined.

Bug: b/271903607
Test: adb shell
Change-Id: I595fd2ac7bc40d9fb7f1935b39933a6cc068eeff
2023-06-08 21:41:26 +00:00
Elliott Hughes
81e8402db3 Merge "Implement rvv version mem* and str* for riscv64" 2023-06-08 20:17:01 +00:00
Treehugger Robot
cb5188d4c8 Merge "Nullability check for poll module." 2023-06-08 02:06:03 +00:00
zijunzhao
b40e600ba8 Nullability check for poll module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ia44d82bbc0382066ec420f2e7b676f16e1f6d90b
2023-06-07 23:57:12 +00:00
zijunzhao
a8d42a44bb Nullability check for threads_inlines module.
Bugs: b/245972273
Test: adb shell
Change-Id: I4ebf0598527857fc7bfbfc6ed07342af89de57b1
2023-06-07 23:03:46 +00:00
Elliott Hughes
ab2d3e1049 Remove __RENAME_LDBL.
Discussion of this during my recent minor cleanup convinced me that we
should just remove __RENAME_LDBL. There's no obvious benefit to being
able to build something for 32-bit if you can't build the same code for
64-bit, given that most new hardware (and entire verticals such as Auto)
are 64-bit-only, and the Play Store requires any app with 32-bit code to
also ship 64-bit code.

Test: treehugger
Change-Id: I1c5503b968ca66925d7bd125bd3630c41ec1bfd0
2023-06-07 17:20:53 +00:00
Treehugger Robot
063b6bfd65 Merge "Nullability check for stdatomic module." 2023-06-07 15:34:21 +00:00
Treehugger Robot
27713a5b02 Merge "Nullability check for termios_inlines module." 2023-06-07 00:10:39 +00:00
Treehugger Robot
4e22f30960 Merge "<math.h>: more use of __RENAME_LDBL." 2023-06-07 00:10:27 +00:00
zijunzhao
d909dffcca Nullability check for stdatomic module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8d20606555f88b535259a589517f4c60b65f6761
2023-06-07 00:10:26 +00:00
Treehugger Robot
79600ce16b Merge "<fenv.h>: documentation, and __INTRODUCED_IN removal." 2023-06-06 22:37:59 +00:00
Treehugger Robot
c5774b8945 Merge "Nullability check for unistd module." 2023-06-06 22:36:04 +00:00
Treehugger Robot
fa203f18cc Merge "<sched.h>: __INTRODUCED_IN_ removal." 2023-06-06 22:22:27 +00:00
zijunzhao
9e19785d76 Nullability check for termios_inlines module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0284efc272ed1c3352d4a72deb0760f697b1e877
2023-06-06 21:58:45 +00:00
zijunzhao
30cf6d09d5 Nullability check for unistd module.
Bugs: b/245972273
Test: adb shell
Change-Id: I958166bcea67399638c28d424b5976be29660232
2023-06-06 20:39:07 +00:00
Elliott Hughes
9cf6036048 <fenv.h>: documentation, and __INTRODUCED_IN removal.
Now the NDK doesn't support API levels below 21, we don't actually need
the different arm32 vs x86 annotations. In general we haven't been
removing this historical information because it might be interesting to
someone, and there's no real reason to remove it, but we've had
versioner bugs recently with these more complex cases.

Test: treehugger
Change-Id: I9460109a2648b9d05d7e21e397935293d3fea8eb
2023-06-06 20:32:12 +00:00
zijunzhao
acd090d585 Nullability check for stdio module.
Bugs: b/245972273
Test: adb shell
Change-Id: I3fe777e75f68b06b944830b96d091cf9d973e0db
2023-06-06 18:43:52 +00:00
Treehugger Robot
0428fc1a9c Merge "Nullability check for thread_properties module." 2023-06-06 00:18:33 +00:00
zijunzhao
70586d6a99 Nullability check for thread_properties module.
Bugs: b/245972273
Test: adb shell
Change-Id: I8f2c640d74d73576d81453973d63568472b2676e
2023-06-05 22:07:50 +00:00
Yun Hsiang
40a82d005c Implement rvv version mem* and str* for riscv64
Add vector version mem* and str* functions and only build them when the
vector extension is enabled.
The original implementation comes from
https://github.com/sifive/sifive-libc, which we agree to contribute to
the Android Open Source Project.

Test: mma

Change-Id: I11b671a5bc571d7c783a657f272f282df7d16c29
Signed-off-by: Yun Hsiang <yun.hsiang@sifive.com>
2023-05-31 09:32:42 +08:00
Treehugger Robot
32ce2d5c82 Merge "time.h: add doc comments." 2023-05-26 20:11:05 +00:00
Elliott Hughes
e17ebfd51a <math.h>: more use of __RENAME_LDBL.
Now the NDK doesn't support API levels below 21, we don't actually need
weird x86-specific annotations. In general we haven't been removing
this historical information because it might be interesting to someone,
and there's no real reason to remove it, but we've had versioner bugs
recently with these more complex cases.

Test: treehugger
Change-Id: Ia457bb338ecf55af8e319e411ec3bf48a03f3c03
2023-05-26 13:00:51 -07:00
Elliott Hughes
db36e0829b <sched.h>: __INTRODUCED_IN_ removal.
Now the NDK doesn't support API levels below 21, we don't actually need
the different arm32 vs x86 annotations. In general we haven't been
removing this historical information because it might be interesting to
someone, and there's no real reason to remove it, but we've had
versioner bugs recently with these more complex cases.

Test: treehugger
Change-Id: Id9c9b8ecc01d232becd5dd8741509c104a8b6e19
2023-05-26 12:58:14 -07:00
Elliott Hughes
d192dbecf0 time.h: add doc comments.
C23 adds timegm(), gmtime_r(), and localtime_r(). We should remove the
"non-standard" text for timegm(), and while I'm here, let's just
document everything in this file.

Test: treehugger
Change-Id: Ia44c1bd155c939f694f6f8138b9cb7503519522c
2023-05-26 09:13:41 -07:00
zijunzhao
c412f654c5 Nullability check for nameser module.
Bugs: b/245972273
Test: adb shell
Change-Id: I96a4616d1a758d0f04af5d7f0fb8a0206f068b6a
2023-05-25 21:47:11 +00:00
zijunzhao
bf627f4292 Nullability check for inet module.
Bugs: b/245972273
Test: adb shell
Change-Id: I5acb1910f25dc025e1c8924ebf8b6801503f5161
2023-05-24 22:02:49 +00:00
Elliott Hughes
525761fd7d static_assert is a keyword in C23.
Test: treehugger
Change-Id: I4eba529475b6255bef1af558f54c373aad8737d0
2023-05-24 08:48:42 -07:00
zijunzhao
969d6c129a Nullability check for shm module.
Bugs: b/245972273
Test: adb shell
Change-Id: I9bdd5727719311d063fa126fc286618e9d24a45b
2023-05-23 19:15:25 +00:00
Elliott Hughes
3285ae5a4d Merge "Fix the *return* types in the arm64 dynamic function dispatch." 2023-05-23 13:46:30 +00:00
Elliott Hughes
20f9d67327 Fix the *return* types in the arm64 dynamic function dispatch.
No actual effect on the code, but misleading and wrong. (The previous
change only fixed the argument types; I didn't notice that some of the
return types were wrong too.)

Test: treehugger
Change-Id: I1ee5c48e2652fd8cbf8178d5659e57f79e61898e
2023-05-22 19:28:33 +00:00
zijunzhao
9f6b4caa9e Nullability check for xattr module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0137c86f3fa7e17fb5fe284c7693315b2df1e2db
2023-05-22 18:31:16 +00:00
Elliott Hughes
01db121db5 Merge "Fix the types in the arm64 dynamic function dispatch." 2023-05-19 14:15:53 +00:00
Elliott Hughes
a1974064ae Fix the types in the arm64 dynamic function dispatch.
No actually effect on the code, but misleading and wrong.

Test: treehugger
Change-Id: I55405ac224b4dcc2ae515954aed179c1cde3c73c
2023-05-18 13:40:12 -07:00
zijunzhao
2572571786 Nullability check for mman module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ib5c4887d89581eaedcf4a3e128811a6a374a8d1b
2023-05-18 19:02:25 +00:00
Treehugger Robot
83f9b28792 Merge "Nullability check for system_properties module." 2023-05-18 18:38:17 +00:00