git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r3323: more warning reductions
[bbaumbach/samba-autobuild/.git]
/
source4
/
lib
/
time.c
diff --git
a/source4/lib/time.c
b/source4/lib/time.c
index eae30f581bb25285cc92a494b064a6d481a657a2..5ea9b46844185e8e57912ee94360a931b221e4f7 100644
(file)
--- a/
source4/lib/time.c
+++ b/
source4/lib/time.c
@@
-310,7
+310,15
@@
char *ldap_timestring(TALLOC_CTX *mem_ctx, time_t t)
tm->tm_sec);
}
tm->tm_sec);
}
-
+/*
+ a hack to move the stupid gcc strftime warning to one place - see manual page
+*/
+#ifdef HAVE_STRFTIME
+size_t sys_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
+{
+ return strftime(s, max, fmt, tm);
+}
+#endif
/****************************************************************************
Return the date and time as a string
/****************************************************************************
Return the date and time as a string
@@
-333,7
+341,7
@@
char *timestring(TALLOC_CTX *mem_ctx, time_t t)
in the gcc warning, not a bug in this code. See a recent
strftime() manual page for details.
*/
in the gcc warning, not a bug in this code. See a recent
strftime() manual page for details.
*/
- strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
+ s
ys_s
trftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
TimeBuf = talloc_strdup(mem_ctx, tempTime);
#else
TimeBuf = talloc_strdup(mem_ctx, asctime(tm));
TimeBuf = talloc_strdup(mem_ctx, tempTime);
#else
TimeBuf = talloc_strdup(mem_ctx, asctime(tm));