aboutsummaryrefslogtreecommitdiffstats
path: root/src/visibility.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-11-26 19:06:36 +0000
committerWerner Koch <[email protected]>2018-11-26 19:09:53 +0000
commitffb49b72f132d954a3d9fa11e45803c36a62fd25 (patch)
treeef464194cfdc5392af615079ed010a1c1d0efc75 /src/visibility.c
parentcore: New API gpgrt_cmp_version (diff)
downloadlibgpg-error-ffb49b72f132d954a3d9fa11e45803c36a62fd25.tar.gz
libgpg-error-ffb49b72f132d954a3d9fa11e45803c36a62fd25.zip
core: Add a limited version of gpgrt_ftruncate.
* src/gpg-error.h.in (gpgrt_ftruncate, es_ftruncate): New. * src/gpg-error.def.in, src/gpg-error.vers: Add gpgrt_ftruncate. * src/visibility.c (gpgrt_ftruncate): new. * src/gpgrt-int.h (COOKIE_IOCTL_TRUNCATE): New. * src/estream.c (func_mem_ioctl): Support new internal IOCTL. (_gpgrt_ftruncate): New. -- Right now the ftruncate works only on memory streams. Can easily be added to other stream times. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c
index ab5e383..1947111 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -390,6 +390,12 @@ gpgrt_rewind (estream_t stream)
}
int
+gpgrt_ftruncate (estream_t stream, gpgrt_off_t length)
+{
+ return _gpgrt_ftruncate (stream, length);
+}
+
+int
gpgrt_fgetc (estream_t stream)
{
return _gpgrt_fgetc (stream);