bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs strftime.c problem (glibc strftime.c 1.78)


From: Paul Eggert
Subject: Re: Emacs strftime.c problem (glibc strftime.c 1.78)
Date: Tue, 24 Oct 2000 17:12:12 -0700 (PDT)

   Kenichi Handa <address@hidden> writes:

   > With this recent change:
   >    * strftime.c: Sync with glibc, file version 1.78.
   > Emacs can't be compiled on Solaris 2.6.   At line 1372 of strftime.c,
   > my_strftime is called with wrong number of arguments.

Here's a patch, relative to glibc strftime.c 1.78.  I'm CC'ing this to
bug-glibc.

For the glibc folks, here are the symptoms of the problem, when
compiling strftime.c for Emacs using the Sun C compiler on Solaris 2.6:

  cc -c  -Demacs -DHAVE_CONFIG_H -DUSE_LUCID  -I. -I/reb/src/base/emacs/src    
-I/usr/openwin/include  -I/usr/dt/include -g strftime.c
  "strftime.c", line 1367: warning: argument mismatch

2000-10-24  Paul Eggert  <address@hidden>

        * strftime.c (my_strftime macro)
        [!defined _LIBC && HAVE_TZNAME && HAVE_TZSET]:
        When redefining, do it without args, so that it works even if
        emacs is defined and an extra argument is passed to my_stftime.
        (my_strftime function): When evaluating a subformat, pass
        ut_argument as well.


===================================================================
RCS file: strftime.c,v
retrieving revision 20.5.78.0
retrieving revision 20.5.78.1
diff -pu -r20.5.78.0 -r20.5.78.1
--- strftime.c  2000/08/30 18:30:08     20.5.78.0
+++ strftime.c  2000/10/25 00:04:31     20.5.78.1
@@ -455,8 +455,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
 
 
@@ -799,8 +798,10 @@ my_strftime (s, maxsize, format, tp ut_a
        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 ut_argument);
+           add (len, my_strftime (p, maxsize - i, subfmt,
+                                  tp ut_argument));
 
            if (to_uppcase)
              while (old_start < p)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]