Mail Archives: djgpp/1997/04/21/06:08:14
on 20 Apr 1997, Eli Zaretski wrote in reply to Kevin Ashley:
>>
>> Given your explanation, Eli, I wouldn't categorise this as a bug in
>> tzset and friends - the implementation is a perfectly sensible one.
[snip]
>Caching is OK; assuming that the value of a static uninitialized variable
>(which goes into the .bss section) is zero every time the program starts
>is NOT.
OK, I take back almost all I said - if the djgpp c library does (in general)
detect that a program has been restarted and reinitializes itself (and I
take your word that it does), the behaviour should clearly be made consistent
throughout all the routines. The fact that the library does this only
increases my respect for those of you who worked on it - I wouldn't be
confident that every libc implementation on other platforms offers me
the same.
>> The problem is surely with EMACs and its arcane method of building
>> itself.
>
>I disagree. Emacs is just another C program, that's all. It doesn't do
>anything that's against any standards. I submit that a good C library
>should allow any program to do whatever it pleases, unless that program
>explicitly violates written rules of the language. Otherwise, a good
>library shouldn't get in the way of the programmer.
Well, I still think EMACS is somewhat arcane, but it's a religious issue
and not important to the discussion. I agree with all you've said. However,
there is a difference between a program which violates standards (clearly
a Bad Thing) and one which has to make assumptions about behaviour in
areas where the standards are silent. Many systems, EMACS included, have
to do the latter - else we wouldn't need platform-dependent code - and
the standard is certainly silent on the point of what behaviour one can
expect from the library in a program which saves and restarts itself.
But it certainly sounds as if the work on djgpp has made life much more
straightforward in this area at little or no cost to performance or complexity.
I'm impressed.
>Did you see the patch that I posted? If so, was it too complicated? I
>don't think so.
I didn't see it, no, and I can't find it on our news server. (This is no
surprise - I suspect we only ever see 50-70% of most messages to most groups,
but that's my problem.)
I only saw your reply of April 15th to mdruiter, but from what you've said
your solution is far more elegant, consistent and practical than what I
suggested.
Kevin Ashley.
- Raw text -