Changeset 1595
- Timestamp:
- Jan 7, 2007, 11:34:45 AM (16 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/configure.ac
r1594 r1595 16 16 17 17 AC_CHECK_HEADERS(inttypes.h stdint.h getopt.h) 18 AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 fseeko getline getdelim __getdelim fgetln)18 AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 fseeko _IO_getc getline getdelim __getdelim fgetln) 19 19 AC_CHECK_TYPES(sighandler_t, [], [], 20 20 [#define _GNU_SOURCE -
zzuf/trunk/doc/zzuf.1
r1594 r1595 258 258 \fBgetc\fR(), \fBfgetc\fR(), \fBfgets\fR(), \fBungetc\fR(), \fBfclose\fR() 259 259 .TP 260 GNU libcspecific:261 \fBopen64\fR(), \fBlseek64\fR(), \fBmmap64\fR(), \fB getline\fR(),262 \fBget delim\fR(), \fB__getdelim\fR()263 .TP 264 BSD 260 Linux-specific: 261 \fBopen64\fR(), \fBlseek64\fR(), \fBmmap64\fR(), \fB_IO_getc\fR(), 262 \fBgetline\fR(), \fBgetdelim\fR(), \fB__getdelim\fR() 263 .TP 264 BSD-specific: 265 265 \fBfgetln\fR() 266 266 .TP -
zzuf/trunk/src/fuzz.c
r1555 r1595 43 43 unsigned int i, j, todo; 44 44 45 /* 45 #if 0 46 46 debug("fuzz(%i, %lli@%li)", fd, (unsigned long long int)len, 47 47 (unsigned long int)pos); 48 */ 48 #endif 49 49 50 50 fuzz = _zz_getfuzz(fd); -
zzuf/trunk/src/load-stream.c
r1594 r1595 38 38 39 39 /* Library functions that we divert */ 40 static FILE * (*fopen_orig) (const char *path, const char *mode);40 static FILE * (*fopen_orig) (const char *path, const char *mode); 41 41 #ifdef HAVE_FOPEN64 42 static FILE * (*fopen64_orig) (const char *path, const char *mode);43 #endif 44 static int (*fseek_orig) (FILE *stream, long offset, int whence);42 static FILE * (*fopen64_orig) (const char *path, const char *mode); 43 #endif 44 static int (*fseek_orig) (FILE *stream, long offset, int whence); 45 45 #ifdef HAVE_FSEEKO 46 static int (*fseeko_orig) (FILE *stream, off_t offset, int whence); 47 #endif 48 static void (*rewind_orig) (FILE *stream); 49 static size_t (*fread_orig) (void *ptr, size_t size, size_t nmemb, 50 FILE *stream); 51 static int (*getc_orig) (FILE *stream); 52 static int (*fgetc_orig) (FILE *stream); 53 static char * (*fgets_orig) (char *s, int size, FILE *stream); 54 static int (*ungetc_orig) (int c, FILE *stream); 55 static int (*fclose_orig) (FILE *fp); 46 static int (*fseeko_orig) (FILE *stream, off_t offset, int whence); 47 #endif 48 static void (*rewind_orig) (FILE *stream); 49 static size_t (*fread_orig) (void *ptr, size_t size, size_t nmemb, 50 FILE *stream); 51 static int (*getc_orig) (FILE *stream); 52 static int (*fgetc_orig) (FILE *stream); 53 static int (*_IO_getc_orig) (FILE *stream); 54 static char * (*fgets_orig) (char *s, int size, FILE *stream); 55 static int (*ungetc_orig) (int c, FILE *stream); 56 static int (*fclose_orig) (FILE *fp); 56 57 57 58 /* Additional GNUisms */ … … 87 88 LOADSYM(getc); 88 89 LOADSYM(fgetc); 90 #ifdef HAVE__IO_GETC 91 LOADSYM(_IO_getc); 92 #endif 89 93 LOADSYM(fgets); 90 94 LOADSYM(ungetc); … … 261 265 } while(0) 262 266 263 # if !defined getc267 #undef getc /* can be a macro; we don’t want that */ 264 268 int getc(FILE *stream) 265 269 { 266 270 int ret; FGETC(getc); return ret; 267 271 } 268 #endif269 272 270 273 int fgetc(FILE *stream) … … 272 275 int ret; FGETC(fgetc); return ret; 273 276 } 277 278 #ifdef HAVE__IO_GETC 279 int _IO_getc(FILE *stream) 280 { 281 int ret; FGETC(_IO_getc); return ret; 282 } 283 #endif 274 284 275 285 char *fgets(char *s, int size, FILE *stream) -
zzuf/trunk/test/testsuite.sh
r1592 r1595 88 88 # initially. (Linux sed doesn't, but OS X sed does.) 89 89 check "$ZZOPTS" "head -- -n 9999 $file" "head -n 9999" 90 check "$ZZOPTS" "tail -- -n 9999 $file" "tail -n 9999" 91 check "$ZZOPTS" "tail -- -n +1 $file" "tail -n +1" 92 check "$ZZOPTS" "grep -- -a '' $file" "grep -a ''" 93 check "$ZZOPTS" "sed -- -e n $file" "sed -e n" 94 #check "$ZZOPTS" "cut -- -b1- $file" "cut -b1-" 90 95 check "$ZZOPTS" "-i head -- -n 9999 < $file" "|head -n 9999" 91 check "$ZZOPTS" " tail -- -n +1 $file" "tail -n +1"96 check "$ZZOPTS" "-i tail -- -n 9999 < $file" "|tail -n 9999" 92 97 check "$ZZOPTS" "-i tail -- -n +1 < $file" "|tail -n +1" 93 check "$ZZOPTS" "grep -- -a '' $file" "grep -a ''"94 98 check "$ZZOPTS" "-i grep -- -a '' < $file" "|grep -a ''" 95 check "$ZZOPTS" "sed -- -e n $file" "sed -e n"96 99 check "$ZZOPTS" "-i sed -- -e n < $file" "|sed -e n" 97 #check "$ZZOPTS" "cut -- -b1- $file" "cut -b1-"98 100 #check "$ZZOPTS" "-i cut -- -b1- < $file" "|cut -b1-" 99 101 ;;
Note: See TracChangeset
for help on using the changeset viewer.