skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 8375d5c12b63ec99141bfb1b70c0f2cfe70b564b
parent e7d52871f6e6e0a9269eb552e814689c3cd2d701
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Fri,  2 Feb 2018 00:59:36 +0000

 Fix HASSIGNEDSIGNED sysdeps macros, add localtm_from_ltm64 tolerance for 64-bit time_t

Diffstat:
MAUTHORS | 1+
MNEWS | 5+++++
Mconfigure | 8++++----
Mdoc/index.html | 2+-
Mdoc/license.html | 2+-
Mdoc/upgrade.html | 6++++++
Mpackage/deps.mak | 2+-
Mpackage/info | 2+-
Msrc/libstddjb/localtm_from_ltm64.c | 3+++
9 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -30,3 +30,4 @@ Thanks to: Martin Misuth <et.code@ethome.sk> Michael Zuo <muh.muhten@gmail.com> Éric Le Bihan <eric.le.bihan.dev@free.fr> + Samuel Holland <samuel@sholland.org> diff --git a/NEWS b/NEWS @@ -1,5 +1,10 @@ Changelog for skalibs. +In 2.6.3.2 +---------- + + - Bugfixes. + In 2.6.3.1 ---------- diff --git a/configure b/configure @@ -166,11 +166,11 @@ trytypes () { ./output-types | grep -F signed | while read key value ; do caps=$(echo $key | sed s/:\$// | tr a-z A-Z) if test $value = yes ; then - echo "#define ${package_macro_name}_HASSIGNED${caps}" - echo "#undef ${package_macro_name}_HASUNSIGNED${caps}" + echo "#define ${package_macro_name}_HAS${caps}" + echo "#undef ${package_macro_name}_HASUN${caps}" else - echo "#undef ${package_macro_name}_HASSIGNED${caps}" - echo "#define ${package_macro_name}_HASUNSIGNED${caps}" + echo "#undef ${package_macro_name}_HAS${caps}" + echo "#define ${package_macro_name}_HASUN${caps}" fi >> $sysdeps/sysdeps.h done rm -f output-types diff --git a/doc/index.html b/doc/index.html @@ -60,7 +60,7 @@ with a standard C development environment </li> <h3> Download </h3> <ul> - <li> The current released version of skalibs is <a href="skalibs-2.6.3.1.tar.gz">2.6.3.1</a>. </li> + <li> The current released version of skalibs is <a href="skalibs-2.6.3.2.tar.gz">2.6.3.2</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/skalibs/">skalibs git repository</a>: diff --git a/doc/license.html b/doc/license.html @@ -74,7 +74,7 @@ color, or different text font. </li> <p> <em>I am aware that the previous restrictions sound completely ridiculous while the official skalibs documentation is incomplete. -As of 2.6.3.1, I'm not going to enforce those restrictions, but if you're +As of 2.6.3.2, I'm not going to enforce those restrictions, but if you're going to provide documentation for skalibs, don't keep it to yourself, please send it to me instead. :-) </em> </p> diff --git a/doc/upgrade.html b/doc/upgrade.html @@ -16,6 +16,12 @@ <a href="//skarnet.org/">skarnet.org</a> </p> +<h2> in 2.6.3.2 </h2> + +<ul> + <li> No functional changes. </li> +</ul> + <h2> in 2.6.3.1 </h2> <ul> diff --git a/package/deps.mak b/package/deps.mak @@ -392,7 +392,7 @@ src/libstddjb/leapsecs_add.o src/libstddjb/leapsecs_add.lo: src/libstddjb/leapse src/libstddjb/leapsecs_sub.o src/libstddjb/leapsecs_sub.lo: src/libstddjb/leapsecs_sub.c src/libstddjb/djbtime-internal.h src/include/skalibs/uint64.h src/libstddjb/leapsecs_table.o src/libstddjb/leapsecs_table.lo: src/libstddjb/leapsecs_table.c src/libstddjb/djbtime-internal.h src/include/skalibs/tai.h src/include/skalibs/uint64.h src/libstddjb/localtm_fmt.o src/libstddjb/localtm_fmt.lo: src/libstddjb/localtm_fmt.c src/include/skalibs/djbtime.h src/include/skalibs/types.h -src/libstddjb/localtm_from_ltm64.o src/libstddjb/localtm_from_ltm64.lo: src/libstddjb/localtm_from_ltm64.c src/include/skalibs/djbtime.h src/include/skalibs/tai.h src/include/skalibs/uint64.h +src/libstddjb/localtm_from_ltm64.o src/libstddjb/localtm_from_ltm64.lo: src/libstddjb/localtm_from_ltm64.c src/include/skalibs/djbtime.h src/include/skalibs/sysdeps.h src/include/skalibs/tai.h src/include/skalibs/uint64.h src/libstddjb/localtm_from_sysclock.o src/libstddjb/localtm_from_sysclock.lo: src/libstddjb/localtm_from_sysclock.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h src/libstddjb/localtm_from_tai.o src/libstddjb/localtm_from_tai.lo: src/libstddjb/localtm_from_tai.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h src/libstddjb/localtm_from_utc.o src/libstddjb/localtm_from_utc.lo: src/libstddjb/localtm_from_utc.c src/include/skalibs/djbtime.h src/include/skalibs/uint64.h diff --git a/package/info b/package/info @@ -1,4 +1,4 @@ package=skalibs -version=2.6.3.1 +version=2.6.3.2 category=prog package_macro_name=SKALIBS diff --git a/src/libstddjb/localtm_from_ltm64.c b/src/libstddjb/localtm_from_ltm64.c @@ -5,6 +5,7 @@ #define _BSD_SOURCE #endif +#include <skalibs/sysdeps.h> #include <errno.h> #include <time.h> #include <skalibs/uint64.h> @@ -15,7 +16,9 @@ int localtm_from_ltm64 (struct tm *l, uint64_t uu, int tz) { if (uu < TAI_MAGIC) return (errno = EINVAL, 0) ; uu -= TAI_MAGIC ; +#if SKALIBS_SIZEOFTIME != 8 if (uu > 0xFFFFFFFFUL) return (errno = EOVERFLOW, 0) ; +#endif { time_t u = (time_t)uu ; if (tz ? !localtime_r(&u, l) : !gmtime_r(&u, l)) return 0 ;