Changeset 4373 for zzuf


Ignore:
Timestamp:
Feb 27, 2010, 7:17:21 PM (10 years ago)
Author:
Sam Hocevar
Message:

Revert any potential overriding macro before declaring a new function.

Location:
zzuf/trunk/src/libzzuf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/libzzuf/lib-fd.c

    r4372 r4373  
    196196    } while(0)
    197197
     198#undef open
    198199int NEW(open)(const char *file, int oflag, ...)
    199200{
     
    202203
    203204#if defined HAVE_OPEN64
     205#undef open64
    204206int NEW(open64)(const char *file, int oflag, ...)
    205207{
     
    209211
    210212#if defined HAVE___OPEN64
     213#undef __open64
    211214int NEW(__open64)(const char *file, int oflag, ...)
    212215{
     
    216219
    217220#if defined HAVE_DUP
     221#undef dup
    218222int NEW(dup)(int oldfd)
    219223{
     
    237241
    238242#if defined HAVE_DUP2
     243#undef dup2
    239244int NEW(dup2)(int oldfd, int newfd)
    240245{
     
    263268
    264269#if defined HAVE_ACCEPT
     270#undef accept
    265271int NEW(accept)(int sockfd, SOCKADDR_T *addr, SOCKLEN_T *addrlen)
    266272{
     
    329335
    330336#if defined HAVE_BIND
     337#undef bind
    331338int NEW(bind)(int sockfd, const SOCKADDR_T *my_addr, SOCKLEN_T addrlen)
    332339{
     
    336343
    337344#if defined HAVE_CONNECT
     345#undef connect
    338346int NEW(connect)(int sockfd, const SOCKADDR_T *serv_addr,
    339347                 SOCKLEN_T addrlen)
     
    344352
    345353#if defined HAVE_SOCKET
     354#undef socket
    346355int NEW(socket)(int domain, int type, int protocol)
    347356{
     
    390399
    391400#if defined HAVE_RECV
     401#undef recv
    392402RECV_T NEW(recv)(int s, void *buf, size_t len, int flags)
    393403{
     
    397407
    398408#if defined HAVE___RECV_CHK
     409#undef __recv_chk
    399410RECV_T NEW(__recv_chk)(int s, void *buf, size_t len, int flags)
    400411{
     
    436447
    437448#if defined HAVE_RECVFROM
     449#undef recvfrom
    438450RECV_T NEW(recvfrom)(int s, void *buf, size_t len, int flags,
    439451                     SOCKADDR_T *from, SOCKLEN_T *fromlen)
     
    444456
    445457#if defined HAVE___RECVFROM_CHK
     458#undef __recvfrom_chk
    446459RECV_T NEW(__recvfrom_chk)(int s, void *buf, size_t len, int flags,
    447460                           SOCKADDR_T *from, SOCKLEN_T *fromlen)
     
    452465
    453466#if defined HAVE_RECVMSG
     467#undef recvmsg
    454468RECV_T NEW(recvmsg)(int s, struct msghdr *hdr, int flags)
    455469{
     
    496510
    497511#if defined READ_USES_SSIZE_T
     512#undef read
    498513ssize_t NEW(read)(int fd, void *buf, size_t count)
    499514{
     
    501516}
    502517#else
     518#undef read
    503519int NEW(read)(int fd, void *buf, unsigned int count)
    504520{
     
    508524
    509525#if defined HAVE___READ_CHK
     526#undef __read_chk
    510527ssize_t NEW(__read_chk)(int fd, void *buf, size_t count)
    511528{
     
    515532
    516533#if defined HAVE_READV
     534#undef readv
    517535ssize_t NEW(readv)(int fd, const struct iovec *iov, int count)
    518536{
     
    534552
    535553#if defined HAVE_PREAD
     554#undef pread
    536555ssize_t NEW(pread)(int fd, void *buf, size_t count, off_t offset)
    537556{
     
    583602    } while(0)
    584603
     604#undef lseek
    585605off_t NEW(lseek)(int fd, off_t offset, int whence)
    586606{
     
    591611
    592612#if defined HAVE_LSEEK64
     613#undef lseek64
    593614off64_t NEW(lseek64)(int fd, off64_t offset, int whence)
    594615{
     
    598619
    599620#if defined HAVE___LSEEK64
     621#undef __lseek64
    600622off64_t NEW(__lseek64)(int fd, off64_t offset, int whence)
    601623{
     
    605627
    606628#if defined HAVE_AIO_READ
     629#undef aio_read
    607630int NEW(aio_read)(struct aiocb *aiocbp)
    608631{
     
    624647}
    625648
     649#undef aio_return
    626650ssize_t NEW(aio_return)(struct aiocb *aiocbp)
    627651{
     
    653677#endif
    654678
     679#undef close
    655680int NEW(close)(int fd)
    656681{
  • zzuf/trunk/src/libzzuf/lib-mem.c

    r4314 r4373  
    154154}
    155155
     156#undef calloc
    156157void *NEW(calloc)(size_t nmemb, size_t size)
    157158{
     
    177178}
    178179
     180#undef malloc
    179181void *NEW(malloc)(size_t size)
    180182{
     
    198200}
    199201
     202#undef free
    200203void NEW(free)(void *ptr)
    201204{
     
    214217}
    215218
     219#undef realloc
    216220void *NEW(realloc)(void *ptr, size_t size)
    217221{
     
    245249
    246250#if defined HAVE_VALLOC
     251#undef valloc
    247252void *NEW(valloc)(size_t size)
    248253{
     
    258263
    259264#if defined HAVE_MEMALIGN
     265#undef memalign
    260266void *NEW(memalign)(size_t boundary, size_t size)
    261267{
     
    271277
    272278#if defined HAVE_POSIX_MEMALIGN
     279#undef posix_memalign
    273280int NEW(posix_memalign)(void **memptr, size_t alignment, size_t size)
    274281{
     
    340347
    341348#if defined HAVE_MMAP
     349#undef mmap
    342350void *NEW(mmap)(void *start, size_t length, int prot, int flags,
    343351                int fd, off_t offset)
     
    348356
    349357#if defined HAVE_MMAP64
     358#undef mmap64
    350359void *NEW(mmap64)(void *start, size_t length, int prot, int flags,
    351360                  int fd, off64_t offset)
     
    356365
    357366#if defined HAVE_MUNMAP
     367#undef munmap
    358368int NEW(munmap)(void *start, size_t length)
    359369{
     
    379389
    380390#if defined HAVE_MAP_FD
     391#undef map_fd
    381392kern_return_t NEW(map_fd)(int fd, vm_offset_t offset, vm_offset_t *addr,
    382393                          boolean_t find_space, vm_size_t numbytes)
  • zzuf/trunk/src/libzzuf/lib-signal.c

    r4285 r4373  
    9191}
    9292
     93#undef signal
    9394SIG_T NEW(signal)(int signum, SIG_T handler)
    9495{
     
    108109
    109110#if defined HAVE_SIGACTION
     111#undef sigaction
    110112int NEW(sigaction)(int signum, const struct sigaction *act,
    111113                   struct sigaction *oldact)
  • zzuf/trunk/src/libzzuf/lib-stream.c

    r4372 r4373  
    5454
    5555#if defined HAVE___SREFILL
     56#undef __srefill
    5657int NEW(__srefill)(FILE *fp);
    5758#endif
    5859
    5960#if defined HAVE___FILBUF
     61#undef __filbuf
    6062int NEW(__filbuf)(FILE *fp);
    6163#endif
    6264
    6365#if defined HAVE___SRGET && !defined HAVE___SREFILL
     66#undef __srget
    6467int NEW(__srget)(FILE *fp);
    6568#endif
    6669
    6770#if defined HAVE___UFLOW
     71#undef __uflow
    6872int NEW(__uflow)(FILE *fp);
    6973#endif
     
    294298    } while(0)
    295299
     300#undef fopen
    296301FILE *NEW(fopen)(const char *path, const char *mode)
    297302{
     
    300305
    301306#if defined HAVE_FOPEN64
     307#undef fopen64
    302308FILE *NEW(fopen64)(const char *path, const char *mode)
    303309{
     
    307313
    308314#if defined HAVE___FOPEN64
     315#undef __fopen64
    309316FILE *NEW(__fopen64)(const char *path, const char *mode)
    310317{
     
    313320#endif
    314321
     322#undef freopen
    315323FILE *NEW(freopen)(const char *path, const char *mode, FILE *stream)
    316324{
     
    319327
    320328#if defined HAVE_FREOPEN64
     329#undef freopen64
    321330FILE *NEW(freopen64)(const char *path, const char *mode, FILE *stream)
    322331{
     
    326335
    327336#if defined HAVE___FREOPEN64
     337#undef __freopen64
    328338FILE *NEW(__freopen64)(const char *path, const char *mode, FILE *stream)
    329339{
     
    439449    } while(0)
    440450
     451#undef fseek
    441452int NEW(fseek)(FILE *stream, long offset, int whence)
    442453{
     
    445456
    446457#if defined HAVE_FSEEKO
     458#undef fseeko
    447459int NEW(fseeko)(FILE *stream, off_t offset, int whence)
    448460{
     
    452464
    453465#if defined HAVE_FSEEKO64
     466#undef fseeko64
    454467int NEW(fseeko64)(FILE *stream, off64_t offset, int whence)
    455468{
     
    459472
    460473#if defined HAVE___FSEEKO64
     474#undef __fseeko64
    461475int NEW(__fseeko64)(FILE *stream, off64_t offset, int whence)
    462476{
     
    466480
    467481#if defined HAVE_FSETPOS64
     482#undef fsetpos64
    468483int NEW(fsetpos64)(FILE *stream, const fpos64_t *pos)
    469484{
     
    473488
    474489#if defined HAVE___FSETPOS64
     490#undef __fsetpos64
    475491int NEW(__fsetpos64)(FILE *stream, const fpos64_t *pos)
    476492{
     
    479495#endif
    480496
     497#undef rewind
    481498void NEW(rewind)(FILE *stream)
    482499{
     
    539556    } while(0)
    540557
     558#undef fread
    541559size_t NEW(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
    542560{
     
    545563
    546564#if defined HAVE_FREAD_UNLOCKED
    547 #undef fread_unlocked /* can be a macro; we don’t want that */
     565#undef fread_unlocked
    548566size_t NEW(fread_unlocked)(void *ptr, size_t size, size_t nmemb, FILE *stream)
    549567{
     
    619637    } while(0)
    620638
    621 #undef getc /* can be a macro; we don’t want that */
     639#undef getc
    622640int NEW(getc)(FILE *stream)
    623641{
     
    625643}
    626644
    627 #undef getchar /* can be a macro; we don’t want that */
     645#undef getchar
    628646int NEW(getchar)(void)
    629647{
     
    631649}
    632650
     651#undef fgetc
    633652int NEW(fgetc)(FILE *stream)
    634653{
     
    637656
    638657#if defined HAVE__IO_GETC
     658#undef _IO_fgetc
    639659int NEW(_IO_getc)(FILE *stream)
    640660{
     
    644664
    645665#if defined HAVE_GETC_UNLOCKED
    646 #undef getc_unlocked /* can be a macro; we don’t want that */
     666#undef getc_unlocked
    647667int NEW(getc_unlocked)(FILE *stream)
    648668{
     
    652672
    653673#if defined HAVE_GETCHAR_UNLOCKED
    654 #undef getchar_unlocked /* can be a macro; we don’t want that */
     674#undef getchar_unlocked
    655675int NEW(getchar_unlocked)(void)
    656676{
     
    660680
    661681#if defined HAVE_FGETC_UNLOCKED
    662 #undef fgetc_unlocked /* can be a macro; we don’t want that */
     682#undef fgetc_unlocked
    663683int NEW(fgetc_unlocked)(FILE *stream)
    664684{
     
    741761    } while(0)
    742762
     763#undef fgets
    743764char *NEW(fgets)(char *s, int size, FILE *stream)
    744765{
     
    747768
    748769#if defined HAVE_FGETS_UNLOCKED
     770#undef fgets_unlocked
    749771char *NEW(fgets_unlocked)(char *s, int size, FILE *stream)
    750772{
     
    754776
    755777#if defined HAVE___FGETS_CHK
     778#undef __fgets_chk
    756779char *NEW(__fgets_chk)(char *s, int size, FILE *stream)
    757780{
     
    761784
    762785#if defined HAVE___FGETS_UNLOCKED_CHK
     786#undef __fgets_unlocked_chk
    763787char *NEW(__fgets_unlocked_chk)(char *s, int size, FILE *stream)
    764788{
     
    771795 */
    772796
     797#undef ungetc
    773798int NEW(ungetc)(int c, FILE *stream)
    774799{
     
    800825 */
    801826
     827#undef fclose
    802828int NEW(fclose)(FILE *fp)
    803829{
     
    907933
    908934#if defined HAVE_GETLINE
     935#undef getline
    909936ssize_t NEW(getline)(char **lineptr, size_t *n, FILE *stream)
    910937{
     
    914941
    915942#if defined HAVE_GETDELIM
     943#undef getdelim
    916944ssize_t NEW(getdelim)(char **lineptr, size_t *n, int delim, FILE *stream)
    917945{
     
    921949
    922950#if defined HAVE___GETDELIM
     951#undef __getdelim
    923952ssize_t NEW(__getdelim)(char **lineptr, size_t *n, int delim, FILE *stream)
    924953{
     
    932961
    933962#if defined HAVE_FGETLN
     963#undef fgetln
    934964char *NEW(fgetln)(FILE *stream, size_t *len)
    935965{
     
    10711101
    10721102#if defined HAVE___SREFILL
     1103#undef __srefill
    10731104int NEW(__srefill)(FILE *fp)
    10741105{
     
    10781109
    10791110#if defined HAVE___SRGET && !defined HAVE___SREFILL
     1111#undef __srget
    10801112int NEW(__srget)(FILE *fp)
    10811113{
     
    10851117
    10861118#if defined HAVE___FILBUF
     1119#undef __filbuf
    10871120int NEW(__filbuf)(FILE *fp)
    10881121{
     
    10921125
    10931126#if defined HAVE___UFLOW
     1127#undef __uflow
    10941128int NEW(__uflow)(FILE *fp)
    10951129{
Note: See TracChangeset for help on using the changeset viewer.