Ignore:
Timestamp:
Nov 23, 2009, 1:27:05 AM (11 years ago)
Author:
Sam Hocevar
Message:

Reimplement uflow() under Linux. Unlocked IO now works on Linux, except
in combination with getdelim()/getline().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r4006 r4011  
    7979
    8080AC_MSG_CHECKING(for FILE* internal members)
     81ac_cv_have_glibc_fp="no"
    8182ac_v_fp_cnt="unknown"
    8283ac_v_fp_ptr="unknown"
    8384AC_TRY_COMPILE([#include <stdio.h>],
    84  [FILE *fp; fp->__cnt++; fp->__ptr++],
    85  [ac_v_fp_cnt=__cnt; ac_v_fp_ptr=__ptr],
     85 [FILE *fp; fp->_IO_read_ptr++; fp->_IO_read_end++],
     86 [ac_cv_have_glibc_fp=yes; ac_v_fp_cnt=_IO_read_end; ac_v_fp_ptr=_IO_read_ptr],
    8687 [AC_TRY_COMPILE([#include <stdio.h>],
    87    [FILE *fp; fp->_cnt++; fp->_ptr++],
    88    [ac_v_fp_cnt=_cnt; ac_v_fp_ptr=_ptr],
     88   [FILE *fp; fp->__cnt++; fp->__ptr++],
     89   [ac_v_fp_cnt=__cnt; ac_v_fp_ptr=__ptr],
    8990   [AC_TRY_COMPILE([#include <stdio.h>],
    90      [FILE *fp; fp->_c++; fp->_p++],
    91      [ac_v_fp_cnt=_c; ac_v_fp_ptr=_p],
     91     [FILE *fp; fp->_cnt++; fp->_ptr++],
     92     [ac_v_fp_cnt=_cnt; ac_v_fp_ptr=_ptr],
    9293     [AC_TRY_COMPILE([#include <stdio.h>],
    93        [FILE *fp; fp->_r++; fp->_p++],
    94        [ac_v_fp_cnt=_r; ac_v_fp_ptr=_p])])])])
    95 AC_MSG_RESULT($ac_v_fp_cnt/$ac_v_fp_ptr)
    96 AC_DEFINE_UNQUOTED(FILE_CNT, $ac_v_fp_cnt, [Define to the FILE::cnt member name])
    97 AC_DEFINE_UNQUOTED(FILE_PTR, $ac_v_fp_ptr, [Define to the FILE::ptr member name])
     94       [FILE *fp; fp->_c++; fp->_p++],
     95       [ac_v_fp_cnt=_c; ac_v_fp_ptr=_p],
     96       [AC_TRY_COMPILE([#include <stdio.h>],
     97         [FILE *fp; fp->_r++; fp->_p++],
     98         [ac_v_fp_cnt=_r; ac_v_fp_ptr=_p])])])])])
     99AC_MSG_RESULT($ac_v_fp_ptr/$ac_v_fp_cnt)
     100if test "$ac_cv_have_glibc_fp" != "no"; then
     101  AC_DEFINE(HAVE_GLIBC_FP, 1, [Define to 1 if FILE has glibc-style members])
     102fi
     103AC_DEFINE_UNQUOTED(FILE_PTR, $ac_v_fp_ptr, [Define to the FILE::ptr member])
     104AC_DEFINE_UNQUOTED(FILE_CNT, $ac_v_fp_cnt, [Define to the FILE::cnt member])
    98105
    99106dnl  On HP-UX, fpos64_t == int64_t, but on Linux it's a compound object.
Note: See TracChangeset for help on using the changeset viewer.