acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Acl-devel] [PATCH attr 2/8] build: Do not assume we have a config.h hea


From: Guillem Jover
Subject: [Acl-devel] [PATCH attr 2/8] build: Do not assume we have a config.h header around
Date: Sat, 20 Jul 2019 04:14:36 +0200

We are not installing it anyway, and to be able to use it we would need
a config.h generated during a configure step, which we do not provide.
Just remove the conditionals and assume everything required is present.

Signed-off-by: Guillem Jover <address@hidden>
---
 examples/Makefile   |  2 +-
 examples/copyattr.c | 15 ++-------------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/examples/Makefile b/examples/Makefile
index 8d6b5a3..05c7831 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -g -Wall -I../include
+CFLAGS = -g -Wall
 LDFLAGS = -lattr
 
 PROGS = copyattr
diff --git a/examples/copyattr.c b/examples/copyattr.c
index 0f6928e..f8acb73 100644
--- a/examples/copyattr.c
+++ b/examples/copyattr.c
@@ -23,8 +23,6 @@
  * 23 January 2003
  */
 
-#include "config.h"
-
 #include <sys/stat.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -33,12 +31,8 @@
 #include <stdarg.h>
 #include <locale.h>
 /* #include <libintl.h> */
-#ifdef HAVE_ATTR_ERROR_CONTEXT_H
-# include <attr/error_context.h>
-#endif
-#ifdef HAVE_ATTR_LIBATTR_H
-# include <attr/libattr.h>
-#endif
+#include <attr/error_context.h>
+#include <attr/libattr.h>
 
 /*
  * We don't fully internationalize this example!
@@ -113,7 +107,6 @@ main(int argc, char *argv[])
                exit(1);
        }
 
-#if defined(HAVE_ATTR_COPY_FILE)
        /*
         * If the third parameter is NULL, all extended attributes
         * except those that define Access Control Lists are copied.
@@ -127,10 +120,6 @@ main(int argc, char *argv[])
         * would print no error messages.
         */
        ret = attr_copy_file(argv[1], argv[2], is_user_attr, &ctx);
-#else
-       fprintf(stderr, _("No support for copying extended attributes\n"));
-       ret = -1;
-#endif
 
        if (ret != 0)
                return EXIT_FAILURE;
-- 
2.22.0.657.g960e92d24f




reply via email to

[Prev in Thread] Current Thread [Next in Thread]