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/include/includes.h | |
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/include/includes.h')
-rw-r--r-- | source3/include/includes.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 15112cb163..41fccce5fe 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -318,7 +318,7 @@ #endif /* - * Type for device and inodes. + * Types for devices, inodes and offsets. */ #ifndef SMB_DEV_T @@ -329,16 +329,36 @@ #define SMB_INO_T uint32 #endif +#ifndef SMB_OFF_T +#ifdef HAVE_OFF64_T +#define SMB_OFF_T off64_t +#else +#define SMB_OFF_T off_t +#endif +#endif + +/* + * Set the define that tells us if we can do 64 bit + * NT SMB calls. + */ + +#ifndef LARGE_SMB_OFF_T +#if defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) +#define LARGE_SMB_OFF_T 1 +#endif +#endif + /* - * Type for stat structure. This will - * soon change to a user defined type - * once we wrap stat(), fstat() and lstat() - * for 64 bit file sizes. JRA. + * Type for stat structure. */ #ifndef SMB_STRUCT_STAT +#if defined(HAVE_STAT64) && defined(HAVE_OFF64_T) +#define SMB_STRUCT_STAT struct stat64 +#else #define SMB_STRUCT_STAT struct stat #endif +#endif #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) |