Changeset 2559


Ignore:
Timestamp:
Jul 17, 2008, 1:17:12 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • Support fsetpos64 on Linux.
Location:
zzuf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r2553 r2559  
    8484AC_DEFINE_UNQUOTED(FILE_PTR, $ac_v_fp_ptr, [Define to the FILE::ptr member name])
    8585
     86dnl  On HP-UX, fpos64_t == int64_t, but on Linux it's a compound object.
     87AC_MSG_CHECKING(how to access fpos64_t x)
     88ac_v_fpos64_t="unknown"
     89AC_TRY_COMPILE(
     90 [#define _LARGEFILE64_SOURCE
     91  #include <stdio.h>],
     92 [fpos64_t x; long long int y = x.__pos;],
     93 [ac_v_fpos64_t="(x).__pos"])
     94AC_TRY_COMPILE(
     95 [#define _LARGEFILE64_SOURCE
     96  #include <stdio.h>],
     97 [fpos64_t x; long long int y = (long long int)x;],
     98 [ac_v_fpos64_t="(x)"])
     99AC_MSG_RESULT($ac_v_fpos64_t)
     100AC_DEFINE_UNQUOTED(FPOS_CAST(x), $ac_v_fpos64_t, [Define to a macro for accessing an fpos64_t variable])
     101
    86102AC_MSG_CHECKING(for pragma INIT/FINI)
    87103AC_TRY_COMPILE([],
  • zzuf/trunk/src/lib-stream.c

    r2557 r2559  
    308308        _zz_unlock(fd); \
    309309        debug("%s([%i], %lli) = %i", __func__, \
    310               fd, (long long int)*pos, ret); \
    311         /* On HP-UX at least, fpos64_t == int64_t */ \
    312         _zz_setpos(fd, (int64_t)*pos); \
     310              fd, (long long int)FPOS_CAST(*pos), ret); \
     311        _zz_setpos(fd, (int64_t)FPOS_CAST(*pos)); \
    313312    } \
    314313    while(0)
Note: See TracChangeset for help on using the changeset viewer.