re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / lib / attr-xattr.in.h
1 /* Replacement <attr/xattr.h> for platforms that lack it.
2    Copyright 2012-2014, 2016 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3 of the License, or
7    (at your option) any later version.
8
9    This program 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
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
16
17 #ifndef TAR_ATTR_XATTR_H
18 #define TAR_ATTR_XATTR_H
19 #include <errno.h>
20 #ifndef ENOATTR
21 # define ENOATTR ENODATA        /* No such attribute */
22 #endif
23
24 /* setting */
25 static inline int setxattr (const char *path, const char *name, const void
26                             *value, size_t size, int flags)
27 { errno = ENOTSUP; return -1; }
28
29 static inline int lsetxattr (const char *path, const char *name, const void
30                              *value, size_t size, int flags)
31 { errno = ENOTSUP; return -1; }
32
33 static inline int fsetxattr (int filedes, const char *name, const void *value,
34                              size_t size, int flags)
35 { errno = ENOTSUP; return -1; }
36
37
38 /* getting */
39 static inline ssize_t getxattr (const char *path, const char *name, void *value,
40                                 size_t size)
41 { errno = ENOTSUP; return -1; }
42 static inline ssize_t lgetxattr (const char *path, const char *name, void
43                                  *value, size_t size)
44 { errno = ENOTSUP; return -1; }
45 static inline ssize_t fgetxattr (int filedes, const char *name, void *value,
46                                  size_t size)
47 { errno = ENOTSUP; return -1; }
48
49
50 /* listing */
51 static inline ssize_t listxattr (const char *path, char *list, size_t size)
52 { errno = ENOTSUP; return -1; }
53
54 static inline ssize_t llistxattr (const char *path, char *list, size_t size)
55 { errno = ENOTSUP; return -1; }
56
57 static inline ssize_t flistxattr (int filedes, char *list, size_t size)
58 { errno = ENOTSUP; return -1; }
59
60 #endif