diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-18 12:44:58 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-18 15:00:37 +1000 |
commit | 4e448e2d2c140f5d4ea85938d09672e9fa26994e (patch) | |
tree | 75a89db8635c657298d559b02107932033d444c7 /lib | |
parent | d81eccc0baa26ae4c92680085b28687897ee9904 (diff) | |
download | samba-4e448e2d2c140f5d4ea85938d09672e9fa26994e.tar.gz samba-4e448e2d2c140f5d4ea85938d09672e9fa26994e.tar.bz2 samba-4e448e2d2c140f5d4ea85938d09672e9fa26994e.zip |
libreplace: added _PUBLIC_ and _PRIVATE_ to replace.h
these are needed for all libs that use ABI checking, so libreplace
is the logical place for now
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/replace.h | 18 | ||||
-rw-r--r-- | lib/util/attr.h | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 7adc224bf2..713634e541 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -753,4 +753,22 @@ char *ufc_crypt(const char *key, const char *salt); #define fdatasync(fd) fsync(fd) #endif +/* these are used to mark symbols as local to a shared lib, or + * publicly available via the shared lib API */ +#ifndef _PUBLIC_ +#ifdef HAVE_VISIBILITY_ATTR +#define _PUBLIC_ __attribute__((visibility("default"))) +#else +#define _PUBLIC_ +#endif +#endif + +#ifndef _PRIVATE_ +#ifdef HAVE_VISIBILITY_ATTR +# define _PRIVATE_ __attribute__((visibility("hidden"))) +#else +# define _PRIVATE_ +#endif +#endif + #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/lib/util/attr.h b/lib/util/attr.h index f64b272a67..9b346459b6 100644 --- a/lib/util/attr.h +++ b/lib/util/attr.h @@ -29,12 +29,6 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifdef HAVE_VISIBILITY_ATTR -# define _PUBLIC_ __attribute__((visibility("default"))) -#else -# define _PUBLIC_ -#endif - #ifndef _DEPRECATED_ #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) #define _DEPRECATED_ __attribute__ ((deprecated)) |