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>