acl/0021-mark-libmisc-funcs-as-hidden-so-they-are-not-exporte.patch
2024-02-05 15:33:24 +08:00

65 lines
1.7 KiB
Diff

From 809584283a3ce5b0250656faefb23a821782adbe Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 12 Aug 2014 08:32:26 -0400
Subject: [PATCH 21/34] mark libmisc funcs as hidden so they are not exported
---
include/misc.h | 17 +++++++++++++----
libacl/libobj.h | 9 +--------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/include/misc.h b/include/misc.h
index a4fa70e..f5c0dae 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -18,14 +18,23 @@
#ifndef __MISC_H
#define __MISC_H
+#include "config.h"
+
#include <stdio.h>
-extern int high_water_alloc(void **buf, size_t *bufsize, size_t newsize);
+/* Mark library internal functions as hidden */
+#if defined(HAVE_VISIBILITY_ATTRIBUTE)
+# define hidden __attribute__((visibility("hidden")))
+#else
+# define hidden /* hidden */
+#endif
+
+hidden 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);
+hidden const char *quote(const char *str, const char *quote_chars);
+hidden char *unquote(char *str);
-extern char *next_line(FILE *file);
+hidden char *next_line(FILE *file);
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/libacl/libobj.h b/libacl/libobj.h
index 5480a0e..c41d5f9 100644
--- a/libacl/libobj.h
+++ b/libacl/libobj.h
@@ -20,14 +20,7 @@
#include <stdlib.h>
-#include "config.h"
-
-/* Mark library internal functions as hidden */
-#if defined(HAVE_VISIBILITY_ATTRIBUTE)
-# define hidden __attribute__((visibility("hidden")))
-#else
-# define hidden /* hidden */
-#endif
+#include "misc.h"
/* Ugly pointer manipulation */
--
2.5.2