[SCM] Samba Shared Repository - branch master updated
Björn Jacke
bjacke at samba.org
Tue Aug 31 05:13:58 MDT 2010
The branch, master has been updated
via 6598298 s4/heimdal_build: use GetTimeOfDay macro instead of gettimeofday
via b4ae2ef s3: use monotonic clock for time deltas in smbget
via 2025422 tdb/waf: the deps for rt are provided by libreplace
from 7c88ccd replace/waf: add rt to deps at this place
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 659829851703797b47d398d3c71ad971b2c5dab7
Author: Björn Jacke <bj at sernet.de>
Date: Tue Aug 31 13:11:13 2010 +0200
s4/heimdal_build: use GetTimeOfDay macro instead of gettimeofday
commit b4ae2efa963649c46fa4a3e3ad054c691f38af5b
Author: Björn Jacke <bj at sernet.de>
Date: Tue Aug 31 13:10:45 2010 +0200
s3: use monotonic clock for time deltas in smbget
commit 20254221d2c935ebcf2c4ea4372b1634bd09b1f0
Author: Björn Jacke <bj at sernet.de>
Date: Tue Aug 31 13:06:39 2010 +0200
tdb/waf: the deps for rt are provided by libreplace
-----------------------------------------------------------------------
Summary of changes:
lib/tdb/wscript | 2 +-
source3/utils/smbget.c | 7 +++++--
source4/heimdal_build/roken.h | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 2fdd67f..3dfb5ab 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -63,7 +63,7 @@ def build(bld):
if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
bld.SAMBA_LIBRARY('tdb',
COMMON_SRC,
- deps='replace rt',
+ deps='replace',
includes='include',
abi_file='ABI/tdb-%s.sigs' % VERSION,
abi_match='tdb_*',
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 62ecb34..85bbd24 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -276,7 +276,7 @@ static int smb_download_file(const char *base, const char *name, int recursive,
int resume, int toplevel, char *outfile)
{
int remotehandle, localhandle;
- time_t start_time = time(NULL);
+ struct timespec start_time, now;
const char *newpath;
char path[SMB_MAXPATHLEN];
char checkbuf[2][RESUME_CHECK_SIZE];
@@ -284,6 +284,7 @@ static int smb_download_file(const char *base, const char *name, int recursive,
off_t offset_download = 0, offset_check = 0, curpos = 0, start_offset = 0;
struct stat localstat, remotestat;
+ clock_gettime_mono(&start_time);
snprintf(path, SMB_MAXPATHLEN-1, "%s%s%s", base, (*base && *name && name[0] != '/' && base[strlen(base)-1] != '/')?"/":"", name);
remotehandle = smbc_open(path, O_RDONLY, 0755);
@@ -466,7 +467,9 @@ static int smb_download_file(const char *base, const char *name, int recursive,
if(dots)fputc('.', stderr);
else if(!quiet) {
- print_progress(newpath, start_time, time(NULL), start_offset, curpos, remotestat.st_size);
+ clock_gettime_mono(&now);
+ print_progress(newpath, start_time.tv_sec, now.tv_sec,
+ start_offset, curpos, remotestat.st_size);
}
}
diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h
index 50da1da..e44810d 100644
--- a/source4/heimdal_build/roken.h
+++ b/source4/heimdal_build/roken.h
@@ -118,6 +118,7 @@
#ifndef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY
#endif
+#define gettimeofday(a,b) GetTimeOfDay(a)
#ifndef HAVE_SETEGID
#define HAVE_SETEGID
--
Samba Shared Repository
More information about the samba-cvs
mailing list