diff options
author | Werner Koch <wk@gnupg.org> | 2005-06-01 17:46:01 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2005-06-01 17:46:01 +0200 |
commit | cad9562436e61cdaf1a2f03ba96bcc82077205e6 (patch) | |
tree | 6db1dde6998d0ad1ae13a4581f66cace736a2399 /kbx/keybox-file.c | |
parent | * agent.h (out_of_core): s/__inline__/inine. Noted by Ray Link. (diff) | |
download | gnupg2-cad9562436e61cdaf1a2f03ba96bcc82077205e6.tar.xz gnupg2-cad9562436e61cdaf1a2f03ba96bcc82077205e6.zip |
* configure.ac (gl_INIT): Add gnulib stuff.
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS
by a simple check.
(putc_unlocked): Removed check. Not used.
(strsep, mkdtemp, asprintf): Replaced checks by gnulib checks.
(xsize): Added will probably come handy soon.
(CFLAGS): Use -Wformat-security instead of
-Wformat-nonliteral. Add --Wno-format-y2k.
* gl/, gl/m4/: New.
* gpg-agent.c: Include setenv.h.
* Makefile.am (AM_CPPFLAGS): Added.
* util.h: Add some includes for gnulib.
(ttyname, isascii): Define them inline.
* fseeko.c, ftello.c: Removed.
* strsep.c, mkdtemp.c: Removed.
* ttyname.c, isascii.c: Removed.
* mkdtemp.c: Removed.
* exec.c: Include mkdtemp.h
* keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement
function. Copied from ../common/ftello.c.
* keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement
function. Copied from ../common/iobuf.c.
* scdaemon.c: Include mkdtemp.h.
* misc.c: Include setenv.h.
* symcryptrun.c: Include mkdtemp.h.
Diffstat (limited to 'kbx/keybox-file.c')
-rw-r--r-- | kbx/keybox-file.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kbx/keybox-file.c b/kbx/keybox-file.c index db3164fef..fe02c1f9f 100644 --- a/kbx/keybox-file.c +++ b/kbx/keybox-file.c @@ -27,6 +27,22 @@ #include "keybox-defs.h" + +#if !defined(HAVE_FTELLO) && !defined(ftello) +static off_t +ftello (FILE *stream) +{ + long int off; + + off = ftell (stream); + if (off == -1) + return (off_t)-1; + return off; +} +#endif /* !defined(HAVE_FTELLO) && !defined(ftello) */ + + + /* Read a block at the current postion and return it in r_blob. r_blob may be NULL to simply skip the current block */ int |