aboutsummaryrefslogtreecommitdiffstats
path: root/libc/include/fcntl.h
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-06-18 10:46:02 -0700
committerNick Kralevich <nnk@google.com>2013-06-18 12:13:52 -0700
commitb24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5 (patch)
tree918218d294c845db4b5fda6f9fb9a211a443bb54 /libc/include/fcntl.h
parent977a33137d2be0093f474055f839cf665b82b588 (diff)
downloadandroid_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.tar.gz
android_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.tar.bz2
android_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.zip
libc: Introduce __errordecl()
Define __errordecl and replace __attribute__((__error__("foo"))) with __errordecl. Make sure __errordecl is a no-op on clang, as it generates a compile time warning. Change-Id: Ifa1a2d3afd6881de9d479fc2adac6737871a2949
Diffstat (limited to 'libc/include/fcntl.h')
-rw-r--r--libc/include/fcntl.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index de2e3e354..67fd59712 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -50,11 +50,8 @@ extern int fcntl(int fd, int command, ...);
extern int creat(const char* path, mode_t mode);
#if defined(__BIONIC_FORTIFY)
-
-extern void __creat_error()
- __attribute__((__error__ ("called with O_CREAT, but missing mode")));
-extern void __too_many_args_error()
- __attribute__((__error__ ("too many arguments")));
+__errordecl(__creat_error, "called with O_CREAT, but missing mode");
+__errordecl(__too_many_args_error, "too many arguments");
extern int __open_real(const char *pathname, int flags, ...)
__asm__(__USER_LABEL_PREFIX__ "open");
extern int __open_2(const char *, int);