From 591d61d80f4f81176f7e236df794922df9e001a1 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 8 Nov 2016 15:11:12 +0100 Subject: gpgscm: Expose seek and associated constants. * tests/gpgscm/ffi.c (do_seek): New function. (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'. * tests/gpgscm/lib.scm: Document the new function. Signed-off-by: Justus Winter --- tests/gpgscm/lib.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/gpgscm/lib.scm') diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm index 27779e24a..4e19eae60 100644 --- a/tests/gpgscm/lib.scm +++ b/tests/gpgscm/lib.scm @@ -204,6 +204,14 @@ ;; Libc functions. ;; +;; Change the read/write offset. +(ffi-define (seek fd offset whence)) + +;; Constants for WHENCE. +(ffi-define SEEK_SET) +(ffi-define SEEK_CUR) +(ffi-define SEEK_END) + ;; Get our process id. (ffi-define (getpid)) -- cgit v1.2.3