Re: tmpdir.c:path_search() v. VMS

2013-07-17 Thread Paul Eggert
On 07/15/2013 02:47 PM, Steven M. Schweda wrote: >Sounds safer (though still less clear than "= 0", I claim). Thanks, I installed this: --- ChangeLog| 7 +++ lib/tmpdir.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b0cccd..

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Steven M. Schweda
From: Paul Eggert > On 07/15/2013 01:39 PM, Steven M. Schweda wrote: > > >Oooh, I don't think that I'd do that. > > Sorry, I don't know VMS so I'm flying blind here. When in doubt, don't do it, I always say. > How about this instead? > > #ifdef __VMS >add_slash = false; > #endif

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Paul Eggert
On 07/15/2013 01:10 PM, Steven M. Schweda wrote: >Around here, I get fewer %SYSTEM-F-ACCVIO run-time complaints if I > reorder the arguments: Thanks, I fixed that typo. (No need for the "(int)" type cast around here, either.) The cast is needed on some platforms, and shouldn't hurt on VMS.

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Paul Eggert
On 07/15/2013 01:39 PM, Steven M. Schweda wrote: >Oooh, I don't think that I'd do that. Sorry, I don't know VMS so I'm flying blind here. How about this instead? #ifdef __VMS add_slash = false; #endif

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Steven M. Schweda
From: Paul Eggert > +#ifdef __VMS > + if (dlen != 0 && dir[dlen - 1] == ':') > +add_slash = false; > +#endif Oooh, I don't think that I'd do that. If the victim specifies a VMS directory, like, say, "dkc0:[sms]", for TMPDIR, then a ":" test on the last character will fail. As usual, ev

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Steven M. Schweda
From: Paul Eggert > Thanks for the heads up. I pushed this but have not tested > under VMS, so please give it a try. > [...] + sprintf (tmpl + dlen, &"/%.*sXX"[!add_slash], pfx, (int) plen); > [...] Around here, I get fewer %SYSTEM-F-ACCVIO run-time complaints if I reorder the arguments

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Paul Eggert
Come to think of it, the code can be simplified; there's no need for a while loop there. I installed the following patch instead. diff --git a/ChangeLog b/ChangeLog index 4d73a26..9b0cccd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2013-07-15 Paul Eggert + + tmpdir: port to

Re: tmpdir.c:path_search() v. VMS

2013-07-15 Thread Paul Eggert
Thanks for the heads up. I pushed this but have not tested under VMS, so please give it a try. --- ChangeLog| 12 lib/tmpdir.c | 22 -- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d73a26..6929de0 100644 --- a/C

tmpdir.c:path_search() v. VMS

2013-07-14 Thread Steven M. Schweda
While trying to get Wget to work on VMS (again), I ran into a problem with tmpdir.c:path_search(). The Wget maintainer denied responsibility, and suggested that I direct my complaint here. --- lib/tmpdir.c_orig 2013-07-11 15:23:39 -0500 +++ lib/tmpdir.c2013-07-11 22:01:46 -0500 @@ -1