Lines Matching refs:flags

46 #define __open_modes_useful(flags) (((flags) & O_CREAT) || ((flags) & O_TMPFILE) == O_TMPFILE)
51 int open(const char* pathname, int flags, mode_t modes, ...) __overloadable
61 int open(const char* const __pass_object_size pathname, int flags)
63 __clang_error_if(__open_modes_useful(flags), "'open' " __open_too_few_args_error) {
64 return __open_2(pathname, flags);
68 int open(const char* const __pass_object_size pathname, int flags, mode_t modes)
70 __clang_warning_if(!__open_modes_useful(flags) && modes,
72 return __open_real(pathname, flags, modes);
76 int openat(int dirfd, const char* pathname, int flags, mode_t modes, ...)
81 int openat(int dirfd, const char* const __pass_object_size pathname, int flags)
83 __clang_error_if(__open_modes_useful(flags), "'openat' " __open_too_few_args_error) {
84 return __openat_2(dirfd, pathname, flags);
88 int openat(int dirfd, const char* const __pass_object_size pathname, int flags, mode_t modes)
90 __clang_warning_if(!__open_modes_useful(flags) && modes,
92 return __openat_real(dirfd, pathname, flags, modes);
102 int open(const char* pathname, int flags, ...) {
103 if (__builtin_constant_p(flags)) {
104 if (__open_modes_useful(flags) && __builtin_va_arg_pack_len() == 0) {
113 if ((__builtin_va_arg_pack_len() == 0) && !__builtin_constant_p(flags)) {
114 return __open_2(pathname, flags);
117 return __open_real(pathname, flags, __builtin_va_arg_pack());
121 int openat(int dirfd, const char* pathname, int flags, ...) {
122 if (__builtin_constant_p(flags)) {
123 if (__open_modes_useful(flags) && __builtin_va_arg_pack_len() == 0) {
132 if ((__builtin_va_arg_pack_len() == 0) && !__builtin_constant_p(flags)) {
133 return __openat_2(dirfd, pathname, flags);
136 return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack());