Fix handling of extended header prefixes
[tar.git] / lib / attr-xattr.in.h
blob4fc27f8fc9bea15bc244d496d59d99a69ae78ea9
1 /* Replacement <attr/xattr.h> for platforms that lack it.
2 Copyright 2012-2021 Free Software Foundation, Inc.
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.
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.
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/>. */
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
24 /* setting */
25 static int setxattr (const char *path, const char *name, const void
26 *value, size_t size, int flags)
27 { errno = ENOTSUP; return -1; }
29 static int lsetxattr (const char *path, const char *name, const void
30 *value, size_t size, int flags)
31 { errno = ENOTSUP; return -1; }
33 static int fsetxattr (int filedes, const char *name, const void *value,
34 size_t size, int flags)
35 { errno = ENOTSUP; return -1; }
38 /* getting */
39 static ssize_t getxattr (const char *path, const char *name, void *value,
40 size_t size)
41 { errno = ENOTSUP; return -1; }
42 static ssize_t lgetxattr (const char *path, const char *name, void
43 *value, size_t size)
44 { errno = ENOTSUP; return -1; }
45 static ssize_t fgetxattr (int filedes, const char *name, void *value,
46 size_t size)
47 { errno = ENOTSUP; return -1; }
50 /* listing */
51 static ssize_t listxattr (const char *path, char *list, size_t size)
52 { errno = ENOTSUP; return -1; }
54 static ssize_t llistxattr (const char *path, char *list, size_t size)
55 { errno = ENOTSUP; return -1; }
57 static ssize_t flistxattr (int filedes, char *list, size_t size)
58 { errno = ENOTSUP; return -1; }
60 #endif