diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-03 18:40:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-03 18:40:31 +0000 |
commit | 7bb86c1b132bce31a006ea9768a54db7a45fe1a5 (patch) | |
tree | 1802e8e2741345e91187fc4b149016af75990971 /source3/lib/charset.c | |
parent | 4acd373e5bbd615141ceb5fb3c4a588a5b4581d7 (diff) | |
download | samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.gz samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.bz2 samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.zip |
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)
Diffstat (limited to 'source3/lib/charset.c')
-rw-r--r-- | source3/lib/charset.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/lib/charset.c b/source3/lib/charset.c index 55b76f2667..08d7726e3b 100644 --- a/source3/lib/charset.c +++ b/source3/lib/charset.c @@ -189,7 +189,7 @@ static codepage_p load_client_codepage( int client_codepage ) pstring codepage_file_name; unsigned char buf[8]; FILE *fp = NULL; - unsigned int size; + SMB_OFF_T size; codepage_p cp_p = NULL; SMB_STRUCT_STAT st; @@ -221,7 +221,7 @@ static codepage_p load_client_codepage( int client_codepage ) plus zero or more bytes of data. Note that the data cannot be more than 4 * MAXCODEPAGELINES bytes. */ - size = (unsigned int)st.st_size; + size = st.st_size; if( size < CODEPAGE_HEADER_SIZE || size > (CODEPAGE_HEADER_SIZE + 4 * MAXCODEPAGELINES)) { @@ -270,11 +270,10 @@ Needed %hu, got %hu.\n", } /* Check the length is correct. */ - if(IVAL(buf,CODEPAGE_LENGTH_OFFSET) != - (unsigned int)(size - CODEPAGE_HEADER_SIZE)) + if(IVAL(buf,CODEPAGE_LENGTH_OFFSET) != (size - CODEPAGE_HEADER_SIZE)) { DEBUG(0,("load_client_codepage: filename %s has incorrect size headers. \ -Needed %u, got %u.\n", codepage_file_name, size - CODEPAGE_HEADER_SIZE, +Needed %u, got %u.\n", codepage_file_name, (uint32)(size - CODEPAGE_HEADER_SIZE), IVAL(buf,CODEPAGE_LENGTH_OFFSET))); goto clean_and_exit; } |