[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Re: Steven Schweda's VMS patch in mainline
From: |
Steven M. Schweda |
Subject: |
[Bug-wget] Re: Steven Schweda's VMS patch in mainline |
Date: |
Fri, 11 Sep 2009 00:14:17 -0500 (CDT) |
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.)
3. md5/md5.c may need stuff (uint32_t) from sysdep.h:
ALP $ gdiff -u md5.c_orig md5.c
--- md5.c_orig 2009-09-08 11:33:28 -0500
+++ md5.c 2009-09-08 13:38:07 -0500
@@ -22,6 +22,8 @@
#include <config.h>
+#include "sysdep.h"
+
#include "md5.h"
#include <stddef.h>
4. md5/md5.h unconditionally includes <stdint.h>:
ALP $ gdiff -u md5.h_orig md5.h
--- md5.h_orig 2009-09-08 11:33:28 -0500
+++ md5.h 2009-09-10 23:42:05 -0500
@@ -22,7 +22,9 @@
#define _MD5_H 1
#include <stdio.h>
-#include <stdint.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif /* def HAVE_STDINT_H */
#define MD5_DIGEST_SIZE 16
#define MD5_BLOCK_SIZE 64
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);
7. src/main.c unconditionally uses LOCALEDIR:
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>:
ALP $ gdiff -u sysdep.h_orig sysdep.h
--- sysdep.h_orig 2009-09-08 11:33:28 -0500
+++ sysdep.h 2009-09-08 14:26:08 -0500
@@ -117,7 +117,9 @@
#ifdef HAVE_INTTYPES_H
/* Compaq C V6.5-303 (dtk) on HP Tru64 UNIX V5.1B (Rev. 2650) needs: */
-# include <stdint.h>
+# ifdef HAVE_STDINT_H
+# include <stdint.h>
+# endif /* HAVE_STDINT_H */
# include <inttypes.h>
#endif
(Was that my fault?)
9. src/wget.h unconditionally includes <alloca.h>:
ALP $ gdiff -u wget.h_orig wget.h
--- wget.h_orig 2009-09-08 11:33:28 -0500
+++ wget.h 2009-09-08 17:30:24 -0500
@@ -208,7 +208,9 @@
#include "options.h"
/* Everything uses this, so include them here directly. */
-#include <alloca.h>
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif /* def HAVE_ALLOCA_H */
#include "xalloc.h"
/* Likewise for logging functions. */
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.
%ILINK-W-NUDFSYMS, 4 undefined symbols:
%ILINK-I-UDFSYM, YYLENG
%ILINK-I-UDFSYM, YYLEX
%ILINK-I-UDFSYM, YYTEXT
%ILINK-I-UDFSYM, YY_SCAN_BYTES
(All referenced in CSS-URL.OBJ.)
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.
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.
------------------------------------------------------------------------
Steven M. Schweda address@hidden
382 South Warwick Street (+1) 651-699-9818
Saint Paul MN 55105-2547
- [Bug-wget] Re: Steven Schweda's VMS patch in mainline,
Steven M. Schweda <=