Changeset 2330


Ignore:
Timestamp:
05/18/08 01:10:41 (5 years ago)
Author:
sam
Message:
  • Implement getc_unlocked() and fgetc_unlocked().
Location:
zzuf/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/configure.ac

    r2320 r2330  
    3030 
    3131AC_CHECK_FUNCS(setenv waitpid setrlimit gettimeofday fork kill pipe _pipe) 
    32 AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 dup dup2 fseeko _IO_getc getline getdelim __getdelim fgetln __srefill map_fd memalign posix_memalign aio_read accept bind connect socket readv pread recv recvfrom recvmsg mmap valloc sigaction getpagesize) 
     32AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 dup dup2 fseeko _IO_getc getline getdelim __getdelim fgetln __srefill map_fd memalign posix_memalign aio_read accept bind connect socket readv pread recv recvfrom recvmsg mmap valloc sigaction getpagesize getc_unlocked getchar_unlocked fgetc_unlocked fread_unlocked fgets_unlocked) 
    3333 
    3434AC_CHECK_TYPES(sighandler_t, [], [], 
  • zzuf/trunk/src/lib-stream.c

    r1791 r2330  
    6262#if defined HAVE__IO_GETC 
    6363static int     (*ORIG(_IO_getc)) (FILE *stream); 
     64#endif 
     65#if defined HAVE_GETC_UNLOCKED 
     66static int     (*ORIG(getc_unlocked))  (FILE *stream); 
     67#endif 
     68#if defined HAVE_FGETC_UNLOCKED 
     69static int     (*ORIG(fgetc_unlocked)) (FILE *stream); 
    6470#endif 
    6571static char *  (*ORIG(fgets))    (char *s, int size, FILE *stream); 
     
    322328{ 
    323329    int ret; FGETC(_IO_getc); return ret; 
     330} 
     331#endif 
     332 
     333#if defined HAVE_GETC_UNLOCKED 
     334int NEW(getc_unlocked)(FILE *stream) 
     335{ 
     336    int ret; FGETC(getc_unlocked); return ret; 
     337} 
     338#endif 
     339 
     340#if defined HAVE_FGETC_UNLOCKED 
     341int NEW(fgetc_unlocked)(FILE *stream) 
     342{ 
     343    int ret; FGETC(fgetc_unlocked); return ret; 
    324344} 
    325345#endif 
Note: See TracChangeset for help on using the changeset viewer.