Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Ralf Wildenhues
Hello, * Karl Berry wrote on Wed, Feb 23, 2011 at 01:25:11AM CET: > The minor advantage of having time stamps in the text > > Minor? How else can we have an accurate version number? Doing it by > hand, or doing anything related to particular vc systems, proved > completely untenable for the

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Karl Berry
it's just that this feature of timestamp or checksum text in source files is more trouble than it's really worth. Hmm, I'm surprised to find that I don't agree with you. I find it extremely helpful to have a human-comprehensible version number embedded in the file. I am continually deali

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Paul Eggert
On 02/22/2011 04:25 PM, Karl Berry wrote: The minor advantage of having time stamps in the text Minor? How else can we have an accurate version number? sha256sum comes to mind. :-) It's not a big deal; it's just that this feature of timestamp or checksum text in source files is more tro

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Glenn Morris wrote (on Tue, 22 Feb 2011 at 19:29 -0500): > With regards to dir-locals, I think you can do it using a file containing: > > ((nil . ((eval . (add-hook 'before-save-hook 'time-stamp) And you could of course put the other settings in there, which ought to make things much tidi

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Eric Blake
On 02/22/2011 05:29 PM, Glenn Morris wrote: >> Do you have a suggestion for an alternate way to ensure that the >> timestamps are consistently updated when edited in their primary >> upstream repo, without the use of the eval? For example, would creating >> a .dir-locals.el in the same repository

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Eric Blake wrote (on Tue, 22 Feb 2011 at 16:38 -0700): > > Firstly, a minor point. write-file-hooks is obsolete since Emacs 22.1, > > replaced by write-file-functions. (Actually, the Emacs documentation > > suggests using before-save-hook for time-stamping.) > > And what's the portable fallback,

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Karl Berry
The minor advantage of having time stamps in the text Minor? How else can we have an accurate version number? Doing it by hand, or doing anything related to particular vc systems, proved completely untenable for these widespread files. That's the whole reason we introduced the timestamps in

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Paul Eggert
On 02/22/2011 03:24 PM, Glenn Morris wrote: Because `eval' is potentially risky Yes, and I'd rather that we removed that stuff entirely. The minor advantage of having time stamps in the text of the files is outweighed by the major disadvantage of the files' all being attack vectors. Even if th

Re: Emacs local variables sections in files; time-stamping

2011-02-22 Thread Eric Blake
On 02/22/2011 04:24 PM, Glenn Morris wrote: > contain stuff like this: > > # Local Variables: > # mode: shell-script > # sh-indentation: 2 > # eval: (add-hook 'write-file-hooks 'time-stamp) > # time-stamp-start: "scriptversion=" > # time-stamp-format: "%:y-%02m-%02d.%02H" >

Emacs local variables sections in files; time-stamping

2011-02-22 Thread Glenn Morris
Hi, I'm not sure if I should be reporting this to gnulib or to the various upstreams from which the relevant files derive; but it seems to be a common feature... We have various files in Emacs that are synced from gnulib now. Several of them: compile, config.guess, config.sub, depcomp, doc/mi

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Bruno Haible
Markus Gothe wrote: > Yes, taking an unsigned int in account actually fixed it... Splendid! Thanks for testing it so quickly. I've applied the patch, giving credits to Eric, since he spotted the sign-extension 3 minutes earlier than me :-) Bruno -- In memoriam Sophie Scholl

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Markus Gothe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Bruno, On 22 Feb, 2011, at 22:56 , Bruno Haible wrote: > Hi Markus, > >> Please see attached patch for ioctl() on FreeBSD and Darwin. Their definition >> differ from (int, int, ...) and the gnulib variant doesn't work well on >> 64-bit Darwin with

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Bruno Haible
Eric Blake wrote: > Maybe the real problem is that we need to ensure that our replacement > does not do sign extension. Yup, I think that's the point. > Does this patch fix your issue? > > diff --git i/lib/ioctl.c w/lib/ioctl.c > index 72f9f37..3ed4327 100644 > --- i/lib/ioctl.c > +++ w/lib/ioc

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Markus Gothe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22 Feb, 2011, at 22:53 , Eric Blake wrote: > [re-adding the list] > [please don't top-post on technical lists] > > On 02/22/2011 02:14 PM, Markus Gothe wrote: >> The issue is with PIMd-NG (http://pimd-ng.sf.net). > ... > > I'm not sure if you ema

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Bruno Haible
Hi Markus, > Please see attached patch for ioctl() on FreeBSD and Darwin. Their definition > differ from (int, int, ...) and the gnulib variant doesn't work well on > 64-bit Darwin with this proto. I'm sure this is a follow-up to this thread from January

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Eric Blake
[re-adding the list] [please don't top-post on technical lists] On 02/22/2011 02:14 PM, Markus Gothe wrote: > The issue is with PIMd-NG (http://pimd-ng.sf.net). ... I'm not sure if you emailed me privately because of sensitive content in your email, but hopefully I've trimmed enough of your conte

Re: ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Eric Blake
On 02/22/2011 12:34 PM, Markus Gothe wrote: > Please see attached patch for ioctl() on FreeBSD and Darwin. Their definition > differ from (int, int, ...) and the gnulib variant doesn't work well on > 64-bit Darwin with this proto. Can you please convince your mailer to send patches with MIME typ

Re: [PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Jim Meyering
Paul Eggert wrote: > On 02/22/2011 07:57 AM, Jim Meyering wrote: >> I omitted getloadavg.c since it had so many violations >> and is s crufty, and since Paul just got it into emacs. >> However, considering the number of cpp conditionals, it might >> benefit from the conversion. Paul, what do y

ioctl-patch for Darwin and FreeBSD

2011-02-22 Thread Markus Gothe
Please see attached patch for ioctl() on FreeBSD and Darwin. Their definition differ from (int, int, ...) and the gnulib variant doesn't work well on 64-bit Darwin with this proto. //Markus - The panama-hat hacker ioctl.patch Description: Binary data PGP.sig Description: This is a digitally

Re: [PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Bruno Haible
Eric Blake wrote: > > This Makefile is so specialized that I think it can assume GNU make. > > Does anyone prefer not to do that? > > No complaint by me, although we might want to 'git mv {,GNU}Makefile' to > make the change obvious. When a newbie looks whether there is a Makefile, he looks for '

Re: [PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Paul Eggert
On 02/22/2011 07:57 AM, Jim Meyering wrote: I omitted getloadavg.c since it had so many violations and is s crufty, and since Paul just got it into emacs. However, considering the number of cpp conditionals, it might benefit from the conversion. Paul, what do you think? I have no objection

Re: [PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Eric Blake
On 02/22/2011 08:57 AM, Jim Meyering wrote: > Eric Blake wrote: > ... >> Not too many of mine, either. By the way, did you intend >> that sc_cpp_indent_check was not run by 'make check'? > > No. I forgot that just adding an sc_ name here does not > automatically do what I want (like it does in m

Re: [PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Jim Meyering
Eric Blake wrote: ... > Not too many of mine, either. By the way, did you intend > that sc_cpp_indent_check was not run by 'make check'? No. I forgot that just adding an sc_ name here does not automatically do what I want (like it does in maint.mk). This Makefile is so specialized that I think i

[PATCH] maint: adjust cpp indentation for my modules, as well

2011-02-22 Thread Eric Blake
* Makefile (sc_cpp_indent_check): Add my name. * lib/fbufmode.c: Filter through cppi. * lib/fpurge.c: Likewise. * lib/freadable.c: Likewise. * lib/freading.c: Likewise. * lib/fwritable.c: Likewise. * lib/fwriting.c: Likewise. * lib/sigaction.c: Likewise. Signed-off-by: Eric Blake --- > I underst

[PATCH] maint: adjust cpp indentation to reflect nesting depth

2011-02-22 Thread Jim Meyering
Hi Bruno, I understand your not wanting to modify many of your files to make them consistent in this manner. However, since all but a dozen of mine already conform, I've adjusted those outliers with the following patch and added a Makefile rule so that it's easy to see if/when a new inconsistency

new modules 'mbtowc', 'wctomb'

2011-02-22 Thread Bruno Haible
I'm adding two new modules 'mbtowc', 'wctomb'. For now they have no effect on any known platform. They are a preparation for the soon-to-come support for UCS-4 characters on mingw and Cygwin 1.7. 2011-02-22 Bruno Haible New module 'mbtowc'. * lib/stdlib.in.h (mbtowc): New decl