diff options
| author | Carl Worth <cworth@cworth.org> | 2010-11-01 22:01:15 -0700 |
|---|---|---|
| committer | Carl Worth <cworth@cworth.org> | 2010-11-01 22:35:48 -0700 |
| commit | c81cecf620d506653a1ead83858b8b3fc240abb5 (patch) | |
| tree | f69fd387af5c9c28637f6f4f2fa0253df0be9571 /lib/xutil.h | |
| parent | 67c3bc9db48c9e12d648df4792c706cae723676c (diff) | |
lib: Add GCC visibility(hidden) pragmas to private header files.
This prevents any of the private functions from being leaked out
through the library interface (at least when compiling with a
recent-enough gcc to support the visibility pragma).
Diffstat (limited to 'lib/xutil.h')
| -rw-r--r-- | lib/xutil.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xutil.h b/lib/xutil.h index b973f7dc..fd77f733 100644 --- a/lib/xutil.h +++ b/lib/xutil.h @@ -25,6 +25,8 @@ #include <sys/types.h> #include <regex.h> +#pragma GCC visibility push(hidden) + /* xutil.c */ void * xcalloc (size_t nmemb, size_t size); @@ -48,4 +50,6 @@ int xregexec (const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); +#pragma GCC visibility pop + #endif |
