diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-13 15:42:26 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-19 22:46:45 -0700 |
commit | 26f9ce50e1353861e4c91f22ade5033072f4058e (patch) | |
tree | cc2ef3b19bd77bc23162a1e5db9def3441881922 /xf86drmRandom.c | |
parent | e15e3a65b80d1da5407bd46b4b0d514e621badd6 (diff) | |
download | libdrm-26f9ce50e1353861e4c91f22ade5033072f4058e.tar.gz libdrm-26f9ce50e1353861e4c91f22ade5033072f4058e.tar.bz2 libdrm-26f9ce50e1353861e4c91f22ade5033072f4058e.zip |
libdrm: annotate public functions
This was done with:
nm --dynamic --defined-only build/libdrm.so | \
grep " T " | \
grep -v _fini | grep -v _init | \
cut -d' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fi
done < /tmp/a.txt
Then the alignment of function arguments were manually fixed all over.
The idea here will be to switch the default visibility to hidden so we
don't export symbols we shouldn't.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'xf86drmRandom.c')
-rw-r--r-- | xf86drmRandom.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xf86drmRandom.c b/xf86drmRandom.c index 81f03014..51e9676f 100644 --- a/xf86drmRandom.c +++ b/xf86drmRandom.c @@ -74,12 +74,13 @@ #include <stdio.h> #include <stdlib.h> +#include "libdrm_macros.h" #include "xf86drm.h" #include "xf86drmRandom.h" #define RANDOM_MAGIC 0xfeedbeef -void *drmRandomCreate(unsigned long seed) +drm_public void *drmRandomCreate(unsigned long seed) { RandomState *state; @@ -109,13 +110,13 @@ void *drmRandomCreate(unsigned long seed) return state; } -int drmRandomDestroy(void *state) +drm_public int drmRandomDestroy(void *state) { drmFree(state); return 0; } -unsigned long drmRandom(void *state) +drm_public unsigned long drmRandom(void *state) { RandomState *s = (RandomState *)state; unsigned long hi; @@ -129,7 +130,7 @@ unsigned long drmRandom(void *state) return s->seed; } -double drmRandomDouble(void *state) +drm_public double drmRandomDouble(void *state) { RandomState *s = (RandomState *)state; |