Changeset 4285 for zzuf/trunk/src


Ignore:
Timestamp:
Jan 20, 2010, 8:59:01 AM (11 years ago)
Author:
Sam Hocevar
Message:

Improve the OpenSolaris? port: support for FILE structures, and a few
additional defines to activate libc features.

Location:
zzuf/trunk/src/libzzuf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/libzzuf/lib-fd.c

    r4262 r4285  
    2525/* Use this to get lseek64() on glibc systems */
    2626#define _LARGEFILE64_SOURCE
     27/* Use this to get off64_t() on Solaris systems */
     28#define _LARGEFILE_SOURCE
    2729/* Use this to get proper prototypes on HP-UX systems */
    2830#define _XOPEN_SOURCE_EXTENDED
  • zzuf/trunk/src/libzzuf/lib-signal.c

    r4253 r4285  
    2121/* Needed for struct sigaction on HP-UX */
    2222#define _INCLUDE_POSIX_SOURCE
     23/* Needed for struct sigaction on OpenSolaris */
     24#define __EXTENSIONS__
    2325
    2426#if defined HAVE_STDINT_H
  • zzuf/trunk/src/libzzuf/lib-stream.c

    r4260 r4285  
    171171#elif defined HAVE_FREEBSD_FILE
    172172    return (uint8_t *)stream->_p;
     173#elif defined HAVE_SOLARIS_FILE
     174    return (uint8_t *)stream->_ptr;
    173175#else
    174176    (void)stream;
     
    184186#elif defined HAVE_FREEBSD_FILE
    185187    return (int)((uint8_t *)stream->_p - (uint8_t *)stream->_bf._base);
     188#elif defined HAVE_SOLARIS_FILE
     189    return (int)((uint8_t *)stream->_ptr - (uint8_t *)stream->_base);
    186190#else
    187191    (void)stream;
     
    197201#elif defined HAVE_FREEBSD_FILE
    198202    return stream->_r;
     203#elif defined HAVE_SOLARIS_FILE
     204    return stream->_cnt;
    199205#else
    200206    (void)stream;
Note: See TracChangeset for help on using the changeset viewer.