summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-17 19:16:12 +0000
committerJeremy Allison <jra@samba.org>1998-09-17 19:16:12 +0000
commitac9b687cc2496409e1c8d86393812faf94ec7550 (patch)
tree6aba6987dae6cec43881ec186be8975bc21194a2 /source3/lib
parent25ebd393bf117477125db42a9b4bdc7f09ce0b08 (diff)
downloadsamba-ac9b687cc2496409e1c8d86393812faf94ec7550.tar.gz
samba-ac9b687cc2496409e1c8d86393812faf94ec7550.tar.bz2
samba-ac9b687cc2496409e1c8d86393812faf94ec7550.zip
configure configure.in: Added tests for fseek64 and ftell64.
config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy. (This used to be commit c381d32e3dc23fe887408016cae821aceb30da2c)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/access.c2
-rw-r--r--source3/lib/system.c32
2 files changed, 30 insertions, 4 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index 2e1eb8df55..31f9db4e55 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -31,7 +31,7 @@ static int masked_match(char *tok, char *slash, char *s)
*slash = '/';
if (net == INADDR_NONE ||
(mask = interpret_addr(slash + 1)) == INADDR_NONE) {
- DEBUG(0,("access: bad net/mask access control: %s", tok));
+ DEBUG(0,("access: bad net/mask access control: %s\n", tok));
return (False);
}
return ((addr & mask) == net);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 215bfd0c1d..c3d97e0350 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -205,6 +205,32 @@ SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence)
}
/*******************************************************************
+ An fseek() wrapper that will deal with 64 bit filesizes.
+********************************************************************/
+
+int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence)
+{
+#if defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEK64)
+ return fseek64(fp, offset, whence);
+#else
+ return fseek(fp, offset, whence);
+#endif
+}
+
+/*******************************************************************
+ An ftell() wrapper that will deal with 64 bit filesizes.
+********************************************************************/
+
+SMB_OFF_T sys_ftell(FILE *fp)
+{
+#if defined(LARGE_SMB_OFF_T) && defined(HAVE_FTELL64)
+ return (SMB_OFF_T)ftell64(fp);
+#else
+ return (SMB_OFF_T)ftell(fp);
+#endif
+}
+
+/*******************************************************************
just a unlink wrapper that calls dos_to_unix.
********************************************************************/
int dos_unlink(char *fname)
@@ -216,7 +242,7 @@ int dos_unlink(char *fname)
/*******************************************************************
a simple open() wrapper that calls dos_to_unix.
********************************************************************/
-int dos_open(char *fname,int flags,int mode)
+int dos_open(char *fname,int flags,mode_t mode)
{
return(open(dos_to_unix(fname,False),flags,mode));
}
@@ -261,7 +287,7 @@ int dos_lstat(char *fname,SMB_STRUCT_STAT *sbuf)
/*******************************************************************
mkdir() gets a wrapper that calls dos_to_unix.
********************************************************************/
-int dos_mkdir(char *dname,int mode)
+int dos_mkdir(char *dname,mode_t mode)
{
return(mkdir(dos_to_unix(dname,False),mode));
}
@@ -413,7 +439,7 @@ int dos_rename(char *from, char *to)
/*******************************************************************
for chmod - call dos_to_unix.
********************************************************************/
-int dos_chmod(char *fname,int mode)
+int dos_chmod(char *fname,mode_t mode)
{
return(chmod(dos_to_unix(fname,False),mode));
}