diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-05 12:17:01 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-05 12:17:01 +0000 |
commit | bfaff8ed1a3899c9aef7eaa2421d3d6467343ea1 (patch) | |
tree | b8613065fc41cf94769d1950f30cd9756855048f /source3/smbwrapper | |
parent | f151bf0694cd41bab2ed8a4ff260ff84f714ec5c (diff) | |
download | samba-bfaff8ed1a3899c9aef7eaa2421d3d6467343ea1.tar.gz samba-bfaff8ed1a3899c9aef7eaa2421d3d6467343ea1.tar.bz2 samba-bfaff8ed1a3899c9aef7eaa2421d3d6467343ea1.zip |
got smbwrapper working on IRIX 6.4. Things got a bit tricky,
especially as the headers get the syscall numbers wrong!
(This used to be commit a5405f1ab069a3123a819311a87ca84f2c5f0fea)
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r-- | source3/smbwrapper/realcalls.h | 9 | ||||
-rw-r--r-- | source3/smbwrapper/smbsh.in | 18 | ||||
-rw-r--r-- | source3/smbwrapper/smbw.c | 5 | ||||
-rw-r--r-- | source3/smbwrapper/smbw_stat.c | 2 |
4 files changed, 29 insertions, 5 deletions
diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h index 0c9bcd69bf..afd69b2d0c 100644 --- a/source3/smbwrapper/realcalls.h +++ b/source3/smbwrapper/realcalls.h @@ -19,6 +19,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef IRIX +/* amazingly, IRIX gets its own syscall numbers wrong! */ +#ifdef SYSVoffset +#if (SYSVoffset == 1) +#undef SYSVoffset +#define SYSVoffset 1000 +#endif +#endif +#endif /* this file is partly derived from zlibc by Alain Knaff */ diff --git a/source3/smbwrapper/smbsh.in b/source3/smbwrapper/smbsh.in index f5a5614842..7a26933f39 100644 --- a/source3/smbwrapper/smbsh.in +++ b/source3/smbwrapper/smbsh.in @@ -29,7 +29,21 @@ export PWD PS1='smbsh$ ' export PS1 -LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so -export LD_PRELOAD + +host_os=@HOST_OS@ + +case "$host_os" in + *irix*) + _RLDN32_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT + _RLD_LIST=$SMBW_LIBDIR/smbwrapper.32.so:DEFAULT + export _RLDN32_LIST + export _RLD_LIST + ;; + *) + LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so + export LD_PRELOAD + ;; +esac + exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"} diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index e7d0106034..97beca9b19 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -500,7 +500,7 @@ int smbw_open(const char *fname, int flags, mode_t mode) fstring server, share; pstring path; struct smbw_server *srv=NULL; - int eno, fd = -1; + int eno=0, fd = -1; struct smbw_file *file=NULL; smbw_init(); @@ -529,6 +529,7 @@ int smbw_open(const char *fname, int flags, mode_t mode) } if (fd == -1) { /* it might be a directory. Maybe we should use chkpath? */ + eno = smbw_error(&srv->cli); fd = smbw_dir_open(fname); smbw_busy--; return fd; @@ -1072,7 +1073,7 @@ a wrapper for lseek() off_t smbw_lseek(int fd, off_t offset, int whence) { struct smbw_file *file; - uint32 size; + size_t size; smbw_busy++; diff --git a/source3/smbwrapper/smbw_stat.c b/source3/smbwrapper/smbw_stat.c index 5362f3a6cb..f4d92321bb 100644 --- a/source3/smbwrapper/smbw_stat.c +++ b/source3/smbwrapper/smbw_stat.c @@ -118,7 +118,7 @@ int smbw_fstat(int fd, struct stat *st) struct smbw_file *file; time_t c_time, a_time, m_time; uint32 size; - int mode; + uint32 mode; smbw_busy++; |