Skip to content

LONG_MAX is not the maximum value of 64-bit time_t on 32 bit systems (e.g. ARMv7) #369

@xypron

Description

@xypron

The library makes the false assumption that time_t is equivalent to long. To avoid the year 2038 problem Linux distributions like Debian and Ubuntu have moved to using 64-bit time_t on 32-bit architectures like ARMv7.

Now we see test failures like:

FAIL tltest-timespec.c:169 -2147483648.999999999 cap- 2147483647.999999999 = 0.999999998 != -2147483648.999999999
FAIL tltest-timespec.c:170 2147483647.999999999 cap- -2147483648.999999999 = 0.999999998 != 2147483647.999999999

To resolve the issue tlog should check the width of time_t and define symbols for the minimum and maximum values of time_t accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions