From 7bb86c1b132bce31a006ea9768a54db7a45fe1a5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 3 Sep 1998 18:40:31 +0000 Subject: Ok - this is the 64 bit widening check in. It changes the configure to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824) --- source3/smbd/fileio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd/fileio.c') diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 047c84f35f..6d6edf9d37 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -27,14 +27,14 @@ extern int DEBUGLEVEL; /**************************************************************************** seek a file. Try to avoid the seek if possible ****************************************************************************/ -int seek_file(files_struct *fsp,uint32 pos) +SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos) { - uint32 offset = 0; + SMB_OFF_T offset = 0; if (fsp->print_file && lp_postscript(fsp->conn->service)) offset = 3; - fsp->pos = (int)(lseek(fsp->fd_ptr->fd,pos+offset,SEEK_SET) - offset); + fsp->pos = (sys_lseek(fsp->fd_ptr->fd,pos+offset,SEEK_SET) - offset); return(fsp->pos); } @@ -104,7 +104,7 @@ int write_file(files_struct *fsp,char *data,int n) if (!fsp->modified) { SMB_STRUCT_STAT st; fsp->modified = True; - if (fstat(fsp->fd_ptr->fd,&st) == 0) { + if (sys_fstat(fsp->fd_ptr->fd,&st) == 0) { int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st); if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode)) { file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st); -- cgit