--- src/elogd.orig	2005-06-15 16:48:31.000000000 +0200
+++ src/elogd.c	2005-06-15 17:03:12.000000000 +0200
@@ -1675,6 +1675,11 @@
    return TRUE;
 }
 
+/* workaroud for some gcc versions bug for "%c" format (see strftime(3) */
+size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) 
+{
+   return strftime(s, max, fmt, tm);
+}
 /*---- Safe malloc wrappers with out of memory checking from GNU ---*/
 
 static void memory_error_and_abort(char *func)
@@ -8052,7 +8057,7 @@
                if (!getcfg(lbs->name, "Date format", format, sizeof(format)))
                   strcpy(format, DEFAULT_DATE_FORMAT);
 
-               strftime(value[i], NAME_LENGTH, format, ts);
+               my_strftime(value[i], NAME_LENGTH, format, ts);
 
             } else
                strcpy(value[i], attrib[i]);
@@ -8091,7 +8096,7 @@
       if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
          strcpy(format, DEFAULT_TIME_FORMAT);
 
-      strftime(str, sizeof(str), format, ts);
+      my_strftime(str, sizeof(str), format, ts);
    } else
       sprintf(str, "%d", (int) t);
    strcpy(value[i++], str);
@@ -8104,7 +8109,7 @@
       if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
          strcpy(format, DEFAULT_TIME_FORMAT);
 
-      strftime(str, sizeof(str), format, ts);
+      my_strftime(str, sizeof(str), format, ts);
    } else
       sprintf(str, "%d", (int) t);
    strcpy(value[i++], str);
@@ -8131,7 +8136,7 @@
       strcpy(format, DEFAULT_TIME_FORMAT);
    ltime = date_to_ltime(date);
    pts = localtime(&ltime);
-   strftime(str, sizeof(str), format, pts);
+   my_strftime(str, sizeof(str), format, pts);
 
    add_subst_list(list, value, item, str, i);
 }
@@ -9273,10 +9278,10 @@
 
       ltime = date_to_ltime(date);
       pts = localtime(&ltime);
-      strftime(str, sizeof(str), format, pts);
+      my_strftime(str, sizeof(str), format, pts);
    } else {
       if (getcfg(lbs->name, "Time format", format, sizeof(format)))
-         strftime(str, sizeof(str), format, localtime(&now));
+         my_strftime(str, sizeof(str), format, localtime(&now));
       else
          strcpy(str, ctime(&now));
       strcpy(date, ctime(&now));
@@ -9392,7 +9397,7 @@
             if (ltime == 0)
                strcpy(str, "-");
             else
-               strftime(str, sizeof(str), format, pts);
+               my_strftime(str, sizeof(str), format, pts);
 
          } else
             strlcpy(str, attrib[index], sizeof(str));
@@ -14903,7 +14908,7 @@
 
             ltime = date_to_ltime(date);
             pts = localtime(&ltime);
-            strftime(str, sizeof(str), format, pts);
+            my_strftime(str, sizeof(str), format, pts);
 
             if (strieq(mode, "Threaded")) {
                if (skip_comma) {
@@ -14976,7 +14981,7 @@
                      if (ltime == 0)
                         strcpy(str, "-");
                      else
-                        strftime(str, sizeof(str), format, pts);
+                        my_strftime(str, sizeof(str), format, pts);
 
                      if (disp_attr_link == NULL || disp_attr_link[index])
                         rsprintf("<td class=\"%s\"><a href=\"%s\">%s</a></td>\n", sclass, ref, str);
@@ -14994,7 +14999,7 @@
                      if (ltime == 0)
                         strcpy(str, "-");
                      else
-                        strftime(str, sizeof(str), format, pts);
+                        my_strftime(str, sizeof(str), format, pts);
 
                      if (disp_attr_link == NULL || disp_attr_link[index])
                         rsprintf("<td class=\"%s\"><a href=\"%s\">%s</a></td>\n", sclass, ref, str);
@@ -17283,7 +17288,7 @@
          rsprintf("<table width=\"100%%\" border=0 cellpadding=0 cellspacing=0>\n");
          rsprintf("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s:</td>", loc("New entries since"));
          memcpy(&tms, localtime(&ltime_start), sizeof(struct tm));
-         strftime(str, sizeof(str), "%c", &tms);
+         my_strftime(str, sizeof(str), "%c", &tms);
          rsprintf("<td class=\"attribvalue\">%s</td></tr>", str);
          rsprintf("</table></td></tr>\n\n");
       }
@@ -17345,7 +17350,7 @@
                         strcpy(format, DEFAULT_DATE_FORMAT);
                      else
                         strcpy(format, DEFAULT_TIME_FORMAT);
-                     strftime(str, sizeof(str), format, &tms);
+                     my_strftime(str, sizeof(str), format, &tms);
                      if (ltime2 > 0)
                         rsprintf("%s %s", loc("From"), str);
                      else
@@ -17357,7 +17362,7 @@
                         strcpy(format, DEFAULT_DATE_FORMAT);
                      else
                         strcpy(format, DEFAULT_TIME_FORMAT);
-                     strftime(str, sizeof(str), format, &tms);
+                     my_strftime(str, sizeof(str), format, &tms);
                      if (ltime1 > 0)
                         rsprintf(" %s %s", loc("to"), str);
                      else
@@ -17950,7 +17955,7 @@
             if (ltime == 0)
                strcpy(comment, "-");
             else
-               strftime(comment, sizeof(str), format, pts);
+               my_strftime(comment, sizeof(str), format, pts);
          } else if (attr_flags[j] & AF_DATETIME) {
 
             if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
@@ -17961,7 +17966,7 @@
             if (ltime == 0)
                strcpy(comment, "-");
             else
-               strftime(comment, sizeof(str), format, pts);
+               my_strftime(comment, sizeof(str), format, pts);
          }
 
          if (!comment[0])
@@ -19593,7 +19598,7 @@
 
       ltime = date_to_ltime(date);
       pts = localtime(&ltime);
-      strftime(str, sizeof(str), format, pts);
+      my_strftime(str, sizeof(str), format, pts);
 
       rsprintf("&nbsp;&nbsp;&nbsp;&nbsp;%s:&nbsp;<b>%s</b>\n", loc("Entry time"), str);
 
@@ -19743,7 +19748,7 @@
             if (ltime == 0)
                strcpy(str, "-");
             else
-               strftime(str, sizeof(str), format, pts);
+               my_strftime(str, sizeof(str), format, pts);
 
             rsprintf("%s:</td><td class=\"%s\">%s&nbsp</td>\n", attr_list[i], class_value, str);
 
@@ -19757,7 +19762,7 @@
             if (ltime == 0)
                strcpy(str, "-");
             else
-               strftime(str, sizeof(str), format, pts);
+               my_strftime(str, sizeof(str), format, pts);
 
             rsprintf("%s:</td><td class=\"%s\">%s&nbsp</td>\n", attr_list[i], class_value, str);
 

