diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-25 13:57:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:14 -0500 |
commit | 579c13da43d5b40ac6d6c1436399fbc1d8dfd054 (patch) | |
tree | 42299570746f2d7f80356b689cb15e3db6c53d3c /source4/client | |
parent | 81e8de9ca85fe9a6658beb1dab0d231c13cda063 (diff) | |
download | samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.gz samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.bz2 samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.zip |
r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.
I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/client.c | 12 | ||||
-rw-r--r-- | source4/client/clitar.c | 22 |
2 files changed, 17 insertions, 17 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index dcb1c7c418..77d4b4b497 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -83,9 +83,9 @@ static BOOL abort_mget = True; static pstring fileselection = ""; /* timing globals */ -SMB_BIG_UINT get_total_size = 0; +uint64_t get_total_size = 0; unsigned int get_total_time_ms = 0; -static SMB_BIG_UINT put_total_size = 0; +static uint64_t put_total_size = 0; static unsigned int put_total_time_ms = 0; /* totals globals */ @@ -1663,10 +1663,10 @@ static int cmd_allinfo(void) goto done; } - d_printf("\tcreate_time: %s\n", nt_time_string(mem_ctx, &finfo.all_info.out.create_time)); - d_printf("\taccess_time: %s\n", nt_time_string(mem_ctx, &finfo.all_info.out.access_time)); - d_printf("\twrite_time: %s\n", nt_time_string(mem_ctx, &finfo.all_info.out.write_time)); - d_printf("\tchange_time: %s\n", nt_time_string(mem_ctx, &finfo.all_info.out.change_time)); + d_printf("\tcreate_time: %s\n", nt_time_string(mem_ctx, finfo.all_info.out.create_time)); + d_printf("\taccess_time: %s\n", nt_time_string(mem_ctx, finfo.all_info.out.access_time)); + d_printf("\twrite_time: %s\n", nt_time_string(mem_ctx, finfo.all_info.out.write_time)); + d_printf("\tchange_time: %s\n", nt_time_string(mem_ctx, finfo.all_info.out.change_time)); d_printf("\tattrib: 0x%x\n", finfo.all_info.out.attrib); d_printf("\talloc_size: %lu\n", (unsigned long)finfo.all_info.out.alloc_size); d_printf("\tsize: %lu\n", (unsigned long)finfo.all_info.out.size); diff --git a/source4/client/clitar.c b/source4/client/clitar.c index cd3c9f2310..09f10edee7 100644 --- a/source4/client/clitar.c +++ b/source4/client/clitar.c @@ -45,7 +45,7 @@ typedef struct file_info_struct file_info2; struct file_info_struct { - SMB_BIG_UINT size; + uint64_t size; uint16 mode; uid_t uid; gid_t gid; @@ -120,11 +120,11 @@ extern int get_total_size; static int blocksize=20; static int tarhandle; -static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime, +static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime, const char *amode, unsigned char ftype); static void do_atar(char *rname,char *lname,file_info *finfo1); static void do_tar(file_info *finfo); -static void oct_it(SMB_BIG_UINT value, int ndgs, char *p); +static void oct_it(uint64_t value, int ndgs, char *p); static void fixtarname(char *tptr, const char *fp, int l); static int dotarbuf(int f, char *b, int n); static void dozerobuf(int f, int n); @@ -163,7 +163,7 @@ static char *string_create_s(int size) /**************************************************************************** Write a tar header to buffer ****************************************************************************/ -static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime, +static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime, const char *amode, unsigned char ftype) { union hblock hb; @@ -202,17 +202,17 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m hb.dbuf.name[NAMSIZ-1]='\0'; safe_strcpy(hb.dbuf.mode, amode, strlen(amode)); - oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.uid); - oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.gid); - oct_it((SMB_BIG_UINT) size, 13, hb.dbuf.size); - oct_it((SMB_BIG_UINT) mtime, 13, hb.dbuf.mtime); + oct_it((uint64_t)0, 8, hb.dbuf.uid); + oct_it((uint64_t)0, 8, hb.dbuf.gid); + oct_it((uint64_t) size, 13, hb.dbuf.size); + oct_it((uint64_t) mtime, 13, hb.dbuf.mtime); memcpy(hb.dbuf.chksum, " ", sizeof(hb.dbuf.chksum)); memset(hb.dbuf.linkname, 0, NAMSIZ); hb.dbuf.linkflag=ftype; for (chk=0, i=sizeof(hb.dummy), jp=hb.dummy; --i>=0;) chk+=(0xFF & *jp++); - oct_it((SMB_BIG_UINT) chk, 8, hb.dbuf.chksum); + oct_it((uint64_t) chk, 8, hb.dbuf.chksum); hb.dbuf.chksum[6] = '\0'; (void) dotarbuf(f, hb.dummy, sizeof(hb.dummy)); @@ -426,7 +426,7 @@ static void fixtarname(char *tptr, const char *fp, int l) /**************************************************************************** Convert from decimal to octal string ****************************************************************************/ -static void oct_it (SMB_BIG_UINT value, int ndgs, char *p) +static void oct_it (uint64_t value, int ndgs, char *p) { /* Converts long to octal string, pads with leading zeros */ @@ -598,7 +598,7 @@ append one remote file to the tar file static void do_atar(char *rname,char *lname,file_info *finfo1) { int fnum; - SMB_BIG_UINT nread=0; + uint64_t nread=0; char ftype; file_info2 finfo; BOOL close_done = False; |