r3579: with the gcc warning flag from abartlet we don't need sys_strftime()
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 Nov 2004 12:14:14 +0000 (12:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:34 +0000 (13:05 -0500)
(This used to be commit 041f77b6a19c98599fe18d2eb4e86db00b40014e)

source4/lib/time.c
source4/utils/net/net_time.c

index 9e6da2cfa696b0e0c92a122ecc0ab5c8581cffe0..e1f1395fea35c8c7f5ad9c5aa8f609786db351b1 100644 (file)
@@ -311,16 +311,6 @@ char *ldap_timestring(TALLOC_CTX *mem_ctx, time_t t)
                               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
 ****************************************************************************/
@@ -342,7 +332,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.
         */
-       sys_strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
+       strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
        TimeBuf = talloc_strdup(mem_ctx, tempTime);
 #else
        TimeBuf = talloc_strdup(mem_ctx, asctime(tm));
index 7668a42b8ca514ac4041627c835b469ebf1b3c3f..d2df76bc5d0333cd6aca8956021fb4a7a0cc1613 100644 (file)
@@ -66,7 +66,7 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
 
        ZERO_ARRAY(timestr);
        tm = localtime(&r.generic.out.time);
-       sys_strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
+       strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
 
        printf("%s\n",timestr);