This has a similar meaning as in other GNU applications such as coreutils and Emacs. * NEWS: Document it. * .gitignore: Remove redundant build-aux. Remove gnu, since gnu/Makefile.am is now in git. Add gnu/.gitignore, gnu/charset.alias, gnu/*.h, gnu/*/ to cover autogenerated files. * bootstrap.conf (gnulib_mk): Remove. * configure.ac: Add support for --enable-gcc-warnings, taken from coreutils and simplified. * gnu/Makefile.am: New file. Formerly this was autogenerated, but the autogenerated file has been renamed to gnulib.mk, its usual name when bootstrapping from gnulib. This way, AM_CFLAGS can incorporate warning options. * gnulib.modules: Add manywarnings. * lib/Makefile.am, src/Makefile.am (AM_CFLAGS): New macro, incorporating warning options. * lib/attr-xattr.in.h (ENOATTR): New macro, if not already defined. * src/buffer.c (magic): Don't rely on incomplete initializers. * src/common.h (report_difference): Add printf format attribute. * src/system.c (sys_exec_command, sys_exec_info_script) (sys_exec_checkpoint_script): * src/tar.c (update_argv): Add casts to char * to pacify GCC warnings about using string literals in a char * context. * src/xattrs.c, src/xattrs.h (xattrs_clear_setup): Declare parameters as (void), not (). * src/xheader.c (xheader_format_name): Initialize pptr to null, to pacify GCC. Remove unnecessary test of nptr versus null.
61 lines
2.2 KiB
C
61 lines
2.2 KiB
C
/* Replacement <attr/xattr.h> for platforms that lack it.
|
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef TAR_ATTR_XATTR_H
|
|
#define TAR_ATTR_XATTR_H
|
|
#include <errno.h>
|
|
#ifndef ENOATTR
|
|
# define ENOATTR ENODATA /* No such attribute */
|
|
#endif
|
|
|
|
/* setting */
|
|
static inline int setxattr (const char *path, const char *name, const void
|
|
*value, size_t size, int flags)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
static inline int lsetxattr (const char *path, const char *name, const void
|
|
*value, size_t size, int flags)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
static inline int fsetxattr (int filedes, const char *name, const void *value,
|
|
size_t size, int flags)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
|
|
/* getting */
|
|
static inline ssize_t getxattr (const char *path, const char *name, void *value,
|
|
size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
static inline ssize_t lgetxattr (const char *path, const char *name, void
|
|
*value, size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
static inline ssize_t fgetxattr (int filedes, const char *name, void *value,
|
|
size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
|
|
/* listing */
|
|
static inline ssize_t listxattr (const char *path, char *list, size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
static inline ssize_t llistxattr (const char *path, char *list, size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
static inline ssize_t flistxattr (int filedes, char *list, size_t size)
|
|
{ errno = ENOTSUP; return -1; }
|
|
|
|
#endif
|