summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2019-08-16 10:07:12 +1000
committerDonovan Baarda <abo@minkirri.apana.org.au>2019-08-16 10:07:12 +1000
commitc084f601023f1a52fb2a2b7f74b7e92268cd3d45 (patch)
tree24fb6639dd9f1dbd68d781800ae95a20486cd872 /.gitignore
parent7c21b8800046c7cbe37a95ce9dfb511ad99d7542 (diff)
downloadlibrsync-c084f601023f1a52fb2a2b7f74b7e92268cd3d45.tar.gz
Fix #130 don't export private symbols.
In CMakeLists.txt use cmake's GenerateExportHeader support to generate src/librsync_export.h and add it as a header to install. Set "C_VISIBILITY_PRESET hidden" target property for rsync to hide all not-explicitly-exported symbols. Do some minor indent tidying. Add librsync_export.h to .gitignore and remove obsolete librsync-config.h. In librsync.h include librsync_export.h and explicitly export all functions. Ensure it is correctly formated using "make tidyc". In rdiff.c remove all includes and references to anything not explicitly exported by librsync. This included usage of not exported logging functions rs_error() and rs_log(). Update rdiff_usage() to support formatted args with nicer output and use it everywhere we report bad arguments instead of rs_error(). Always use exit() instead of return for syntax errors to give neater termination output. Remove PROGRAM define and just use "rdiff" instead. In fileutil.[hc] move declarations for rs_file_open() and rs_file_close() to librsync.h and explicitly export them. They are used by rdiff. In sumset.h move declaration of rs_signature_log_stats() to librsync.h, and explicitly export it. It is used by rdiff. In delta.c explicitly export rs_roll_paranoia and add it as an extern in librsync.h. This is used by rdiff. In sumset.c explicitly export RS_MD4_SUM_LENGTH and RS_BLAKE2_SUM_LENGTH which are extern consts in librsync.h. In whole.c explicitly export rs_inbuflen and rs_outbuflen which are extern vars in librsync.h. In version.c explicitly export rs_librsync_version which is an extern const in librsync.h.
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore2
1 files changed, 1 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 6c7ef2a..8b09f72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@ CMakeCache.txt
CTestTestfile.cmake
config.h
*.cbp
-librsync-config.h
+librsync_export.h
librsync.so*
librsync.a
librsync*.dylib