bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Re: Steven Schweda's VMS patch in mainline


From: Micah Cowan
Subject: Re: [Bug-wget] Re: Steven Schweda's VMS patch in mainline
Date: Fri, 11 Sep 2009 19:25:07 -0700
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steven M. Schweda wrote:
>    I've been tending to other things for a while, but I did recently
> (8-SEP-2009) suck down a 1.12-devel tar-ball, and I made some progress. 
> Comments/complaints/suggestions follow.
> 
> 1.  Test file name too long for an ODS2 file system (46.2 > 39.39):
> 
> ALP $ vmstar xf mainline-efec04b6c40d.tar
> tar: error creating ($CREATE) 
> [UTILITY.SOURCE.WGET.mainline-efec04b6c40d.tests]T
> est--spider-r--no-content-disposition-trivial.px
> 
> This file probably wouldn't get used on VMS anyway, but a shorter name
> would be cleaner.  (More annoying for you, less for me.)
> 
> 2.  Will the perl-processed src/build_info.c be included in a normal
> source kit?  (I sure hope so.)

Yes. I don't want Perl to be a build prerequisite.

> 3.  md5/md5.c may need stuff (uint32_t) from sysdep.h:

> 4.  md5/md5.h unconditionally includes <stdint.h>:/

I can't easily touch those files: they're imported from outside
(gnulib). However, gnulib also includes its own stdint.h (also in md5/),
for systems that don't have it, so that solves the problem... except
that it's a stdint.h.in, and the stdint.h would be generated from the
configure script.

