diff src/strftime.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
line wrap: on
line diff
--- a/src/strftime.c	Mon Aug 13 11:19:22 2007 +0200
+++ b/src/strftime.c	Mon Aug 13 11:20:41 2007 +0200
@@ -94,13 +94,13 @@
 time_t mktime ();
 #endif
 
-#if defined(WIN32_NATIVE) || defined(CYGWIN)
+#if defined(WINDOWSNT) || defined(__CYGWIN32__)
 #include <time.h>
 #else
 #if defined(HAVE_TZNAME)
 extern char *tzname[2];
 #endif
-#endif /* WIN32_NATIVE */
+#endif /* WINDOWSNT */
 
 #ifdef emacs
 #define strftime emacs_strftime
@@ -112,12 +112,12 @@
   none, blank, zero
 };
 
-static char const* const days[] =
+static char CONST* CONST days[] =
 {
   "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
 };
 
-static char const * const months[] =
+static char CONST * CONST months[] =
 {
   "January", "February", "March", "April", "May", "June",
   "July", "August", "September", "October", "November", "December"
@@ -174,7 +174,7 @@
 /* Like strncpy except return the number of characters copied. */
 
 static int
-add_str (char *to, const char *from, int max)
+add_str (char *to, CONST char *from, int max)
 {
   int i;
 
@@ -203,7 +203,7 @@
    starting on Sundays. */
 
 static int
-sun_week (const struct tm *tm)
+sun_week (CONST struct tm *tm)
 {
   int dl;
 
@@ -220,7 +220,7 @@
    starting on Mondays. */
 
 static int
-mon_week (const struct tm *tm)
+mon_week (CONST struct tm *tm)
 {
   int dl, wday;
 
@@ -233,9 +233,8 @@
 }
 
 #if !defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME)
-char *zone_name (const struct tm *tp);
 char *
-zone_name (const struct tm *tp)
+zone_name (CONST struct tm *tp)
 {
   char *timezone ();
   struct timeval tv;
@@ -252,11 +251,11 @@
    that were put into STRING, or 0 if the length would have
    exceeded MAX. */
 
-size_t strftime (char *string, size_t max, const char *format,
-		 const struct tm *tm);
+size_t strftime (char *string, size_t max, CONST char *format,
+		 CONST struct tm *tm);
 
 size_t
-strftime (char *string, size_t max, const char *format, const struct tm *tm)
+strftime (char *string, size_t max, CONST char *format, CONST struct tm *tm)
 {
   enum padding pad;		/* Type of padding to apply. */
   size_t length = 0;		/* Characters put in STRING so far. */