summaryrefslogtreecommitdiff
path: root/src/visibility.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-09-11 14:33:46 +0200
committerWerner Koch <wk@gnupg.org>2014-09-11 14:37:21 +0200
commit5a4684f3b0db4cd5c13f94b1319c245ef96ce91d (patch)
treeeb3c5750c13c246b14ff2ed1646616face838be0 /src/visibility.c
parent4138644d74f127c1f4abf7455fe1e21f56d6e07e (diff)
downloadlibgpg-error-5a4684f3b0db4cd5c13f94b1319c245ef96ce91d.tar.gz
Fix problems with ssize_t and off_t.
* configure.ac (AC_SYS_LARGEFILE): New. (AC_CHECK_HEADERS): Check for stdint.h. (AC_CHECK_SIZEOF): Add for int, long and long long. (REPLACEMENT_FOR_OFF_T): New ac_define. * src/mkheader.c (have_stdint_h, have_w32_system, have_w64_system) (replacement_for_off_type, stdint_h_included): New. (xfree, xstrdup): New. (parse_config_h): New. (write_special): Support "define:gpgrt_off_t", "define:gpgrt_ssize_t", "api_ssize_t" tags. (main): Add config.h arg. Call parse_config_h. Fix substitute code. * src/Makefile.am (gpg-error.h): Pass config.h to mkheader. * src/gpg-error.h.in: Include definitions for gpgrt_ssize_t and gpgrt_off_t. Let mkheader insert ssize_t keywords. Chnage all off_t to gpgrt_off_t. * src/estream.c: Change all off_t to gpgrt_off_t. Chnage all ssize_t to gpgrt_ssize_t. * src/visibility.c (gpgrt_fseeko): Use gpgrt_off_t. (gpgrt_ftello): Ditto. (gpgrt_getline): Use gpgrt_ssize_t. (gpgrt_read_line): Ditto.
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/visibility.c b/src/visibility.c
index f1bbca6..f0d7fd1 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -346,7 +346,7 @@ gpgrt_fseek (estream_t stream, long int offset, int whence)
}
int
-gpgrt_fseeko (estream_t stream, off_t offset, int whence)
+gpgrt_fseeko (estream_t stream, gpgrt_off_t offset, int whence)
{
return _gpgrt_fseeko (stream, offset, whence);
}
@@ -357,7 +357,7 @@ gpgrt_ftell (estream_t stream)
return _gpgrt_ftell (stream);
}
-off_t
+gpgrt_off_t
gpgrt_ftello (estream_t stream)
{
return _gpgrt_ftello (stream);
@@ -468,14 +468,14 @@ gpgrt_fputs_unlocked (const char *_GPGRT__RESTRICT s,
return _gpgrt_fputs_unlocked (s, stream);
}
-ssize_t
+gpgrt_ssize_t
gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr,
size_t *_GPGRT__RESTRICT n, estream_t _GPGRT__RESTRICT stream)
{
return _gpgrt_getline (lineptr, n, stream);
}
-ssize_t
+gpgrt_ssize_t
gpgrt_read_line (estream_t stream,
char **addr_of_buffer, size_t *length_of_buffer,
size_t *max_length)