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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user