Tag unavailable functions with macro.

Add an __UNAVAILABLE macro, and use it for several functions which lack
implementations, but need to have visible declarations to be reexported
in the C++ standard library.

Bug: http://b/28178111
Change-Id: Ia4ae0207bbfcb7baa61821f0ef946257b019c0db
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 2bd058e..b0e7b76 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -454,11 +454,13 @@
 #define __INTRODUCED_IN(api_level) __AVAILABILITY(introduced=api_level)
 #define __DEPRECATED_IN(api_level) __AVAILABILITY(deprecated=api_level)
 #define __REMOVED_IN(api_level) __AVAILABILITY(obsoleted=api_level)
+#define __UNAVAILABLE __attribute__((unavailable))
 #else
 #define __AVAILABILITY(...)
 #define __INTRODUCED_IN(api_level)
 #define __DEPRECATED_IN(api_level)
 #define __REMOVED_IN(api_level)
+#define __UNAVAILABLE __attribute__((__error__("unavailable")))
 #endif // __clang__
 
 #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5