Home GnuPG

Fix problems with ssize_t and off_t.
5a4684f3b0dbUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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.

Details

Provenance
wernerAuthored on Sep 11 2014, 2:33 PM
Parents
rE4138644d74f1: Fix compiler warning for w32.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rE5a4684f3b0db: Fix problems with ssize_t and off_t. (authored by Werner Koch <wk@gnupg.org>).Sep 11 2014, 2:37 PM