[Libsysio-commit] strided-io: libsysio/src access.c chdir.c chmod.c chown.c dup.c fcntl.c getdirentr
Brought to you by:
lward
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26398/src Modified Files: Tag: strided-io access.c chdir.c chmod.c chown.c dup.c fcntl.c getdirentries.c ioctl.c link.c lseek.c mkdir.c mknod.c open.c rmdir.c stat.c statvfs.c statvfs64.c symlink.c unlink.c Log Message: Merged with head, again, after adding Kevin Pedretti's patches. This did not go cleanly. Some remedial testing indicates no problem but... Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -u -w -b -B -p -r1.2 -r1.2.12.1 --- access.c 6 Aug 2003 19:10:26 -0000 1.2 +++ access.c 26 Jan 2004 17:22:06 -0000 1.2.12.1 @@ -47,6 +47,8 @@ #include <sys/stat.h> #include <unistd.h> +#include "sysio-symbols.h" + int access(const char *path, int amode) { @@ -108,3 +110,8 @@ out: return err; } + +#ifdef REDSTORM +#undef __access +sysio_sym_weak_alias(access, __access) +#endif Index: chdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v retrieving revision 1.10.6.1 retrieving revision 1.10.6.2 diff -u -w -b -B -p -r1.10.6.1 -r1.10.6.2 --- chdir.c 26 Jan 2004 16:27:47 -0000 1.10.6.1 +++ chdir.c 26 Jan 2004 17:22:06 -0000 1.10.6.2 @@ -140,6 +139,11 @@ chdir(const char *path) * If the buf pointer is NULL, a buffer large enough to hold the path * is allocated from the heap. */ +#ifdef REDSTORM +#undef __chdir +sysio_sym_weak_alias(chdir, __chdir) +#endif + static int _sysio_p_path(struct pnode *pno, char **buf, size_t size) { @@ -240,7 +244,7 @@ getcwd(char *buf, size_t size) sysio_sym_weak_alias(getcwd, __getcwd) #endif -#ifdef PATH_MAX +#if defined(PATH_MAX) && !(defined(REDSTORM)) char * getwd(char *buf) { Index: chmod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chmod.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- chmod.c 26 Jan 2004 16:27:47 -0000 1.4.6.1 +++ chmod.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -52,6 +52,7 @@ #include "sysio.h" #include "inode.h" #include "file.h" +#include "sysio-symbols.h" static int do_chmod(struct pnode *pno, struct inode *ino, mode_t mode) @@ -88,6 +89,11 @@ out: return err; } +#ifdef REDSTORM +#undef __chmod +sysio_sym_weak_alias(chmod, __chmod) +#endif + int fchmod(int fd, mode_t mode) { @@ -109,3 +115,8 @@ out: } return err; } + +#ifdef REDSTORM +#undef __fchmod +sysio_sym_weak_alias(fchmod, __fchmod) +#endif Index: chown.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chown.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- chown.c 26 Jan 2004 16:27:47 -0000 1.4.6.1 +++ chown.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -52,6 +52,7 @@ #include "sysio.h" #include "inode.h" #include "file.h" +#include "sysio-symbols.h" static int _do_chown(struct pnode *pno, struct inode *ino, uid_t owner, gid_t group) @@ -94,6 +95,11 @@ out: } SYSIO_LEAVE; return err; +#ifdef REDSTORM +#undef __chown +sysio_sym_weak_alias(chown, __chown) +#endif + } int @@ -115,5 +121,10 @@ out: errno = -err; err = -1; } + +#ifdef REDSTORM +#undef __fchown +sysio_sym_weak_alias(fchown, __fchown) +#endif return err; } Index: dup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v retrieving revision 1.2.6.1 retrieving revision 1.2.6.2 diff -u -w -b -B -p -r1.2.6.1 -r1.2.6.2 --- dup.c 26 Jan 2004 16:27:47 -0000 1.2.6.1 +++ dup.c 26 Jan 2004 17:22:06 -0000 1.2.6.2 @@ -48,6 +48,7 @@ #include "sysio.h" #include "file.h" +#include "sysio-symbols.h" #include "sysio-symbols.h" @@ -78,6 +78,11 @@ dup2(int oldfd, int newfd) return rc; } +#ifdef REDSTORM +#undef __dup2 +sysio_sym_weak_alias(dup2, __dup2) +#endif + int dup(int oldfd) { Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.6.6.1 retrieving revision 1.6.6.2 diff -u -w -b -B -p -r1.6.6.1 -r1.6.6.2 --- fcntl.c 26 Jan 2004 16:27:47 -0000 1.6.6.1 +++ fcntl.c 26 Jan 2004 17:22:06 -0000 1.6.6.2 @@ -109,7 +109,7 @@ out: sysio_sym_weak_alias(fcntl, __fcntl) #endif -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _fcntl sysio_sym_weak_alias(fcntl, _fcntl) #endif Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- getdirentries.c 26 Jan 2004 16:27:47 -0000 1.4.6.1 +++ getdirentries.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -103,11 +103,15 @@ getdirentries(int fd, #define _dreclen(namlen) \ ((_dbaselen + (namlen) + __alignof__ (struct dirent)) & \ ~(__alignof__ (struct dirent) - 1)) -#define _fast_alloc(n) alloca(n) -#define _fast_free(p) #else /* !defined(__GLIBC__) */ #define _dreclen(namlen) \ _rndup(_dbaselen + (namlen) + 1, sizeof(int)) +#endif + +#if defined(__GLIBC__) && !(defined(REDSTORM)) +#define _fast_alloc(n) alloca(n) +#define _fast_free(p) +#else /* !defined(__GLIBC__) || defined(REDSTORM) */ #define _fast_alloc(n) malloc(n) #define _fast_free(p) free(p) #endif @@ -226,6 +230,10 @@ out: sysio_sym_strong_alias(_getdirentries64, getdirentries) #endif +#ifdef REDSTORM +#undef __getdirentries +sysio_sym_weak_alias(getdirentries, __getdirentries) +#endif #if defined(BSD) || defined(REDSTORM) #undef _getdirentries sysio_sym_weak_alias(getdirentries, _getdirentries) Index: ioctl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- ioctl.c 26 Jan 2004 16:27:48 -0000 1.4.6.1 +++ ioctl.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -86,7 +86,7 @@ out: sysio_sym_weak_alias(ioctl, __ioctl) #endif -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _ioctl sysio_sym_weak_alias(ioctl, _ioctl) #endif Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -u -w -b -B -p -r1.2 -r1.2.8.1 --- link.c 20 Oct 2003 16:31:23 -0000 1.2 +++ link.c 26 Jan 2004 17:22:06 -0000 1.2.8.1 @@ -52,6 +52,7 @@ #include "sysio.h" #include "mount.h" #include "inode.h" +#include "sysio-symbols.h" int link(const char *oldpath, const char *newpath) @@ -100,3 +101,8 @@ error2: out: return err; } + +#ifdef REDSTORM +#undef __link +sysio_sym_weak_alias(link, __link) +#endif Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.9.6.3 retrieving revision 1.9.6.4 diff -u -w -b -B -p -r1.9.6.3 -r1.9.6.4 --- lseek.c 26 Jan 2004 16:27:48 -0000 1.9.6.3 +++ lseek.c 26 Jan 2004 17:22:06 -0000 1.9.6.4 @@ -110,6 +110,10 @@ sysio_sym_weak_alias(_sysio_lseek, lseek #undef __lseek64 sysio_sym_weak_alias(_sysio_lseek, __lseek64) #endif +#ifdef REDSTORM +#undef __libc_lseek64 +sysio_sym_weak_alias(_sysio_lseek, __libc_lseek64) +#endif #endif #undef lseek Index: mkdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mkdir.c,v retrieving revision 1.3.16.1 retrieving revision 1.3.16.2 diff -u -w -b -B -p -r1.3.16.1 -r1.3.16.2 --- mkdir.c 26 Jan 2004 16:27:48 -0000 1.3.16.1 +++ mkdir.c 26 Jan 2004 17:22:06 -0000 1.3.16.2 @@ -51,6 +51,7 @@ #include "inode.h" #include "fs.h" #include "mount.h" +#include "sysio-symbols.h" int mkdir(const char *path, mode_t mode) @@ -85,3 +86,8 @@ out: SYSIO_LEAVE; return err; } + +#ifdef REDSTORM +#undef __mkdir +sysio_sym_weak_alias(mkdir, __mkdir) +#endif Index: mknod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mknod.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- mknod.c 26 Jan 2004 16:27:48 -0000 1.4.6.1 +++ mknod.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -111,6 +111,11 @@ out: } return err; } +#ifdef REDSTORM +#undef _xmknod +sysio_sym_weak_alias(__xmknod, _xmknod) +#endif + static int __mknod(const char *path, mode_t mode, dev_t dev) Index: open.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/open.c,v retrieving revision 1.11.6.1 retrieving revision 1.11.6.2 diff -u -w -b -B -p -r1.11.6.1 -r1.11.6.2 --- open.c 26 Jan 2004 16:27:48 -0000 1.11.6.1 +++ open.c 26 Jan 2004 17:22:06 -0000 1.11.6.2 @@ -220,7 +220,12 @@ sysio_sym_weak_alias(open, open64) sysio_sym_weak_alias(open, __open64) #endif -#if defined(BSD) || defined(REDSTORM) +#ifdef REDSTORM +#undef __libc_open64 +sysio_sym_weak_alias(open, __libc_open64) +#endif + +#ifdef BSD #undef _open sysio_sym_weak_alias(open, _open) #endif @@ -243,7 +248,7 @@ close(int fd) sysio_sym_weak_alias(close, __close) #endif -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _close sysio_sym_weak_alias(close, _close) #endif @@ -264,7 +269,12 @@ sysio_sym_weak_alias(creat, creat64) sysio_sym_weak_alias(creat, __creat64) #endif -#if defined(BSD) || defined(REDSTORM) +#ifdef REDSTORM +#undef __libc_creat +sysio_sym_weak_alias(creat, __libc_creat) +#endif + +#ifdef BSD #undef _creat sysio_sym_weak_alias(creat, _creat) #endif @@ -278,3 +288,8 @@ umask(mode_t mask) _sysio_umask = mask & 0777; return omask; } + +#ifdef REDSTORM +#undef __umask +sysio_sym_weak_alias(umask, __umask) +#endif Index: rmdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rmdir.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- rmdir.c 26 Jan 2004 16:27:48 -0000 1.4.6.1 +++ rmdir.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -51,6 +51,7 @@ #include "inode.h" #include "fs.h" #include "mount.h" +#include "sysio-symbols.h" int rmdir(const char *path) @@ -86,3 +88,8 @@ out: SYSIO_LEAVE; return err; } + +#ifdef REDSTORM +#undef __rmdir +sysio_sym_weak_alias(rmdir, __rmdir) +#endif Index: stat.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/stat.c,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -u -w -b -B -p -r1.7.6.1 -r1.7.6.2 --- stat.c 26 Jan 2004 16:27:48 -0000 1.7.6.1 +++ stat.c 26 Jan 2004 17:22:06 -0000 1.7.6.2 @@ -99,6 +99,11 @@ __fxstat(int __ver, int __fildes, struct if (__ver != _STAT_VER) { err = -ENOSYS; +#ifdef REDSTORM +#undef _fxstat +sysio_sym_weak_alias(__fxstat, _fxstat) +#endif + goto out; } @@ -140,7 +145,7 @@ __fstat(int fd, struct stat *buf) sysio_sym_weak_alias(__fstat, fstat) -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _fstat sysio_sym_weak_alias(__fstat, _fstat) #endif @@ -176,6 +181,11 @@ __xstat(int __ver, const char *__filenam ino->i_ops.inop_getattr(pno, pno->p_base->pb_ino, buf); +#ifdef REDSTORM +#undef _xstat +sysio_sym_weak_alias(__xstat, _xstat) +#endif + P_RELE(pno); #if _LARGEFILE64_SOURCE convstat(buf, __stat_buf); @@ -202,7 +212,7 @@ __stat(const char *filename, struct stat sysio_sym_weak_alias(__stat, stat) -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _stat sysio_sym_weak_alias(__stat, _stat) #endif @@ -238,6 +248,11 @@ __lxstat(int __ver, const char *__filena ino->i_ops.inop_getattr(pno, pno->p_base->pb_ino, buf); +#ifdef REDSTORM +#undef _lxstat +sysio_sym_weak_alias(__lxstat, _lxstat) +#endif + P_RELE(pno); #if _LARGEFILE64_SOURCE convstat(buf, __stat_buf); @@ -264,7 +279,7 @@ __lstat(const char *filename, struct sta sysio_sym_weak_alias(__lstat, lstat) -#if defined(BSD) || defined(REDSTORM) +#ifdef BSD #undef _lstat sysio_sym_weak_alias(__lstat, _lstat) #endif Index: statvfs.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -w -b -B -p -r1.4.6.1 -r1.4.6.2 --- statvfs.c 26 Jan 2004 16:27:48 -0000 1.4.6.1 +++ statvfs.c 26 Jan 2004 17:22:06 -0000 1.4.6.2 @@ -43,7 +43,7 @@ #ifdef _HAVE_STATVFS -#if !(defined(BSD) || defined(REDSTORM)) +#ifndef BSD #include <unistd.h> #include <errno.h> @@ -55,6 +55,7 @@ #include "sysio.h" #include "inode.h" #include "file.h" +#include "sysio-symbols.h" #undef statvfs #undef fstatvfs @@ -108,6 +109,11 @@ err: out: SYSIO_LEAVE; return err; +#ifdef REDSTORM +#undef __statvfs +sysio_sym_weak_alias(statvfs, __statvfs) +#endif + } int @@ -144,5 +150,11 @@ out: SYSIO_LEAVE; return err; } -#endif /* if !(defined(BSD) || defined(REDSTORM)) */ + +#ifdef REDSTORM +#undef __fstatvfs +sysio_sym_weak_alias(fstatvfs, __fstatvfs) +#endif + +#endif /* ifndef BSD */ #endif /* defined(_HAVE_STATVFS) */ Index: statvfs64.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/statvfs64.c,v retrieving revision 1.5.6.1 retrieving revision 1.5.6.2 diff -u -w -b -B -p -r1.5.6.1 -r1.5.6.2 --- statvfs64.c 26 Jan 2004 16:27:48 -0000 1.5.6.1 +++ statvfs64.c 26 Jan 2004 17:22:06 -0000 1.5.6.2 @@ -43,7 +43,7 @@ #ifdef _HAVE_STATVFS -#if !(defined(BSD) || defined(REDSTORM)) +#ifndef BSD #include <unistd.h> #include <errno.h> #include <assert.h> @@ -54,6 +54,7 @@ #include "sysio.h" #include "inode.h" #include "file.h" +#include "sysio-symbols.h" int statvfs64(const char *path, struct statvfs64 *buf) @@ -78,6 +79,11 @@ out: return err; } +#ifdef REDSTORM +#undef __statvfs64 +sysio_sym_weak_alias(statvfs64, __statvfs64) +#endif + int fstatvfs64(int fd, struct statvfs64 *buf) { @@ -102,5 +108,11 @@ out: SYSIO_LEAVE; return err; } -#endif /* if !(defined(BSD) || defined(REDSTORM)) */ + +#ifdef REDSTORM +#undef __fstatvfs64 +sysio_sym_weak_alias(fstatvfs64, __fstatvfs64) +#endif + +#endif /* ifndef BSD */ #endif /* define(_HAVE_STATVFS) */ Index: symlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/symlink.c,v retrieving revision 1.3.16.1 retrieving revision 1.3.16.2 diff -u -w -b -B -p -r1.3.16.1 -r1.3.16.2 --- symlink.c 26 Jan 2004 16:27:48 -0000 1.3.16.1 +++ symlink.c 26 Jan 2004 17:22:06 -0000 1.3.16.2 @@ -51,6 +51,7 @@ #include "inode.h" #include "fs.h" #include "mount.h" +#include "sysio-symbols.h" int symlink(const char *oldpath, const char *newpath) @@ -85,3 +86,8 @@ out: SYSIO_LEAVE; return err; } + +#ifdef REDSTORM +#undef __symlink +sysio_sym_weak_alias(symlink, __symlink) +#endif Index: unlink.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/unlink.c,v retrieving revision 1.5.6.1 retrieving revision 1.5.6.2 diff -u -w -b -B -p -r1.5.6.1 -r1.5.6.2 --- unlink.c 26 Jan 2004 16:27:48 -0000 1.5.6.1 +++ unlink.c 26 Jan 2004 17:22:06 -0000 1.5.6.2 @@ -51,6 +51,7 @@ #include "inode.h" #include "fs.h" #include "mount.h" +#include "sysio-symbols.h" int unlink(const char *path) @@ -86,3 +87,8 @@ out: SYSIO_LEAVE; return err; } + +#ifdef REDSTORM +#undef __unlink +sysio_sym_weak_alias(unlink, __unlink) +#endif |