Hi Steven,
Thanks for the patch. I've gone through it and applied it to the current
Wget repository.
I've taken the liberty to make some changes to your patches:
1. I reverted the changes to the help output. They weren't VMS specific.
I'd love to get some uniformity here, but this isn't the place to do it.
2. For use_askpass I instead disabled the option entirely on VMS
Regarding your troubles with the print functions, please contact the
gnulib maintainers at bug-gnu...@gnu.org, they will be able to help you
and fixing the issue at that level will benefit all GNU projects.
A new release is coming soon with your patches included. Thanks!
On 22.12.20 07:29, Steven M. Schweda wrote:
>Greetings:
>
>It's been a while since I've tried to put a current version of Wget
> onto VMS, but I recently tried 1.20.3, with some success, but with some
> changes needed in the main source.
>
>Original and modified files should be available at:
>
> http://antinode.info/ftp/wget/wget-1_20_3a_vms/wget-1_20_3a_mods.zip
>
>Notes follow.
>
>
>
> src/hsts.c
>
>time_t on VMS is typically unsigned. (Lazy man's solution to 2038?)
> I added "(time_t)" type casts to negative values ("-1"), and changed
> tests to avoid complaints like:
>
> return (t < 0 ?
> ..^
> %CC-I-QUESTCOMPARE, In this statement, the unsigned expression "t" is being
> comp
> ared with a relational operator to a constant whose value is not greater than
> ze
> ro. This might not be what you intended.
> at line number 224 in file
> ITS$DKA0:[UTILITY.SOURCE.WGET.wget-1_20_3.src]hsts.c;
> 1
>
> I believe that it's all compatible with a signed time_t.
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>File path name construction using UNIX-only format:
>
> filename = aprintf ("%s/.wget-hsts-test", opt.homedir);
>
> was replaced by a new function which includes (and segregates) the
> VMS-specific alternative code:
>
> filename = ajoin_dir_file (opt.homedir, ".wget-hsts-test");
>
>
>
> src/init.c
>
>New function, ajoin_dir_file(), to join a directory and file name
> (used in hsts.c, init.c, and main.c).
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>Removed VMS-specific code using "SYS$LOGIN". (getenv( "HOME) works
> on VMS, too, when handled properly.)
>
>
>
> src/init.h
>
>Added prototype for new function, ajoin_dir_file().
>
>
>
> src/log.c
>
>Disabled check_redirect_output() on VMS (as on Windows).
>
>
>
> src/main.c
>
>Changed to use ajoin_dir_file().
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>Changed a "`" to "'" in the help text. I assume that you have a
> policy on "`", but its use seems inconsistent. I avoid it entirely,
> because, in my experience, it's almost always rendered asymmetrically
> with respect to "'", hence ugly and distracting. Perhaps I just use bad
> fonts.
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>Added a "use_askpass() not implemented on VMS" message, but did not
> actually disable the option.
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>Added a VMS-specific line (could be more) to the -V/--version report
> in print_version(). Typical output at the moment includes the
> (run-time) VMS version and the OpenSSL version, if any:
>
> VMS V8.4-2L1, OpenSSL 1.1.1h 22 Sep 2020
>
>
>
> src/utils.c
>
>Changed data types in VMS-specific code in fork_to_background() to
> agree with changed types in non-VMS code.
>
>
>
>Happened to notice:
>
> README
>
> Recursive downloading also works with FTP, where Wget can retrieves a
>---^
>
>
> Other complaints.
>
>I had a bunch of trouble trying to figure out what to do with the GNU
> print functions (asprintf(), snprintf(), vasnprintf(), vsnprintf()). I
> assume that the UNIX auto-jive copes with this stuff, but I couldn't see
> why it would make any sense for vasnprintf() to use snprintf(), and for
> snprintf() to use vasnprintf(). It took me a while to diagnose the
> resulting stack overflow. I found a solution, but...
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>