Bruno Haible via "GNU gzip discussion and bug reports."
<[email protected]> writes:

> Building it on bi-arch machines in 32-bit mode, the 'timestamp' test
> may fail.
>
> Find attached the logs of the builds on
>   - Linux (Debian 8)/s390x, CC="gcc -m31",
>   - Solaris 11.4/x86_64, CC="gcc -m32".
>
> In the Linux (Debian 8) case, gzip prints a diagnostic
>   gzip: in: warning: file timestamp out of range for gzip format
>
> In the Solaris 11.4 case, gzip prints a diagnostic
>   gzip: in: Value too large for defined data type

On Solaris calling fstat on the file fails with EOVERFLOW there. See the
following example:

    $ touch -t 210602070628.15 in
    $ cat main.c
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <sys/stat.h>
    #include <stdlib.h>
    #include <fcntl.h>
    #include <string.h>
    #include <errno.h>
    int
    main (void)
    {
      int fd = open ("in", O_RDONLY);
      if (fd < 0)
        abort ();
      struct stat st;
      if (fstat (fd, &st) < 0)
        {
          fprintf (stderr, "%s\n", strerror (errno));
          return EXIT_FAILURE;
        }
      return EXIT_SUCCESS;
    }
    $ gcc -m32 main.c; ./a.out 
    Value too large for defined data type

I guess we would have to check for that error after invoking 'gzip'.

Collin



Reply via email to