]> git.ipfire.org Git - thirdparty/glibc.git/blame - io/open64.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / io / open64.c
CommitLineData
04277e02 1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
478b92f0 2 This file is part of the GNU C Library.
28f540f4 3
478b92f0 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
28f540f4 8
478b92f0
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
28f540f4 17
28f540f4 18#include <errno.h>
dfd2257a
UD
19#include <fcntl.h>
20#include <stdarg.h>
28f540f4 21#include <stddef.h>
ddfd0535 22#include <stdio.h>
28f540f4 23
65f6f938 24/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
dfd2257a 25 a third argument is the file protection. */
28f540f4 26int
9d46370c 27__libc_open64 (const char *file, int oflag)
28f540f4 28{
dfd2257a
UD
29 int mode;
30
31 if (file == NULL)
28f540f4 32 {
c4029823 33 __set_errno (EINVAL);
28f540f4
RM
34 return -1;
35 }
36
65f6f938 37 if (__OPEN_NEEDS_MODE (oflag))
dfd2257a
UD
38 {
39 va_list arg;
40 va_start (arg, oflag);
41 mode = va_arg (arg, int);
42 va_end (arg);
43 }
44
c4029823 45 __set_errno (ENOSYS);
28f540f4
RM
46 return -1;
47}
778c59c8 48strong_alias (__libc_open64, __open64)
37ba7d66 49libc_hidden_def (__open64)
ddfd0535 50weak_alias (__libc_open64, open64)
28f540f4 51
dfd2257a 52stub_warning (open64)
ddfd0535 53
cc0e6ed8
RM
54/* __open64_2 is a generic wrapper that calls __open64.
55 So give a stub warning for that symbol too. */
ddfd0535 56stub_warning (__open64_2)