]> code.delx.au - gnu-emacs/blobdiff - src/strftime.c
*** empty log message ***
[gnu-emacs] / src / strftime.c
index ef7189e6dda9479b3a22af9654b8156e168605e3..61047bf9578af17277954f93df0c3449a72dec08 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
    This file is part of the GNU Emacs.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -77,14 +77,13 @@ extern char *tzname[];
   static const mbstate_t mbstate_zero;
 #endif
 
-#if HAVE_LIMITS_H
+#ifdef HAVE_LIMITS_H
 # include <limits.h>
 #endif
 
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stddef.h>
 # include <stdlib.h>
-# include <string.h>
 #else
 # ifndef HAVE_MEMCPY
 #  define memcpy(d, s, n) bcopy ((s), (d), (n))
@@ -441,7 +440,7 @@ static CHAR_T const month_name[][10] =
 # define ut 0
 #endif
 
-#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
+#if !defined _LIBC && !defined(WINDOWSNT) && HAVE_TZNAME && HAVE_TZSET
   /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
      Work around this bug by copying *tp before it might be munged.  */
   size_t _strftime_copytm __P ((char *, size_t, const char *,
@@ -459,8 +458,7 @@ static CHAR_T const month_name[][10] =
     return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
   }
 # undef my_strftime
-# define my_strftime(S, Maxsize, Format, Tp) \
-  _strftime_copytm (S, Maxsize, Format, Tp)
+# define my_strftime _strftime_copytm
 #endif
 
 
@@ -804,8 +802,8 @@ my_strftime (s, maxsize, format, tp ut_argument)
         subformat:
           {
             CHAR_T *old_start = p;
-            size_t len = my_strftime (NULL, (size_t) -1, subfmt, tp);
-            add (len, my_strftime (p, maxsize - i, subfmt, tp));
+            size_t len = my_strftime (NULL, (size_t) -1, subfmt, tp, 0);
+            add (len, my_strftime (p, maxsize - i, subfmt, tp, 0));
 
             if (to_uppcase)
               while (old_start < p)