Marcus Meissner
5439477a49
- Update to git snapshot dated 21 Sep 2015. - Added: * 0001-Install-the-libraries-to-the-appropriate-directory.patch * 0002-setfacl.1-fix-typo-inclu-de-include.patch * 0003-test-fix-insufficient-quoting-of.patch * 0004-Makefile-rename-configure.in-to-configure.ac.patch * 0005-Bad-markup-in-acl.5-page.patch * 0006-.gitignore-ignore-and-config.h.in.patch * 0007-Use-autoreconf-rather-than-autoconf-to-regenerate-th.patch * 0008-libacl-Make-sure-that-acl_from_text-always-sets-errn.patch * 0009-libacl-fix-SIGSEGV-of-getfacl-e-on-overly-long-group.patch * 0010-punt-debian-rpm-packaging-logic.patch * 0011-move-gettext-logic-into-misc.h.patch * 0012-test-make-running-parallel-out-of-tree-safe.patch * 0013-modernize-build-system.patch * 0014-po-regenerate-files-after-move.patch * 0015-build-drop-aclincludedir-use-pkgincludedir.patch * 0016-build-make-use-of-an-aux-dir-to-stow-away-helper-scr.patch * 0017-build-ship-a-pkgconfig-file-for-libacl.patch * 0018-read_acl_-comments-seq-rename-line-to-lineno.patch * 0019-read_acl_-comments-seq-switch-to-next_line.patch * 0020-telldir-return-value-and-seekdir-second-parameters-a.patch * 0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch * 0022-add-__acl_-prefixes-to-internal-symbols.patch * 0023-cp.test-Check-permissions-of-the-right-file.patch * 0024-libacl-acl_set_file-Remove-unnecesary-racy-check.patch * 0025-fix-compilation-with-latest-xattr-git.patch * 0026-getfacl-Fix-memory-leak.patch * 0027-Fix-the-display-block-nesting-in-acl.5.patch * 0028-setfacl-man-page-Minor-wording-improvements.patch OBS-URL: https://build.opensuse.org/request/show/347209 OBS-URL: https://build.opensuse.org/package/show/Base:System/acl?expand=0&rev=43
181 lines
4.2 KiB
Diff
181 lines
4.2 KiB
Diff
From 602dbcb26e9591922ca94f5b326694a2309fff18 Mon Sep 17 00:00:00 2001
|
|
From: Mike Frysinger <vapier@gentoo.org>
|
|
Date: Fri, 10 Jan 2014 10:07:39 -0500
|
|
Subject: [PATCH 11/34] move gettext logic into misc.h
|
|
|
|
This lets us autogenerate config.h using autoheader rather than
|
|
hand maintain it.
|
|
---
|
|
chacl/chacl.c | 4 ++--
|
|
getfacl/getfacl.c | 5 ++---
|
|
include/config.h.in | 10 ----------
|
|
include/misc.h | 17 +++++++++++++++++
|
|
libacl/perm_copy.h | 2 ++
|
|
setfacl/do_set.c | 3 ++-
|
|
setfacl/setfacl.c | 5 ++---
|
|
7 files changed, 27 insertions(+), 19 deletions(-)
|
|
|
|
diff --git a/chacl/chacl.c b/chacl/chacl.c
|
|
index 854a620..525a7ff 100644
|
|
--- a/chacl/chacl.c
|
|
+++ b/chacl/chacl.c
|
|
@@ -17,6 +17,7 @@
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
+#include "config.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
@@ -29,8 +30,7 @@
|
|
#include <sys/stat.h>
|
|
#include <sys/acl.h>
|
|
#include <acl/libacl.h>
|
|
-#include <locale.h>
|
|
-#include "config.h"
|
|
+#include "misc.h"
|
|
|
|
static int acl_delete_file (const char * path, acl_type_t type);
|
|
static int list_acl(char *file);
|
|
diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
|
|
index f8eaf25..22cc1c7 100644
|
|
--- a/getfacl/getfacl.c
|
|
+++ b/getfacl/getfacl.c
|
|
@@ -21,6 +21,7 @@
|
|
USA.
|
|
*/
|
|
|
|
+#include "config.h"
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <sys/acl.h>
|
|
@@ -34,11 +35,9 @@
|
|
#include <dirent.h>
|
|
#include <libgen.h>
|
|
#include <getopt.h>
|
|
-#include <locale.h>
|
|
-#include "config.h"
|
|
+#include "misc.h"
|
|
#include "user_group.h"
|
|
#include "walk_tree.h"
|
|
-#include "misc.h"
|
|
|
|
#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT"
|
|
|
|
diff --git a/include/config.h.in b/include/config.h.in
|
|
index 6787b6e..6a720ac 100644
|
|
--- a/include/config.h.in
|
|
+++ b/include/config.h.in
|
|
@@ -39,16 +39,6 @@
|
|
/* Define if you want gettext (I18N) support */
|
|
#undef ENABLE_GETTEXT
|
|
|
|
-#ifdef ENABLE_GETTEXT
|
|
-# include <libintl.h>
|
|
-# define _(x) gettext(x)
|
|
-#else
|
|
-# define _(x) (x)
|
|
-# define textdomain(d) do { } while (0)
|
|
-# define bindtextdomain(d,dir) do { } while (0)
|
|
-#endif
|
|
-#include <locale.h>
|
|
-
|
|
/* On GNU/kFreeBSD, ENODATA is not defined in the system headers */
|
|
#include <errno.h>
|
|
#ifndef ENODATA
|
|
diff --git a/include/misc.h b/include/misc.h
|
|
index 0c5fdcc..a4fa70e 100644
|
|
--- a/include/misc.h
|
|
+++ b/include/misc.h
|
|
@@ -15,9 +15,26 @@
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
+#ifndef __MISC_H
|
|
+#define __MISC_H
|
|
+
|
|
+#include <stdio.h>
|
|
+
|
|
extern int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
|
|
|
|
extern const char *quote(const char *str, const char *quote_chars);
|
|
extern char *unquote(char *str);
|
|
|
|
extern char *next_line(FILE *file);
|
|
+
|
|
+#ifdef ENABLE_NLS
|
|
+# include <libintl.h>
|
|
+# define _(x) gettext(x)
|
|
+#else
|
|
+# define _(x) (x)
|
|
+# define textdomain(d) do { } while (0)
|
|
+# define bindtextdomain(d,dir) do { } while (0)
|
|
+#endif
|
|
+#include <locale.h>
|
|
+
|
|
+#endif
|
|
diff --git a/libacl/perm_copy.h b/libacl/perm_copy.h
|
|
index 87b1566..350ae6a 100644
|
|
--- a/libacl/perm_copy.h
|
|
+++ b/libacl/perm_copy.h
|
|
@@ -35,3 +35,5 @@
|
|
#define HAVE_ACL_GET_TAG_TYPE 1
|
|
#define HAVE_ACL_SET_FD 1
|
|
#define HAVE_ACL_SET_FILE 1
|
|
+
|
|
+#include "misc.h"
|
|
diff --git a/setfacl/do_set.c b/setfacl/do_set.c
|
|
index 3e7e982..60da837 100644
|
|
--- a/setfacl/do_set.c
|
|
+++ b/setfacl/do_set.c
|
|
@@ -20,6 +20,7 @@
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "config.h"
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <sys/acl.h>
|
|
@@ -33,10 +34,10 @@
|
|
#include <unistd.h>
|
|
#include <dirent.h>
|
|
#include <ftw.h>
|
|
+#include "misc.h"
|
|
#include "sequence.h"
|
|
#include "do_set.h"
|
|
#include "parse.h"
|
|
-#include "config.h"
|
|
#include "walk_tree.h"
|
|
|
|
|
|
diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
|
|
index 81062a6..f6135b7 100644
|
|
--- a/setfacl/setfacl.c
|
|
+++ b/setfacl/setfacl.c
|
|
@@ -20,6 +20,7 @@
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "config.h"
|
|
#include <limits.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
@@ -29,13 +30,11 @@
|
|
#include <dirent.h>
|
|
#include <libgen.h>
|
|
#include <getopt.h>
|
|
-#include <locale.h>
|
|
-#include "config.h"
|
|
+#include "misc.h"
|
|
#include "sequence.h"
|
|
#include "parse.h"
|
|
#include "do_set.h"
|
|
#include "walk_tree.h"
|
|
-#include "misc.h"
|
|
|
|
#define POSIXLY_CORRECT_STR "POSIXLY_CORRECT"
|
|
|
|
--
|
|
2.5.2
|
|
|