[Libsysio-commit] HEAD: libsysio/src rw.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-04-30 19:36:47
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11167 Modified Files: rw.c Log Message: Added the internal glibc names for {p}{read,write}{v}. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -b -B -p -r1.18 -r1.19 --- rw.c 30 Apr 2007 16:52:20 -0000 1.18 +++ rw.c 30 Apr 2007 19:36:44 -0000 1.19 @@ -787,6 +787,15 @@ SYSIO_INTERFACE_NAME(pread64)(int fd, vo return _do_pio(fd, _do_ireadx, buf, count, offset); } +#if defined(__GLIBC__) +#undef __pread64 +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pread64), + PREPEND(__, SYSIO_INTERFACE_NAME(pread64))) +#undef __libc_pread64 +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pread64), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_pread64))) +#endif + ssize_t SYSIO_INTERFACE_NAME(pwrite64)(int fd, const void *buf, size_t count, @@ -795,6 +804,15 @@ SYSIO_INTERFACE_NAME(pwrite64)(int fd, return _do_pio(fd, _do_iwritex, (void *)buf, count, offset); } + +#if defined(__GLIBC__) +#undef __pwrite64 +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pwrite64), + PREPEND(__, SYSIO_INTERFACE_NAME(pwrite64))) +#undef __libc_pwrite64 +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pwrite64), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_pwrite64))) +#endif /* defined(__GLIBC__) */ #endif ssize_t @@ -807,6 +825,15 @@ SYSIO_INTERFACE_NAME(pread)(int fd, return _do_pio(fd, _do_ireadx, buf, count, offset); } +#if defined(__GLIBC__) +#undef __pread +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pread), + PREPEND(__, SYSIO_INTERFACE_NAME(pread))) +#undef __libc_pread +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pread), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_pread))) +#endif /* defined(__GLIBC__) */ + ssize_t SYSIO_INTERFACE_NAME(pwrite)(int fd, const void *buf, @@ -817,6 +844,15 @@ SYSIO_INTERFACE_NAME(pwrite)(int fd, return _do_pio(fd, _do_iwritex, (void *)buf, count, offset); } +#if defined(__GLIBC__) +#undef __pwrite +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pwrite), + PREPEND(__, SYSIO_INTERFACE_NAME(pwrite))) +#undef __libc_pwrite +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(pwrite), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_pwrite))) +#endif /* defined(__GLIBC__) */ + /* * Post asynch IO using fildes and iovec. */ @@ -919,6 +955,15 @@ SYSIO_INTERFACE_NAME(readv)(int fd, cons return _do_iov(fd, SYSIO_INTERFACE_NAME(ireadv), iov, count); } +#if defined(__GLIBC__) +#undef __readv +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(readv), + PREPEND(__, SYSIO_INTERFACE_NAME(readv))) +#undef __libc_readv +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(readv), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_readv))) +#endif + ssize_t SYSIO_INTERFACE_NAME(writev)(int fd, const struct iovec *iov, int count) { @@ -926,6 +971,15 @@ SYSIO_INTERFACE_NAME(writev)(int fd, con return _do_iov(fd, SYSIO_INTERFACE_NAME(iwritev), iov, count); } +#if defined(__GLIBC__) +#undef __writev +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(writev), + PREPEND(__, SYSIO_INTERFACE_NAME(writev))) +#undef __libc_writev +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(writev), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_writev))) +#endif + /* * Post asynch IO using fildes. */ @@ -984,6 +1038,15 @@ SYSIO_INTERFACE_NAME(read)(int fd, void return _do_io(fd, SYSIO_INTERFACE_NAME(iread), buf, count); } +#if defined(__GLIBC__) +#undef __read +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(read), + PREPEND(__, SYSIO_INTERFACE_NAME(read))) +#undef __libc_read +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(read), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_read))) +#endif + ssize_t SYSIO_INTERFACE_NAME(write)(int fd, const void *buf, size_t count) { @@ -994,3 +1057,12 @@ SYSIO_INTERFACE_NAME(write)(int fd, cons size_t))SYSIO_INTERFACE_NAME(iwrite), (void *)buf, count); } + +#if defined(__GLIBC__) +#undef __write +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(write), + PREPEND(__, SYSIO_INTERFACE_NAME(write))) +#undef __libc_write +sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(write), + PREPEND(__, SYSIO_INTERFACE_NAME(libc_write))) +#endif |