From: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs
Date: Fri, 06 Jun 2003 14:24:28 +0100 [thread overview]
Message-ID: <3EE0960C.3020903@gnu.org> (raw)
In-Reply-To: <rzqu1b3ts29.fsf@albion.dl.ac.uk>
Dave Love wrote:
> Can anyone comment on issues below, arising from an attempt to merge
> with the gnulib version of strftime? It's specifically rms's change
> which depends on __hpux rather than testing for sys/_mbstate_t.h, and
> andrewi's changes involving USE_CRT_DLL and WINDOWSNT. Jim's
> suggestion about HAVE_TZNAME isn't relevant because that's actually
> what HAVE_TZNAME means, and it turns out ms-w32.h defines it. What
> does USE_CRT_DLL mean, and does Windows always have the semantics of
> it being defined?
USE_CRT_DLL indicates that the Windows system C runtime library is used
by Emacs. It is defined by the Makefile when compiling with gcc on
Windows, so I guess it means as opposed to glibc. Perhaps it is
implicitly defined when compiling with msvc, I am not sure, but looking
at the timing of when it was added, I think it is connected with the
addition of support for gcc on Windows. An alternative would be to
use configure tests to detect when tzname[] is not declared by <time.h>
or <sys/time.h>, and only declare it in that case.
WINDOWSNT is defined in the Emacs makefiles.
>> [WINDOWSNT]: Don't apply Solaris 2.5 work-around on Windows.
>
> In any case, we try hard not to use system-dependent macros like that
> and prefer to use the results of configure-time tests. Is that
> feasible here?
It is probably better to detect the buggy Solaris 2.5 implementation
and only apply the work-around there. The conditional is too complex
as it is, and might be picking up other non-buggy implementations in
addition to WINDOWSNT (where it was noticed because it caused buggy
behaviour).
Full text of original below for Andrew's benefit:
> ------------------------------------------------------------------------
>
> Subject:
> Re: [Bug-gnulib] strftime merge from Emacs
> From:
> Jim Meyering <jim@meyering.net>
> Date:
> Thu, 05 Jun 2003 09:03:43 +0200
> To:
> Dave Love <d.love@dl.ac.uk>
>
>
> Dave Love <d.love@dl.ac.uk> wrote:
>
>>I merged these from Emacs (and pending changes thereto). Is the
>>copyright notice meant to be GPL rather than LGPL?
>
>
> Thanks for all that work!
>
>
>>2003-06-04 Dave Love <fx@gnu.org>
>>
>> [From Emacs]
>>
>> * strftime.c: Change some #if to #ifdef.
>
>
> I've been trying to keep the gnulib version of strftime
> more or less in sync with the one from glibc,
> so would prefer that such cosmetic changes be made
> in the primary source.
>
> I think it's time to try to merge some of our
> changes back into libc. Once things stabilize here
> maybe we can convince the libc folks to accept a few patches.
>
>
>> [__hpux]: Include sys/_mbstate_t.h.
>
>
> Using a macro like __hpux should be done only as a last resort.
> I hope there is a better way.
>
>
>> (mbsinit): Define as no-op if not available.
>> [!__P]: Use PROTOTYPES.
>
>
> Does emacs still cater to compilers that don't support prototypes?
> I've been removing k&r support (PROTOTYPES, __P, etc.) from the coreutils
> for years without complaint. As far as emacs is concerned, is it possible
> to remove such support from this file altogether?
>
> Do any packages other than gcc and binutils cater to such old C compilers?
>
>
>> [USE_CRT_DLL]: Remove unnecessary extern, which screws up
>> dllimport attributes.
>
>
> Could that `#if HAVE_TZNAME' block be replaced with this?
> assuming you add the autoconf test, AC_CHECK_DECLS([tzname]), of course.
>
> #if HAVE_DECL_TZNAME
> extern char *tzname[];
> #endif
>
>
>> (my_strftime): Don't special-case Emacs.
>> [WINDOWSNT]: Don't apply Solaris 2.5 work-around on Windows.
>
>
> I haven't seen WINDOWSNT used before.
> Here are some of the window-related macros I have seen:
>
> _WIN32 WIN32 __WIN32__ __MSDOS__ WINDOWS32
>
> In any case, we try hard not to use system-dependent macros like that
> and prefer to use the results of configure-time tests. Is that
> feasible here?
>
>
>> (my_strftime) [STRFTIME_NO_POSIX2]: Handle %h when underlying
>> strftime does not.
>
>
> Although I see that emacs enables that code currently only via a
> #define in `nt/config.nt', it looks like it might be useful for
> other systems. If it becomes an issue, I'm sure someone will write
> an autoconf test.
>
>
>> (emacs_strftimeu): Undef ut.
>>
>>Index: strftime.c
>>===================================================================
>>RCS file: /cvsroot/gnulib/gnulib/lib/strftime.c,v
>>retrieving revision 1.69
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2003-06-06 13:24 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-06 10:32 [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs Dave Love
2003-06-06 13:24 ` Jason Rumney [this message]
2003-06-09 22:53 ` [Jim Meyering] " Andrew Innes
2003-06-10 22:36 ` Dave Love
2003-06-10 22:34 ` Dave Love
2003-06-10 22:51 ` [Jim Meyering] Re: [Bug-gnulib] " Jason Rumney
2003-06-11 10:14 ` Bruno Haible
2003-06-11 10:29 ` Jason Rumney
2003-06-11 17:29 ` [Jim Meyering] " Paul Eggert
2003-06-11 18:38 ` Eli Zaretskii
2003-06-11 18:52 ` [Jim Meyering] Re: [Bug-gnulib] " Paul Eggert
2003-06-11 19:26 ` Bruno Haible
2003-06-12 22:42 ` [Jim Meyering] " Dave Love
2003-06-13 14:53 ` Paul Eggert
2003-06-16 22:15 ` [Jim Meyering] Re: [Bug-gnulib] " Dave Love
2003-06-17 4:15 ` Paul Eggert
2003-06-17 11:10 ` Stephen J. Turnbull
2003-06-07 10:22 ` [Jim Meyering] " Richard Stallman
2003-06-07 15:28 ` Jim Meyering
2003-06-07 15:50 ` [Jim Meyering] Re: [Bug-gnulib] " Eli Zaretskii
2003-06-07 17:03 ` Bruno Haible
2003-06-07 18:46 ` [Jim Meyering] " Eli Zaretskii
2003-06-09 0:21 ` [Jim Meyering] Re: [Bug-gnulib] " Richard Stallman
2003-06-09 21:10 ` Avoiding WIN* macros in GNU code [was Re: [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs] Derek Robert Price
2003-06-12 5:52 ` [Zlib-devel] " Cosmin Truta
2003-06-12 6:31 ` Miles Bader
2003-06-12 20:55 ` Richard Stallman
2003-06-12 22:07 ` [Zlib-devel] Avoiding WIN* macros in GNU code Cosmin Truta
2003-06-13 10:03 ` Jason Rumney
2003-06-15 15:59 ` Richard Stallman
2003-06-10 22:33 ` [Jim Meyering] Re: [Bug-gnulib] strftime merge from Emacs Dave Love
2003-06-12 14:06 ` Richard Stallman
2003-06-12 16:11 ` [Jim Meyering] " Benjamin Riefenstahl
2003-06-12 17:59 ` Jason Rumney
2003-06-12 18:43 ` Eli Zaretskii
2003-06-13 22:03 ` Richard Stallman
2003-06-16 21:55 ` Dave Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EE0960C.3020903@gnu.org \
--to=jasonr@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.