diff options
author | Roy Marples <roy@marples.name> | 2008-01-10 16:35:59 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-10 16:35:59 +0000 |
commit | 43147845209873b0776bd75d363913fe25611f49 (patch) | |
tree | ab3295c30664476d8d05b0fe5fe9ace702ade5ea /src/includes/hidden-visibility.h | |
parent | 2643f2e605f102d2c2fa098d0cf5400d3795ed4a (diff) |
Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's.
Diffstat (limited to 'src/includes/hidden-visibility.h')
-rw-r--r-- | src/includes/hidden-visibility.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/includes/hidden-visibility.h b/src/includes/hidden-visibility.h new file mode 100644 index 00000000..bc7e338a --- /dev/null +++ b/src/includes/hidden-visibility.h @@ -0,0 +1,26 @@ +/* + * Written by Mike Frysinger + * Placed in the Public Domain + */ + +#ifndef _HIDDEN_VISIBILITY_H_ +#define _HIDDEN_VISIBILITY_H_ + +#if defined(__ELF__) && defined(__GNUC__) +# define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name) +# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name) +# define __hidden_asmname2(prefix, name) #prefix name +# define __hidden_proto(name, internal) \ + extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \ + __attribute__ ((visibility ("hidden"))); +# define __hidden_ver(local, internal, name) \ + extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \ + extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local)))) +# define hidden_proto(name) __hidden_proto(name, __RC_##name) +# define hidden_def(name) __hidden_ver(__RC_##name, name, name); +#else +# define hidden_proto(name) +# define hidden_def(name) +#endif + +#endif |