diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 01:59:36 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 01:59:36 +0200 |
commit | 4746f79d50d804b0e9d5d5cc0d4796dee54d052c (patch) | |
tree | c10c06cd3e9b10cc0a4ea964875b4cfa739a2e4c /source3/include | |
parent | abe443a65edf86892ce01c80804a4b644ec99433 (diff) | |
download | samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.tar.gz samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.tar.bz2 samba-4746f79d50d804b0e9d5d5cc0d4796dee54d052c.zip |
Use {u,}int64_t instead of SMB_BIG_{U,}INT.
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/client.h | 2 | ||||
-rw-r--r-- | source3/include/includes.h | 23 | ||||
-rw-r--r-- | source3/include/nameserv.h | 4 | ||||
-rw-r--r-- | source3/include/ntquotas.h | 26 | ||||
-rw-r--r-- | source3/include/proto.h | 110 | ||||
-rw-r--r-- | source3/include/smb.h | 12 | ||||
-rw-r--r-- | source3/include/smbprofile.h | 8 | ||||
-rw-r--r-- | source3/include/sysquotas.h | 20 | ||||
-rw-r--r-- | source3/include/vfs.h | 16 |
9 files changed, 105 insertions, 116 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 70b0421c6d..8d57fe1eed 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -232,7 +232,7 @@ struct cli_state { typedef struct file_info { struct cli_state *cli; - SMB_BIG_UINT size; + uint64_t size; uint16 mode; uid_t uid; gid_t gid; diff --git a/source3/include/includes.h b/source3/include/includes.h index 40caf22fba..85a316bd39 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -426,7 +426,7 @@ typedef int VOLATILE SIG_ATOMIC_T; #ifdef LARGE_SMB_DEV_T #define SDEV_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32)) -#define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(((SMB_BIG_UINT)(IVAL((p),(ofs))))| (((SMB_BIG_UINT)(IVAL((p),(ofs)+4))) << 32))) +#define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(((uint64_t)(IVAL((p),(ofs))))| (((uint64_t)(IVAL((p),(ofs)+4))) << 32))) #else #define SDEV_T_VAL(p, ofs, v) (SIVAL((p),(ofs),v),SIVAL((p),(ofs)+4,0)) #define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(IVAL((p),(ofs)))) @@ -452,7 +452,7 @@ typedef int VOLATILE SIG_ATOMIC_T; #ifdef LARGE_SMB_INO_T #define SINO_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32)) -#define INO_T_VAL(p, ofs) ((SMB_INO_T)(((SMB_BIG_UINT)(IVAL(p,ofs)))| (((SMB_BIG_UINT)(IVAL(p,(ofs)+4))) << 32))) +#define INO_T_VAL(p, ofs) ((SMB_INO_T)(((uint64_t)(IVAL(p,ofs)))| (((uint64_t)(IVAL(p,(ofs)+4))) << 32))) #else #define SINO_T_VAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) #define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs)))) @@ -466,20 +466,13 @@ typedef int VOLATILE SIG_ATOMIC_T; # endif #endif -#if defined(HAVE_LONGLONG) -#define SMB_BIG_UINT unsigned long long -#define SMB_BIG_INT long long #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#else -#define SMB_BIG_UINT unsigned long -#define SMB_BIG_INT long -#define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#endif +#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF)) | \ + (( ((uint64_t)(IVAL((buf),(off+4)))) & ((uint64_t)0xFFFFFFFF) ) << 32 ) ) -#define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8) /* this should really be a 64 bit type if possible */ -#define br_off SMB_BIG_UINT +typedef uint64_t br_off; #define SMB_OFF_T_BITS (sizeof(SMB_OFF_T)*8) @@ -497,15 +490,11 @@ typedef int VOLATILE SIG_ATOMIC_T; #ifdef LARGE_SMB_OFF_T #define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) #define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32)) -#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ))) -#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ - (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) +#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF) ))) #else #define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) #define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,v),SIVAL(p,ofs,0)) #define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF ))) -#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ - (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) #endif /* diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index a7d46e72d8..496d87e2db 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -208,7 +208,7 @@ struct nmb_data { time_t death_time; /* The time the record must be removed (do not remove if 0). */ time_t refresh_time; /* The time the record should be refreshed. */ - SMB_BIG_UINT id; /* unique id */ + uint64_t id; /* unique id */ struct in_addr wins_ip; /* the adress of the wins server this record comes from */ int wins_flags; /* similar to the netbios flags but different ! */ @@ -606,7 +606,7 @@ typedef struct _WINS_RECORD { char type; int nb_flags; int wins_flags; - SMB_BIG_UINT id; + uint64_t id; int num_ips; struct in_addr ip[25]; struct in_addr wins_ip; diff --git a/source3/include/ntquotas.h b/source3/include/ntquotas.h index ed503b3854..9aa8b9139e 100644 --- a/source3/include/ntquotas.h +++ b/source3/include/ntquotas.h @@ -47,16 +47,16 @@ #define QUOTAS_4000 0x4000 #define QUOTAS_8000 0x8000 -#define SMB_NTQUOTAS_NO_LIMIT ((SMB_BIG_UINT)(-1)) -#define SMB_NTQUOTAS_NO_ENTRY ((SMB_BIG_UINT)(-2)) -#define SMB_NTQUOTAS_NO_SPACE ((SMB_BIG_UINT)(0)) -#define SMB_NTQUOTAS_1_B (SMB_BIG_UINT)0x0000000000000001 -#define SMB_NTQUOTAS_1KB (SMB_BIG_UINT)0x0000000000000400 -#define SMB_NTQUOTAS_1MB (SMB_BIG_UINT)0x0000000000100000 -#define SMB_NTQUOTAS_1GB (SMB_BIG_UINT)0x0000000040000000 -#define SMB_NTQUOTAS_1TB (SMB_BIG_UINT)0x0000010000000000 -#define SMB_NTQUOTAS_1PB (SMB_BIG_UINT)0x0004000000000000 -#define SMB_NTQUOTAS_1EB (SMB_BIG_UINT)0x1000000000000000 +#define SMB_NTQUOTAS_NO_LIMIT ((uint64_t)(-1)) +#define SMB_NTQUOTAS_NO_ENTRY ((uint64_t)(-2)) +#define SMB_NTQUOTAS_NO_SPACE ((uint64_t)(0)) +#define SMB_NTQUOTAS_1_B (uint64_t)0x0000000000000001 +#define SMB_NTQUOTAS_1KB (uint64_t)0x0000000000000400 +#define SMB_NTQUOTAS_1MB (uint64_t)0x0000000000100000 +#define SMB_NTQUOTAS_1GB (uint64_t)0x0000000040000000 +#define SMB_NTQUOTAS_1TB (uint64_t)0x0000010000000000 +#define SMB_NTQUOTAS_1PB (uint64_t)0x0004000000000000 +#define SMB_NTQUOTAS_1EB (uint64_t)0x1000000000000000 enum SMB_QUOTA_TYPE { SMB_INVALID_QUOTA_TYPE = -1, @@ -68,9 +68,9 @@ enum SMB_QUOTA_TYPE { typedef struct _SMB_NTQUOTA_STRUCT { enum SMB_QUOTA_TYPE qtype; - SMB_BIG_UINT usedspace; - SMB_BIG_UINT softlim; - SMB_BIG_UINT hardlim; + uint64_t usedspace; + uint64_t softlim; + uint64_t hardlim; uint32 qflags; DOM_SID sid; } SMB_NTQUOTA_STRUCT; diff --git a/source3/include/proto.h b/source3/include/proto.h index 40b89a1780..8ccf987a6d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -557,7 +557,7 @@ void pull_file_id_16(char *buf, struct file_id *id); /* The following definitions come from lib/fsusage.c */ -int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); +int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize); /* The following definitions come from lib/gencache.c */ @@ -1676,7 +1676,7 @@ void rfc1738_unescape(char *buf); DATA_BLOB base64_decode_data_blob(const char *s); void base64_decode_inplace(char *s); char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data); -SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr); +uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr); SMB_OFF_T conv_str_size(const char * str); void string_append(char **left, const char *right); bool add_string_to_array(TALLOC_CTX *mem_ctx, @@ -4248,13 +4248,13 @@ bool cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, enum brl_type lock_type); bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); bool cli_lock64(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); -bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); + uint64_t offset, uint64_t len, int timeout, enum brl_type lock_type); +bool cli_unlock64(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len); bool cli_posix_lock(struct cli_state *cli, int fnum, - SMB_BIG_UINT offset, SMB_BIG_UINT len, + uint64_t offset, uint64_t len, bool wait_lock, enum brl_type lock_type); -bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); -bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen); +bool cli_posix_unlock(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len); +bool cli_posix_getlock(struct cli_state *cli, int fnum, uint64_t *poffset, uint64_t *plen); bool cli_getattrE(struct cli_state *cli, int fd, uint16 *attr, SMB_OFF_T *size, time_t *change_time, @@ -5106,20 +5106,20 @@ const char *lock_type_name(enum brl_type lock_type); const char *lock_flav_name(enum brl_flavour lock_flav); bool is_locked(files_struct *fsp, uint32 smbpid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_type lock_type); NTSTATUS query_lock(files_struct *fsp, uint32 *psmbpid, - SMB_BIG_UINT *pcount, - SMB_BIG_UINT *poffset, + uint64_t *pcount, + uint64_t *poffset, enum brl_type *plock_type, enum brl_flavour lock_flav); struct byte_range_lock *do_lock(struct messaging_context *msg_ctx, files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_type lock_type, enum brl_flavour lock_flav, bool blocking_lock, @@ -5128,13 +5128,13 @@ struct byte_range_lock *do_lock(struct messaging_context *msg_ctx, NTSTATUS do_unlock(struct messaging_context *msg_ctx, files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_flavour lock_flav); NTSTATUS do_lock_cancel(files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT count, - SMB_BIG_UINT offset, + uint64_t count, + uint64_t offset, enum brl_flavour lock_flav); void locking_close_file(struct messaging_context *msg_ctx, files_struct *fsp); @@ -5186,8 +5186,8 @@ int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *, /* The following definitions come from locking/posix.c */ bool is_posix_locked(files_struct *fsp, - SMB_BIG_UINT *pu_offset, - SMB_BIG_UINT *pu_count, + uint64_t *pu_offset, + uint64_t *pu_count, enum brl_type *plock_type, enum brl_flavour lock_flav); bool posix_locking_init(bool read_only); @@ -5195,28 +5195,28 @@ bool posix_locking_end(void); void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount); int fd_close_posix(struct files_struct *fsp); bool set_posix_lock_windows_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type lock_type, const struct lock_context *lock_ctx, const struct lock_struct *plocks, int num_locks, int *errno_ret); bool release_posix_lock_windows_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type deleted_lock_type, const struct lock_context *lock_ctx, const struct lock_struct *plocks, int num_locks); bool set_posix_lock_posix_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, enum brl_type lock_type, int *errno_ret); bool release_posix_lock_posix_flavour(files_struct *fsp, - SMB_BIG_UINT u_offset, - SMB_BIG_UINT u_count, + uint64_t u_offset, + uint64_t u_count, const struct lock_context *lock_ctx, const struct lock_struct *plocks, int num_locks); @@ -9322,16 +9322,16 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck, uint32 lock_pid, enum brl_type lock_type, enum brl_flavour lock_flav, - SMB_BIG_UINT offset, - SMB_BIG_UINT count, + uint64_t offset, + uint64_t count, uint32 blocking_pid); void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck); void remove_pending_lock_requests_by_mid(int mid); bool blocking_lock_was_deferred(int mid); bool blocking_lock_cancel(files_struct *fsp, uint32 lock_pid, - SMB_BIG_UINT offset, - SMB_BIG_UINT count, + uint64_t offset, + uint64_t count, enum brl_flavour lock_flav, unsigned char locktype, NTSTATUS err); @@ -9397,14 +9397,14 @@ bool register_message_flags(bool doreg, uint32 msg_flags); /* The following definitions come from smbd/dfree.c */ -SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, - SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); -SMB_BIG_UINT get_dfree_info(connection_struct *conn, +uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_query, + uint64_t *bsize,uint64_t *dfree,uint64_t *dsize); +uint64_t get_dfree_info(connection_struct *conn, const char *path, bool small_query, - SMB_BIG_UINT *bsize, - SMB_BIG_UINT *dfree, - SMB_BIG_UINT *dsize); + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize); /* The following definitions come from smbd/dir.c */ @@ -9806,7 +9806,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - SMB_BIG_UINT allocation_size, + uint64_t allocation_size, struct security_descriptor *sd, struct ea_list *ea_list, @@ -9823,7 +9823,7 @@ NTSTATUS create_file(connection_struct *conn, uint32_t create_options, uint32_t file_attributes, uint32_t oplock_request, - SMB_BIG_UINT allocation_size, + uint64_t allocation_size, struct security_descriptor *sd, struct ea_list *ea_list, @@ -9950,18 +9950,18 @@ void smbd_process(void); /* The following definitions come from smbd/quotas.c */ -bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); +bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); +bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); bool disk_quotas(const char *path, - SMB_BIG_UINT *bsize, - SMB_BIG_UINT *dfree, - SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); -bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize); +bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); +bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); +bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); +bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); +bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize); +bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize); /* The following definitions come from smbd/reply.c */ @@ -10071,8 +10071,8 @@ NTSTATUS copy_file(TALLOC_CTX *ctx, bool target_is_directory); void reply_copy(struct smb_request *req); uint32 get_lock_pid( char *data, int data_offset, bool large_file_format); -SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format); -SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err); +uint64_t get_lock_count( char *data, int data_offset, bool large_file_format); +uint64_t get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err); void reply_lockingX(struct smb_request *req); void reply_readbmpx(struct smb_request *req); void reply_readbs(struct smb_request *req); @@ -10190,8 +10190,8 @@ int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf); /* The following definitions come from smbd/trans2.c */ -SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val); -SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf); +uint64_t smb_roundup(connection_struct *conn, uint64_t val); +uint64_t get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf); NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_struct *fsp, const char *fname, const char *ea_name, struct ea_struct *pea); @@ -10275,7 +10275,7 @@ ssize_t vfs_pwrite_data(struct smb_request *req, const char *buffer, size_t N, SMB_OFF_T offset); -int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len); +int vfs_allocate_file_space(files_struct *fsp, uint64_t len); int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len); SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); diff --git a/source3/include/smb.h b/source3/include/smb.h index fb79e91121..732bef1212 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -360,7 +360,7 @@ typedef struct { struct fd_handle { size_t ref_count; int fd; - SMB_BIG_UINT position_information; + uint64_t position_information; SMB_OFF_T pos; uint32 private_options; /* NT Create options, but we only look at * NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and @@ -436,7 +436,7 @@ typedef struct files_struct { unsigned int num_smb_operations; uint16 rap_print_jobid; struct file_id file_id; - SMB_BIG_UINT initial_allocation_size; /* Faked up initial allocation on disk. */ + uint64_t initial_allocation_size; /* Faked up initial allocation on disk. */ mode_t mode; uint16 file_pid; uint16 vuid; @@ -547,10 +547,10 @@ struct stream_struct { struct dfree_cached_info { time_t last_dfree_time; - SMB_BIG_UINT dfree_ret; - SMB_BIG_UINT bsize; - SMB_BIG_UINT dfree; - SMB_BIG_UINT dsize; + uint64_t dfree_ret; + uint64_t bsize; + uint64_t dfree; + uint64_t dsize; }; struct dptr_struct; diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index f58a6452bf..8945708ca3 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -782,7 +782,7 @@ extern bool do_profile_times; extern clockid_t __profile_clock; -static inline SMB_BIG_UINT profile_timestamp(void) +static inline uint64_t profile_timestamp(void) { struct timespec ts; @@ -797,7 +797,7 @@ static inline SMB_BIG_UINT profile_timestamp(void) #else -static inline SMB_BIG_UINT profile_timestamp(void) +static inline uint64_t profile_timestamp(void) { struct timeval tv; GetTimeOfDay(&tv); @@ -830,14 +830,14 @@ static inline SMB_BIG_UINT profile_timestamp(void) } #define START_PROFILE(x) \ - SMB_BIG_UINT __profstamp_##x = 0; \ + uint64_t __profstamp_##x = 0; \ if (do_profile_flag) { \ __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\ INC_PROFILE_COUNT(x##_count); \ } #define START_PROFILE_BYTES(x,n) \ - SMB_BIG_UINT __profstamp_##x = 0; \ + uint64_t __profstamp_##x = 0; \ if (do_profile_flag) { \ __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\ INC_PROFILE_COUNT(x##_count); \ diff --git a/source3/include/sysquotas.h b/source3/include/sysquotas.h index a0754a3737..71d5e9b264 100644 --- a/source3/include/sysquotas.h +++ b/source3/include/sysquotas.h @@ -37,8 +37,8 @@ Some stuff for the sys_quota api. **************************************************/ -#define SMB_QUOTAS_NO_LIMIT ((SMB_BIG_UINT)(0)) -#define SMB_QUOTAS_NO_SPACE ((SMB_BIG_UINT)(1)) +#define SMB_QUOTAS_NO_LIMIT ((uint64_t)(0)) +#define SMB_QUOTAS_NO_SPACE ((uint64_t)(1)) #define SMB_QUOTAS_SET_NO_LIMIT(dp) \ {\ @@ -58,14 +58,14 @@ typedef struct _SMB_DISK_QUOTA { enum SMB_QUOTA_TYPE qtype; - SMB_BIG_UINT bsize; - SMB_BIG_UINT hardlimit; /* In bsize units. */ - SMB_BIG_UINT softlimit; /* In bsize units. */ - SMB_BIG_UINT curblocks; /* In bsize units. */ - SMB_BIG_UINT ihardlimit; /* inode hard limit. */ - SMB_BIG_UINT isoftlimit; /* inode soft limit. */ - SMB_BIG_UINT curinodes; /* Current used inodes. */ - uint32 qflags; + uint64_t bsize; + uint64_t hardlimit; /* In bsize units. */ + uint64_t softlimit; /* In bsize units. */ + uint64_t curblocks; /* In bsize units. */ + uint64_t ihardlimit; /* inode hard limit. */ + uint64_t isoftlimit; /* inode soft limit. */ + uint64_t curinodes; /* Current used inodes. */ + uint32_t qflags; } SMB_DISK_QUOTA; #ifndef QUOTABLOCK_SIZE diff --git a/source3/include/vfs.h b/source3/include/vfs.h index a3d38f6a25..0951de63fe 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -282,8 +282,8 @@ struct vfs_ops { int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user); void (*disconnect)(struct vfs_handle_struct *handle); - SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize, - SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); + uint64_t (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, uint64_t *bsize, + uint64_t *dfree, uint64_t *dsize); int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels); @@ -625,14 +625,14 @@ typedef struct vfs_statvfs_struct { if no distinction is made return the same value in each. */ - SMB_BIG_UINT TotalBlocks; - SMB_BIG_UINT BlocksAvail; /* bfree */ - SMB_BIG_UINT UserBlocksAvail; /* bavail */ + uint64_t TotalBlocks; + uint64_t BlocksAvail; /* bfree */ + uint64_t UserBlocksAvail; /* bavail */ /* For undefined Node fields or FSID return -1 */ - SMB_BIG_UINT TotalFileNodes; - SMB_BIG_UINT FreeFileNodes; - SMB_BIG_UINT FsIdentifier; /* fsid */ + uint64_t TotalFileNodes; + uint64_t FreeFileNodes; + uint64_t FsIdentifier; /* fsid */ /* NB Namelen comes from FILE_SYSTEM_ATTRIBUTE_INFO call */ /* NB flags can come from FILE_SYSTEM_DEVICE_INFO call */ |