Ignore:
Timestamp:
Jan 20, 2010 8:59:01 AM (4 years ago)
Author:
sam
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r4262 r4285  
    9393AC_TRY_COMPILE([#include <stdio.h>], 
    9494 [FILE *fp; fp->_IO_read_ptr++; fp->_IO_read_end++], 
    95  [ac_cv_have_file_io_read_ptr=yes], 
    96  [ac_cv_have_file_io_read_ptr=no]) 
    97 AC_MSG_RESULT($ac_cv_have_file_io_read_ptr) 
    98 if test "$ac_cv_have_file_io_read_ptr" != "no"; then 
     95 [ac_cv_have_glibc_file=yes], 
     96 [ac_cv_have_glibc_file=no]) 
     97AC_MSG_RESULT($ac_cv_have_glibc_file) 
     98if test "$ac_cv_have_glibc_file" != "no"; then 
    9999  AC_DEFINE(HAVE_GLIBC_FILE, 1, [Define to 1 if FILE has glibc-style members]) 
    100100fi 
     
    103103AC_TRY_COMPILE([#include <stdio.h>], 
    104104 [FILE *fp; fp->_bf._base++; fp->_r++; fp->_p++], 
    105  [ac_cv_have_file_bf_base=yes], 
    106  [ac_cv_have_file_bf_base=no]) 
    107 AC_MSG_RESULT($ac_cv_have_file_bf_base) 
    108 if test "$ac_cv_have_file_bf_base" != "no"; then 
     105 [ac_cv_have_freebsd_file=yes], 
     106 [ac_cv_have_freebsd_file=no]) 
     107AC_MSG_RESULT($ac_cv_have_freebsd_file) 
     108if test "$ac_cv_have_freebsd_file" != "no"; then 
    109109  AC_DEFINE(HAVE_FREEBSD_FILE, 1, [Define to 1 if FILE has FreeBSD-style members]) 
     110fi 
     111 
     112AC_MSG_CHECKING([for _base, _cnt and _ptr in FILE (Solaris-style)]) 
     113AC_TRY_COMPILE([#include <stdio.h>], 
     114 [FILE *fp; fp->_base++; fp->_cnt++; fp->_ptr++], 
     115 [ac_cv_have_solaris_file=yes], 
     116 [ac_cv_have_solaris_file=no]) 
     117AC_MSG_RESULT($ac_cv_have_solaris_file) 
     118if test "$ac_cv_have_solaris_file" != "no"; then 
     119  AC_DEFINE(HAVE_SOLARIS_FILE, 1, [Define to 1 if FILE has Solaris-style members]) 
    110120fi 
    111121 
     
    115125AC_TRY_COMPILE( 
    116126 [#define _LARGEFILE64_SOURCE 
     127  #define _LARGEFILE_SOURCE 
    117128  #include <stdio.h>], 
    118129 [fpos64_t x; long long int y = x.__pos;], 
     
    120131AC_TRY_COMPILE( 
    121132 [#define _LARGEFILE64_SOURCE 
     133  #define _LARGEFILE_SOURCE 
    122134  #include <stdio.h>], 
    123135 [fpos64_t x; long long int y = (long long int)x;], 
Note: See TracChangeset for help on using the changeset viewer.