Merge "Nullability check for stdatomic module."
diff --git a/libc/include/bits/termios_inlines.h b/libc/include/bits/termios_inlines.h
index 5f7cc42..a884b59 100644
--- a/libc/include/bits/termios_inlines.h
+++ b/libc/include/bits/termios_inlines.h
@@ -45,19 +45,19 @@
 // Supporting separate input and output speeds would require an ABI
 // change for `struct termios`.
 
-static __inline speed_t cfgetspeed(const struct termios* s) {
+static __inline speed_t cfgetspeed(const struct termios* _Nonnull s) {
   return __BIONIC_CAST(static_cast, speed_t, s->c_cflag & CBAUD);
 }
 
-__BIONIC_TERMIOS_INLINE speed_t cfgetispeed(const struct termios* s) {
+__BIONIC_TERMIOS_INLINE speed_t cfgetispeed(const struct termios* _Nonnull s) {
   return cfgetspeed(s);
 }
 
-__BIONIC_TERMIOS_INLINE speed_t cfgetospeed(const struct termios* s) {
+__BIONIC_TERMIOS_INLINE speed_t cfgetospeed(const struct termios* _Nonnull s) {
   return cfgetspeed(s);
 }
 
-__BIONIC_TERMIOS_INLINE void cfmakeraw(struct termios* s) {
+__BIONIC_TERMIOS_INLINE void cfmakeraw(struct termios* _Nonnull s) {
   s->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
   s->c_oflag &= ~OPOST;
   s->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
@@ -67,7 +67,7 @@
   s->c_cc[VTIME] = 0;
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetspeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetspeed(struct termios* _Nonnull s, speed_t speed) {
   // CBAUD is 0x100f, and every matching bit pattern has a Bxxx constant.
   if ((speed & ~CBAUD) != 0) {
     errno = EINVAL;
@@ -77,11 +77,11 @@
   return 0;
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetispeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetispeed(struct termios* _Nonnull s, speed_t speed) {
   return cfsetspeed(s, speed);
 }
 
-__BIONIC_TERMIOS_INLINE int cfsetospeed(struct termios* s, speed_t speed) {
+__BIONIC_TERMIOS_INLINE int cfsetospeed(struct termios* _Nonnull s, speed_t speed) {
   return cfsetspeed(s, speed);
 }
 
@@ -99,7 +99,7 @@
   return ioctl(fd, TCFLSH, __BIONIC_CAST(static_cast, unsigned long, queue));
 }
 
-__BIONIC_TERMIOS_INLINE int tcgetattr(int fd, struct termios* s) {
+__BIONIC_TERMIOS_INLINE int tcgetattr(int fd, struct termios* _Nonnull s) {
   return ioctl(fd, TCGETS, s);
 }
 
@@ -112,7 +112,7 @@
   return ioctl(fd, TCSBRKP, __BIONIC_CAST(static_cast, unsigned long, duration));
 }
 
-__BIONIC_TERMIOS_INLINE int tcsetattr(int fd, int optional_actions, const struct termios* s) {
+__BIONIC_TERMIOS_INLINE int tcsetattr(int fd, int optional_actions, const struct termios* _Nonnull s) {
   int cmd;
   switch (optional_actions) {
     case TCSANOW: cmd = TCSETS; break;
diff --git a/libc/include/math.h b/libc/include/math.h
index a5fa7c3..d3b4a33 100644
--- a/libc/include/math.h
+++ b/libc/include/math.h
@@ -177,10 +177,9 @@
 float scalbnf(float __x, int __exponent);
 long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
 
-/* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+double scalbln(double __x, long __exponent);
+float scalblnf(float __x, long __exponent);
+long double scalblnl(long double __x, long __exponent) __RENAME_LDBL(scalbln, 9, 18);
 
 double cbrt(double __x);
 float cbrtf(float __x);
@@ -282,7 +281,7 @@
 float nextafterf(float __x, float __y);
 long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
+double nexttoward(double __x, long double __y);
 float nexttowardf(float __x, long double __y);
 long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);