Changeset 4041
- Timestamp:
- Nov 26, 2009, 2:13:58 AM (11 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/configure.ac
r4029 r4041 49 49 50 50 AC_CHECK_FUNCS(setenv waitpid setrlimit gettimeofday fork kill pipe _pipe) 51 AC_CHECK_FUNCS(open64 __open64 lseek64 __lseek64 mmap64 fopen64 __fopen64 freopen64 __freopen64 dup dup2 f seeko fseeko64 __fseeko64 fsetpos64 __fsetpos64 _IO_getc getline getdelim __getdelim fgetln __srefill __filbuf __srget __uflow 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)51 AC_CHECK_FUNCS(open64 __open64 lseek64 __lseek64 mmap64 fopen64 __fopen64 freopen64 __freopen64 dup dup2 ftello ftello64 __ftello64 fseeko fseeko64 __fseeko64 fsetpos64 __fsetpos64 _IO_getc getline getdelim __getdelim fgetln __srefill __filbuf __srget __uflow 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) 52 52 53 53 AC_CHECK_TYPES(sighandler_t, [], [], -
zzuf/trunk/msvc/config.h
r4031 r4041 43 43 #define HAVE_FSEEKO64 1 44 44 /* #undef HAVE_FSETPOS64 */ 45 /* #undef HAVE_FTELLO */ 46 #define HAVE_FTELLO64 1 45 47 /* #undef HAVE_GETCHAR_UNLOCKED */ 46 48 /* #undef HAVE_GETC_UNLOCKED */ … … 107 109 /* #undef HAVE___FSEEKO64 */ 108 110 /* #undef HAVE___FSETPOS64 */ 111 /* #undef HAVE___FTELLO64 */ 109 112 /* #undef HAVE___GETDELIM */ 110 113 /* #undef HAVE___LSEEK64 */ -
zzuf/trunk/src/lib-stream.c
r4032 r4041 29 29 #elif defined HAVE___FILBUF || defined HAVE___SRGET || defined HAVE___UFLOW 30 30 # define HAVE_BSD_STDIO 31 #endif 32 33 /* Define the best ftell() clone */ 34 #if defined HAVE_FTELLO64 35 # define MYFTELL ftello64 36 #elif defined HAVE___FTELLO64 37 # define MYFTELL __ftello64 38 #elif defined HAVE_FTELLO 39 # define MYFTELL ftello 40 #else 41 # define MYFTELL ftell 31 42 #endif 32 43 … … 296 307 297 308 #if defined HAVE_DARWIN_STDIO /* Don't fuzz or seek if we have __srefill() */ 298 # define FSEEK_FUZZ( myftell)299 #else 300 # define FSEEK_FUZZ( myftell) \309 # define FSEEK_FUZZ() 310 #else 311 # define FSEEK_FUZZ() \ 301 312 if(ret == 0) \ 302 313 { \ … … 305 316 { \ 306 317 case SEEK_END: \ 307 offset = myftell(stream); \318 offset = MYFTELL(stream); \ 308 319 /* fall through */ \ 309 320 case SEEK_SET: \ … … 317 328 #endif 318 329 319 #define FSEEK(myfseek , myftell) \330 #define FSEEK(myfseek) \ 320 331 do \ 321 332 { \ … … 331 342 debug("%s([%i], %lli, %i) = %i", __func__, \ 332 343 fd, (long long int)offset, whence, ret); \ 333 FSEEK_FUZZ( myftell) \344 FSEEK_FUZZ() \ 334 345 DEBUG_STREAM("new", stream); \ 335 346 } while(0) … … 337 348 int NEW(fseek)(FILE *stream, long offset, int whence) 338 349 { 339 int ret; FSEEK(fseek , ftell); return ret;350 int ret; FSEEK(fseek); return ret; 340 351 } 341 352 … … 343 354 int NEW(fseeko)(FILE *stream, off_t offset, int whence) 344 355 { 345 int ret; FSEEK(fseeko , ftello); return ret;356 int ret; FSEEK(fseeko); return ret; 346 357 } 347 358 #endif … … 350 361 int NEW(fseeko64)(FILE *stream, off64_t offset, int whence) 351 362 { 352 int ret; FSEEK(fseeko64 , ftello64); return ret;363 int ret; FSEEK(fseeko64); return ret; 353 364 } 354 365 #endif … … 357 368 int NEW(__fseeko64)(FILE *stream, off64_t offset, int whence) 358 369 { 359 int ret; FSEEK(__fseeko64 , ftello); return ret;370 int ret; FSEEK(__fseeko64); return ret; 360 371 } 361 372 #endif … … 462 473 do \ 463 474 { \ 464 int64_t newpos = ftell(stream); \475 int64_t newpos = MYFTELL(stream); \ 465 476 /* XXX: the number of bytes read is not ret * size, because \ 466 477 * a partial read may have advanced the stream pointer. However, \ … … 515 526 return ORIG(myfread)(ptr, size, nmemb, stream); \ 516 527 DEBUG_STREAM("old", stream); \ 517 oldpos = ftell(stream); \528 oldpos = MYFTELL(stream); \ 518 529 _zz_lock(fd); \ 519 530 ret = ORIG(myfread)(ptr, size, nmemb, stream); \
Note: See TracChangeset
for help on using the changeset viewer.