[40/58] Hide internal __gettextparse function [BZ #18822]

Message ID 20170901180029.9527-41-hjl.tools@gmail.com
State Committed
Commit 2c0cd8f81fee4d9dc8e34254f4f6ed56d5bb6f59
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 6 p.m. UTC
  Hide internal __gettextparse function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/plural-exp.h: New file.
	* intl/plural-exp.c: Include <plural-exp.h> instead of
	"plural-exp.h".
---
 include/plural-exp.h | 8 ++++++++
 intl/plural-exp.c    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 include/plural-exp.h
  

Comments

H.J. Lu Oct. 2, 2017, 12:30 a.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hide internal __gettextparse function to allow direct access within
> libc.so and libc.a without using GOT nor PLT.
>
> 	[BZ #18822]
> 	* include/plural-exp.h: New file.
> 	* intl/plural-exp.c: Include <plural-exp.h> instead of
> 	"plural-exp.h".

Tested with build-many-glibcs.py.  I am checking it in.
  

Patch

diff --git a/include/plural-exp.h b/include/plural-exp.h
new file mode 100644
index 0000000000..3b026f804d
--- /dev/null
+++ b/include/plural-exp.h
@@ -0,0 +1,8 @@ 
+#ifndef _PLURAL_EXP_H
+#include <intl/plural-exp.h>
+
+#ifndef _ISOMAC
+extern __typeof (__gettextparse) __gettextparse attribute_hidden;
+#endif /* !_ISOMAC */
+
+#endif
diff --git a/intl/plural-exp.c b/intl/plural-exp.c
index 8c15032631..f5249d5373 100644
--- a/intl/plural-exp.c
+++ b/intl/plural-exp.c
@@ -23,7 +23,7 @@ 
 #include <stdlib.h>
 #include <string.h>
 
-#include "plural-exp.h"
+#include <plural-exp.h>
 
 #if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) && \
      !defined __cplusplus)					       \