> 5.  src/ftp.c needs a workaround for a C compiler bug on Alpha:
> 
> ALP $ gdiff -u ftp.c_orig ftp.c
> --- ftp.c_orig  2009-09-08 11:33:28 -0500
> +++ ftp.c       2009-09-09 10:31:46 -0500
> @@ -2050,8 +2050,22 @@
>          }
>        else if (action == GLOB_GETONE)
>          {
> +#ifdef __VMS
> +          /* 2009-09-09 SMS.
> +           * Odd-ball compiler ("HP C V7.3-009 on OpenVMS Alpha V7.3-2")
> +           * bug causes spurious %CC-E-BADCONDIT complaint with this
> +           * "?:" statement.  (Different linkage attributes for strcmp()
> +           * and strcasecmp().)  Converting to "if" changes the
> +           * complaint to %CC-W-PTRMISMATCH on "cmp = strcmp;".  Adding
> +           * the senseless type cast clears the complaint, and looks
> +           * harmless.
> +           */
> +          int (*cmp) (const char *, const char *)
> +            = opt.ignore_case ? strcasecmp : (int (*)())strcmp;
> +#else /* def __VMS */
>            int (*cmp) (const char *, const char *)
>              = opt.ignore_case ? strcasecmp : strcmp;
> +#endif /* def __VMS [else] */
>            f = start;
>            while (f)
>              {
> 
> I assume that the type cast could be unconditional, but it's so goofy
> that I wouldn't spread it around any more than I had to.
> 
> 6.  A change to src/utils.c:fopen_excl() in 1.11 introduced a problem,
> which I didn't notice until now.  Before, its second argument was "int
> binary", and now it's "bool binary".  Unfortunately, I was using more
> than one bit in "binary" (in src/http.c), and this change to "bool"
> defeats my change to get the desired stream_lf file format on VMS. 
> Also, the C macro FOPEN_BIN_FLAG in src/http.c was being defined, but
> not used.  Look for FOPEN_BIN_FLAG in src/http/c.  For my use, I simply
> changed the "bool" back to "int", but it might be classier to create an
> appropriate "enum" or something for this parameter.
> 
> ALP $ gdiff -u http.c_orig http.c
> --- http.c_orig 2009-09-08 11:33:28 -0500
> +++ http.c      2009-09-08 14:21:45 -0500
> @@ -2300,7 +2300,7 @@
>  # define FOPEN_OPT_ARGS "fop=sqo", "acc", acc_cb, &open_id
>  # define FOPEN_BIN_FLAG 3
>  #else /* def __VMS */
> -# define FOPEN_BIN_FLAG 1
> +# define FOPEN_BIN_FLAG true
>  #endif /* def __VMS [else] */
> 
>    /* Open the local file.  */
> @@ -2333,7 +2333,7 @@
>          }
>        else
>          {
> -          fp = fopen_excl (hs->local_file, true);
> +          fp = fopen_excl (hs->local_file, FOPEN_BIN_FLAG);
>            if (!fp && errno == EEXIST)
>              {
>                /* We cannot just invent a new name and use it (which is
> 
> ALP $ gdiff -u utils.c_orig utils.c
> --- utils.c_orig        2009-09-08 11:33:28 -0500
> +++ utils.c     2009-09-08 14:18:20 -0500
> @@ -698,7 +698,7 @@
>     appropriately.  */
> 
>  FILE *
> -fopen_excl (const char *fname, bool binary)
> +fopen_excl (const char *fname, int binary)
>  {
>    int fd;
>  #ifdef O_EXCL
> 
> ALP $ gdiff -u utils.h_orig utils.h
> --- utils.h_orig        2009-09-08 11:33:28 -0500
> +++ utils.h     2009-09-08 14:27:29 -0500
> @@ -84,7 +84,7 @@
>  int make_directory (const char *);
>  char *unique_name (const char *, bool);
>  FILE *unique_create (const char *, bool, char **);
> -FILE *fopen_excl (const char *, bool);
> +FILE *fopen_excl (const char *, int);
>  char *file_merge (const char *, const char *);
> 
>  int fnmatch_nocase (const char *, const char *, int);

Yeah I'll apply that.

> 7.  src/main.c unconditionally uses LOCALEDIR:

... well, we unconditionally define it (to an empty value in some
circumstances), but yeah, this makes sense.
> 
> ALP $ gdiff -u main.c_orig main.c
> --- main.c_orig 2009-09-08 11:33:28 -0500
> +++ main.c      2009-09-08 14:23:35 -0500
> @@ -825,9 +825,11 @@
>    printf (_("    %s (system)\n"), SYSTEM_WGETRC);
>  #endif
> 
> +#ifdef ENABLE_NLS
>    format_and_print_line (locale_title,
>                          LOCALEDIR,
>                          MAX_CHARS_PER_LINE);
> +#endif /* def ENABLE_NLS */
> 
>    format_and_print_line (compile_title,
>                          compilation_string,
> 
> 8.  src/sysdep.h unconditionally includes <stdint.h>:

Again, guaranteed to exist (though here we'll get the one in lib/,
rather than md5/; same contents, though, since it's the same source).

> 9.  src/wget.h unconditionally includes <alloca.h>:

Also provided in lib/.

> 10.  The CSS code (CSS-URL.OBJ) appears to need Lex/Flex run-time, which
> is not typically found on VMS systems.  I haven't yet decided what to do
> about this.  I'll probably make CSS support a build-time option, and try
> to find a suitable Lex/Flex/whatever to use on VMS, if such exists.

The source packages will include css.c. Automake takes care of that
automatically.

> 11.  With the new lib and md5 directories (and the CSS trouble), the VMS
> builders need some work/reorg, and I haven't yet decided how much to
> rewrite.
> 
>    I'm sure that there's more to do, but that looked like a good start.
> 
>    I didn't see any library problems this time on Solaris.  I haven't
> been paying close attention, but if anyone tried to fix that, then it
> may have worked.

Yeah, I did OpenSolaris 09.06, with good results.

>    This step:
>       Making info file `wget.info' from `wget.texi'.
> did fail with a bunch of error messages.  I assume that I have more
> obsolete tools in need of updates, but I haven't looked yet.

Requires certain tools. The .info appears in source packages.

I need to step up this automated packaging thing, looks like. :)

...on the other hand, making modifications to some files (configure.ac,
Makefile.am) and testing them, is kind of hampered if you haven't got
the appropriate kit.

The wiki has an explanation of what the requirements are for building
from the dev sources... not everything listed is required, and it tries
to explain what each item is used for.
http://wget.addictivecode.org/RepositoryAccess#compiling

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqrBoIACgkQ7M8hyUobTrG9qwCffwr30H4vFAFF2SOr096B/Za5
XygAnj7deAqHCiVqbqho99fnIG0zVR2u
=ZnoF
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]