Rename __pure, __pure2, and __purefunc.
These names were pretty misleading (aka "backwards"), so switch to the
same obvious names glibc uses.
Test: build.
Change-Id: Ia98c9dbbccd0820386116562347654e84669034a
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 3b058e8..63e782e 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -102,13 +102,12 @@
#endif /* !(__STDC__ || __cplusplus) */
#define __always_inline __attribute__((__always_inline__))
+#define __attribute_const__ __attribute__((__const__))
+#define __attribute_pure__ __attribute__((__pure__))
#define __dead __attribute__((__noreturn__))
#define __noreturn __attribute__((__noreturn__))
-#define __mallocfunc __attribute__((malloc))
+#define __mallocfunc __attribute__((__malloc__))
#define __packed __attribute__((__packed__))
-#define __pure __attribute__((__const__))
-#define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */
-#define __purefunc __attribute__((pure))
#define __unused __attribute__((__unused__))
#define __used __attribute__((__used__))
diff --git a/libc/include/sys/endian.h b/libc/include/sys/endian.h
index b9e4758..de172fe 100644
--- a/libc/include/sys/endian.h
+++ b/libc/include/sys/endian.h
@@ -49,10 +49,10 @@
/* glibc compatibility. */
__BEGIN_DECLS
-uint32_t htonl(uint32_t) __pure2 __INTRODUCED_IN(21);
-uint16_t htons(uint16_t) __pure2 __INTRODUCED_IN(21);
-uint32_t ntohl(uint32_t) __pure2 __INTRODUCED_IN(21);
-uint16_t ntohs(uint16_t) __pure2 __INTRODUCED_IN(21);
+uint32_t htonl(uint32_t) __attribute_const__ __INTRODUCED_IN(21);
+uint16_t htons(uint16_t) __attribute_const__ __INTRODUCED_IN(21);
+uint32_t ntohl(uint32_t) __attribute_const__ __INTRODUCED_IN(21);
+uint16_t ntohs(uint16_t) __attribute_const__ __INTRODUCED_IN(21);
__END_DECLS
#define htonl(x) __swap32(x)