diff options
author | Werner Koch <wk@gnupg.org> | 2018-11-26 20:06:36 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-11-26 20:09:53 +0100 |
commit | ffb49b72f132d954a3d9fa11e45803c36a62fd25 (patch) | |
tree | ef464194cfdc5392af615079ed010a1c1d0efc75 /src/gpg-error.h.in | |
parent | a5d4a4b32b11814d673241d62624ecec1d577571 (diff) | |
download | libgpg-error-ffb49b72f132d954a3d9fa11e45803c36a62fd25.tar.gz |
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 <wk@gnupg.org>
Diffstat (limited to 'src/gpg-error.h.in')
-rw-r--r-- | src/gpg-error.h.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 2bf6a6f..c0ac0eb 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -712,6 +712,7 @@ int _gpgrt_pending_unlocked (gpgrt_stream_t stream); /* (private) */ int gpgrt_fflush (gpgrt_stream_t stream); int gpgrt_fseek (gpgrt_stream_t stream, long int offset, int whence); int gpgrt_fseeko (gpgrt_stream_t stream, gpgrt_off_t offset, int whence); +int gpgrt_ftruncate (estream_t stream, gpgrt_off_t length); long int gpgrt_ftell (gpgrt_stream_t stream); gpgrt_off_t gpgrt_ftello (gpgrt_stream_t stream); void gpgrt_rewind (gpgrt_stream_t stream); @@ -868,6 +869,7 @@ int gpgrt_vsnprintf (char *buf,size_t bufsize, # define es_fflush gpgrt_fflush # define es_fseek gpgrt_fseek # define es_fseeko gpgrt_fseeko +# define es_ftruncate gpgrt_ftruncate # define es_ftell gpgrt_ftell # define es_ftello gpgrt_ftello # define es_rewind gpgrt_rewind |