Joseph Myers | f7a9f78 | 2016-01-04 16:05:18 | [diff] [blame] | 1 | /* Copyright (C) 1991-2016 Free Software Foundation, Inc. |
Ulrich Drepper | 478b92f | 1997-06-23 21:55:26 | [diff] [blame] | 2 | This file is part of the GNU C Library. |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 3 | |
Ulrich Drepper | 478b92f | 1997-06-23 21:55:26 | [diff] [blame] | 4 | The GNU C Library is free software; you can redistribute it and/or |
Andreas Jaeger | 41bdb6e | 2001-07-06 04:58:11 | [diff] [blame] | 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. |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 8 | |
Ulrich Drepper | 478b92f | 1997-06-23 21:55:26 | [diff] [blame] | 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 |
Andreas Jaeger | 41bdb6e | 2001-07-06 04:58:11 | [diff] [blame] | 12 | Lesser General Public License for more details. |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 13 | |
Andreas Jaeger | 41bdb6e | 2001-07-06 04:58:11 | [diff] [blame] | 14 | You should have received a copy of the GNU Lesser General Public |
Paul Eggert | 59ba27a | 2012-02-09 23:18:22 | [diff] [blame] | 15 | License along with the GNU C Library; if not, see |
| 16 | <http://www.gnu.org/licenses/>. */ |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 17 | |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 18 | #include <errno.h> |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 19 | #include <stddef.h> |
| 20 | #include <sys/stat.h> |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 21 | |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 22 | /* Change the flags of FILE to FLAGS. */ |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 23 | |
Samuel Thibault | 5d2556c | 2015-02-07 20:56:15 | [diff] [blame] | 24 | int chflags (const char *file, unsigned long int flags) __THROW; |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 25 | |
| 26 | int |
Joseph Myers | 9d46370 | 2015-10-16 20:21:49 | [diff] [blame] | 27 | chflags (const char *file, unsigned long int flags) |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 28 | { |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 29 | if (file == NULL) |
| 30 | { |
| 31 | __set_errno (EINVAL); |
| 32 | return -1; |
| 33 | } |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 34 | |
Ulrich Drepper | c402982 | 1996-09-27 03:45:24 | [diff] [blame] | 35 | __set_errno (ENOSYS); |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 36 | return -1; |
Roland McGrath | 28f540f | 1995-02-18 01:27:10 | [diff] [blame] | 37 | } |
| 38 | |
Ulrich Drepper | b6ab06c | 2005-12-14 08:43:25 | [diff] [blame] | 39 | stub_warning (chflags) |