Changeset 4373
- Timestamp:
- Feb 27, 2010, 7:17:21 PM (11 years ago)
- Location:
- zzuf/trunk/src/libzzuf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/src/libzzuf/lib-fd.c
r4372 r4373 196 196 } while(0) 197 197 198 #undef open 198 199 int NEW(open)(const char *file, int oflag, ...) 199 200 { … … 202 203 203 204 #if defined HAVE_OPEN64 205 #undef open64 204 206 int NEW(open64)(const char *file, int oflag, ...) 205 207 { … … 209 211 210 212 #if defined HAVE___OPEN64 213 #undef __open64 211 214 int NEW(__open64)(const char *file, int oflag, ...) 212 215 { … … 216 219 217 220 #if defined HAVE_DUP 221 #undef dup 218 222 int NEW(dup)(int oldfd) 219 223 { … … 237 241 238 242 #if defined HAVE_DUP2 243 #undef dup2 239 244 int NEW(dup2)(int oldfd, int newfd) 240 245 { … … 263 268 264 269 #if defined HAVE_ACCEPT 270 #undef accept 265 271 int NEW(accept)(int sockfd, SOCKADDR_T *addr, SOCKLEN_T *addrlen) 266 272 { … … 329 335 330 336 #if defined HAVE_BIND 337 #undef bind 331 338 int NEW(bind)(int sockfd, const SOCKADDR_T *my_addr, SOCKLEN_T addrlen) 332 339 { … … 336 343 337 344 #if defined HAVE_CONNECT 345 #undef connect 338 346 int NEW(connect)(int sockfd, const SOCKADDR_T *serv_addr, 339 347 SOCKLEN_T addrlen) … … 344 352 345 353 #if defined HAVE_SOCKET 354 #undef socket 346 355 int NEW(socket)(int domain, int type, int protocol) 347 356 { … … 390 399 391 400 #if defined HAVE_RECV 401 #undef recv 392 402 RECV_T NEW(recv)(int s, void *buf, size_t len, int flags) 393 403 { … … 397 407 398 408 #if defined HAVE___RECV_CHK 409 #undef __recv_chk 399 410 RECV_T NEW(__recv_chk)(int s, void *buf, size_t len, int flags) 400 411 { … … 436 447 437 448 #if defined HAVE_RECVFROM 449 #undef recvfrom 438 450 RECV_T NEW(recvfrom)(int s, void *buf, size_t len, int flags, 439 451 SOCKADDR_T *from, SOCKLEN_T *fromlen) … … 444 456 445 457 #if defined HAVE___RECVFROM_CHK 458 #undef __recvfrom_chk 446 459 RECV_T NEW(__recvfrom_chk)(int s, void *buf, size_t len, int flags, 447 460 SOCKADDR_T *from, SOCKLEN_T *fromlen) … … 452 465 453 466 #if defined HAVE_RECVMSG 467 #undef recvmsg 454 468 RECV_T NEW(recvmsg)(int s, struct msghdr *hdr, int flags) 455 469 { … … 496 510 497 511 #if defined READ_USES_SSIZE_T 512 #undef read 498 513 ssize_t NEW(read)(int fd, void *buf, size_t count) 499 514 { … … 501 516 } 502 517 #else 518 #undef read 503 519 int NEW(read)(int fd, void *buf, unsigned int count) 504 520 { … … 508 524 509 525 #if defined HAVE___READ_CHK 526 #undef __read_chk 510 527 ssize_t NEW(__read_chk)(int fd, void *buf, size_t count) 511 528 { … … 515 532 516 533 #if defined HAVE_READV 534 #undef readv 517 535 ssize_t NEW(readv)(int fd, const struct iovec *iov, int count) 518 536 { … … 534 552 535 553 #if defined HAVE_PREAD 554 #undef pread 536 555 ssize_t NEW(pread)(int fd, void *buf, size_t count, off_t offset) 537 556 { … … 583 602 } while(0) 584 603 604 #undef lseek 585 605 off_t NEW(lseek)(int fd, off_t offset, int whence) 586 606 { … … 591 611 592 612 #if defined HAVE_LSEEK64 613 #undef lseek64 593 614 off64_t NEW(lseek64)(int fd, off64_t offset, int whence) 594 615 { … … 598 619 599 620 #if defined HAVE___LSEEK64 621 #undef __lseek64 600 622 off64_t NEW(__lseek64)(int fd, off64_t offset, int whence) 601 623 { … … 605 627 606 628 #if defined HAVE_AIO_READ 629 #undef aio_read 607 630 int NEW(aio_read)(struct aiocb *aiocbp) 608 631 { … … 624 647 } 625 648 649 #undef aio_return 626 650 ssize_t NEW(aio_return)(struct aiocb *aiocbp) 627 651 { … … 653 677 #endif 654 678 679 #undef close 655 680 int NEW(close)(int fd) 656 681 { -
zzuf/trunk/src/libzzuf/lib-mem.c
r4314 r4373 154 154 } 155 155 156 #undef calloc 156 157 void *NEW(calloc)(size_t nmemb, size_t size) 157 158 { … … 177 178 } 178 179 180 #undef malloc 179 181 void *NEW(malloc)(size_t size) 180 182 { … … 198 200 } 199 201 202 #undef free 200 203 void NEW(free)(void *ptr) 201 204 { … … 214 217 } 215 218 219 #undef realloc 216 220 void *NEW(realloc)(void *ptr, size_t size) 217 221 { … … 245 249 246 250 #if defined HAVE_VALLOC 251 #undef valloc 247 252 void *NEW(valloc)(size_t size) 248 253 { … … 258 263 259 264 #if defined HAVE_MEMALIGN 265 #undef memalign 260 266 void *NEW(memalign)(size_t boundary, size_t size) 261 267 { … … 271 277 272 278 #if defined HAVE_POSIX_MEMALIGN 279 #undef posix_memalign 273 280 int NEW(posix_memalign)(void **memptr, size_t alignment, size_t size) 274 281 { … … 340 347 341 348 #if defined HAVE_MMAP 349 #undef mmap 342 350 void *NEW(mmap)(void *start, size_t length, int prot, int flags, 343 351 int fd, off_t offset) … … 348 356 349 357 #if defined HAVE_MMAP64 358 #undef mmap64 350 359 void *NEW(mmap64)(void *start, size_t length, int prot, int flags, 351 360 int fd, off64_t offset) … … 356 365 357 366 #if defined HAVE_MUNMAP 367 #undef munmap 358 368 int NEW(munmap)(void *start, size_t length) 359 369 { … … 379 389 380 390 #if defined HAVE_MAP_FD 391 #undef map_fd 381 392 kern_return_t NEW(map_fd)(int fd, vm_offset_t offset, vm_offset_t *addr, 382 393 boolean_t find_space, vm_size_t numbytes) -
zzuf/trunk/src/libzzuf/lib-signal.c
r4285 r4373 91 91 } 92 92 93 #undef signal 93 94 SIG_T NEW(signal)(int signum, SIG_T handler) 94 95 { … … 108 109 109 110 #if defined HAVE_SIGACTION 111 #undef sigaction 110 112 int NEW(sigaction)(int signum, const struct sigaction *act, 111 113 struct sigaction *oldact) -
zzuf/trunk/src/libzzuf/lib-stream.c
r4372 r4373 54 54 55 55 #if defined HAVE___SREFILL 56 #undef __srefill 56 57 int NEW(__srefill)(FILE *fp); 57 58 #endif 58 59 59 60 #if defined HAVE___FILBUF 61 #undef __filbuf 60 62 int NEW(__filbuf)(FILE *fp); 61 63 #endif 62 64 63 65 #if defined HAVE___SRGET && !defined HAVE___SREFILL 66 #undef __srget 64 67 int NEW(__srget)(FILE *fp); 65 68 #endif 66 69 67 70 #if defined HAVE___UFLOW 71 #undef __uflow 68 72 int NEW(__uflow)(FILE *fp); 69 73 #endif … … 294 298 } while(0) 295 299 300 #undef fopen 296 301 FILE *NEW(fopen)(const char *path, const char *mode) 297 302 { … … 300 305 301 306 #if defined HAVE_FOPEN64 307 #undef fopen64 302 308 FILE *NEW(fopen64)(const char *path, const char *mode) 303 309 { … … 307 313 308 314 #if defined HAVE___FOPEN64 315 #undef __fopen64 309 316 FILE *NEW(__fopen64)(const char *path, const char *mode) 310 317 { … … 313 320 #endif 314 321 322 #undef freopen 315 323 FILE *NEW(freopen)(const char *path, const char *mode, FILE *stream) 316 324 { … … 319 327 320 328 #if defined HAVE_FREOPEN64 329 #undef freopen64 321 330 FILE *NEW(freopen64)(const char *path, const char *mode, FILE *stream) 322 331 { … … 326 335 327 336 #if defined HAVE___FREOPEN64 337 #undef __freopen64 328 338 FILE *NEW(__freopen64)(const char *path, const char *mode, FILE *stream) 329 339 { … … 439 449 } while(0) 440 450 451 #undef fseek 441 452 int NEW(fseek)(FILE *stream, long offset, int whence) 442 453 { … … 445 456 446 457 #if defined HAVE_FSEEKO 458 #undef fseeko 447 459 int NEW(fseeko)(FILE *stream, off_t offset, int whence) 448 460 { … … 452 464 453 465 #if defined HAVE_FSEEKO64 466 #undef fseeko64 454 467 int NEW(fseeko64)(FILE *stream, off64_t offset, int whence) 455 468 { … … 459 472 460 473 #if defined HAVE___FSEEKO64 474 #undef __fseeko64 461 475 int NEW(__fseeko64)(FILE *stream, off64_t offset, int whence) 462 476 { … … 466 480 467 481 #if defined HAVE_FSETPOS64 482 #undef fsetpos64 468 483 int NEW(fsetpos64)(FILE *stream, const fpos64_t *pos) 469 484 { … … 473 488 474 489 #if defined HAVE___FSETPOS64 490 #undef __fsetpos64 475 491 int NEW(__fsetpos64)(FILE *stream, const fpos64_t *pos) 476 492 { … … 479 495 #endif 480 496 497 #undef rewind 481 498 void NEW(rewind)(FILE *stream) 482 499 { … … 539 556 } while(0) 540 557 558 #undef fread 541 559 size_t NEW(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream) 542 560 { … … 545 563 546 564 #if defined HAVE_FREAD_UNLOCKED 547 #undef fread_unlocked /* can be a macro; we don’t want that */565 #undef fread_unlocked 548 566 size_t NEW(fread_unlocked)(void *ptr, size_t size, size_t nmemb, FILE *stream) 549 567 { … … 619 637 } while(0) 620 638 621 #undef getc /* can be a macro; we don’t want that */639 #undef getc 622 640 int NEW(getc)(FILE *stream) 623 641 { … … 625 643 } 626 644 627 #undef getchar /* can be a macro; we don’t want that */645 #undef getchar 628 646 int NEW(getchar)(void) 629 647 { … … 631 649 } 632 650 651 #undef fgetc 633 652 int NEW(fgetc)(FILE *stream) 634 653 { … … 637 656 638 657 #if defined HAVE__IO_GETC 658 #undef _IO_fgetc 639 659 int NEW(_IO_getc)(FILE *stream) 640 660 { … … 644 664 645 665 #if defined HAVE_GETC_UNLOCKED 646 #undef getc_unlocked /* can be a macro; we don’t want that */666 #undef getc_unlocked 647 667 int NEW(getc_unlocked)(FILE *stream) 648 668 { … … 652 672 653 673 #if defined HAVE_GETCHAR_UNLOCKED 654 #undef getchar_unlocked /* can be a macro; we don’t want that */674 #undef getchar_unlocked 655 675 int NEW(getchar_unlocked)(void) 656 676 { … … 660 680 661 681 #if defined HAVE_FGETC_UNLOCKED 662 #undef fgetc_unlocked /* can be a macro; we don’t want that */682 #undef fgetc_unlocked 663 683 int NEW(fgetc_unlocked)(FILE *stream) 664 684 { … … 741 761 } while(0) 742 762 763 #undef fgets 743 764 char *NEW(fgets)(char *s, int size, FILE *stream) 744 765 { … … 747 768 748 769 #if defined HAVE_FGETS_UNLOCKED 770 #undef fgets_unlocked 749 771 char *NEW(fgets_unlocked)(char *s, int size, FILE *stream) 750 772 { … … 754 776 755 777 #if defined HAVE___FGETS_CHK 778 #undef __fgets_chk 756 779 char *NEW(__fgets_chk)(char *s, int size, FILE *stream) 757 780 { … … 761 784 762 785 #if defined HAVE___FGETS_UNLOCKED_CHK 786 #undef __fgets_unlocked_chk 763 787 char *NEW(__fgets_unlocked_chk)(char *s, int size, FILE *stream) 764 788 { … … 771 795 */ 772 796 797 #undef ungetc 773 798 int NEW(ungetc)(int c, FILE *stream) 774 799 { … … 800 825 */ 801 826 827 #undef fclose 802 828 int NEW(fclose)(FILE *fp) 803 829 { … … 907 933 908 934 #if defined HAVE_GETLINE 935 #undef getline 909 936 ssize_t NEW(getline)(char **lineptr, size_t *n, FILE *stream) 910 937 { … … 914 941 915 942 #if defined HAVE_GETDELIM 943 #undef getdelim 916 944 ssize_t NEW(getdelim)(char **lineptr, size_t *n, int delim, FILE *stream) 917 945 { … … 921 949 922 950 #if defined HAVE___GETDELIM 951 #undef __getdelim 923 952 ssize_t NEW(__getdelim)(char **lineptr, size_t *n, int delim, FILE *stream) 924 953 { … … 932 961 933 962 #if defined HAVE_FGETLN 963 #undef fgetln 934 964 char *NEW(fgetln)(FILE *stream, size_t *len) 935 965 { … … 1071 1101 1072 1102 #if defined HAVE___SREFILL 1103 #undef __srefill 1073 1104 int NEW(__srefill)(FILE *fp) 1074 1105 { … … 1078 1109 1079 1110 #if defined HAVE___SRGET && !defined HAVE___SREFILL 1111 #undef __srget 1080 1112 int NEW(__srget)(FILE *fp) 1081 1113 { … … 1085 1117 1086 1118 #if defined HAVE___FILBUF 1119 #undef __filbuf 1087 1120 int NEW(__filbuf)(FILE *fp) 1088 1121 { … … 1092 1125 1093 1126 #if defined HAVE___UFLOW 1127 #undef __uflow 1094 1128 int NEW(__uflow)(FILE *fp) 1095 1129 {
Note: See TracChangeset
for help on using the changeset viewer.