]> sjero.net Git - wget/commitdiff
Fixes needed for VMS.
authorSteven Schweda <sms@antinode.info>
Sat, 12 Sep 2009 02:41:57 +0000 (19:41 -0700)
committerSteven Schweda <sms@antinode.info>
Sat, 12 Sep 2009 02:41:57 +0000 (19:41 -0700)
src/ChangeLog
src/ftp.c
src/http.c
src/main.c
src/utils.c
src/utils.h

index 5981e779cbeb51afba5b2cb344bc6cf3365a85be..f2ddf2581a4f9425276188343c411daa9a3ede67 100644 (file)
@@ -1,3 +1,17 @@
+2009-09-11  Steven Schweda  <sms@antinode.info>
+
+       * utils.c, utils.h (fopen_excl): Make second argument an int,
+       rather than a bool (so it can handle the appropriate VMS version
+       of the flag).
+
+       * main.c (print_version): Don't print LOCALEDIR unless NLS is
+       enabled.
+
+       * http.c (gethttp): Pass FOPEN_BIN_FLAG, instead of true.
+
+       * ftp.c (ftp_retrieve_glob): Cast strcmp to assign to cmp, for a
+       silly HP build environment.
+
 2009-09-08  Steven Schubiger  <stsc@member.fsf.org>
 
        * main.c, init.c: Mark the --preserve-permissions and 
index 38f439fb1f4ecc666629f1c6dec216834c21bae0..9d4344a8b9e57420d55f9a33932f7a91c9738716 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -2050,8 +2050,22 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action)
         }
       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)
             {
index 1b579bf194c9642e86b41c502ce1fcca8c53eb49..dfe03ce0e4cb3ef686adbe2b48bacbf82bf7050e 100644 (file)
@@ -2300,7 +2300,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
 # 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 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
         }
       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
index 7040738a79888d4f218bf57bb2015f6972f2f4ae..c74f6ca3a8309c9c7d9360dd906c690a7958a0b2 100644 (file)
@@ -825,9 +825,11 @@ print_version (void)
   printf (_("    %s (system)\n"), SYSTEM_WGETRC);
 #endif
 
+#ifdef ENABLE_NLS
   format_and_print_line (locale_title,
-                        LOCALEDIR, 
-                        MAX_CHARS_PER_LINE);
+                        LOCALEDIR,
+                        MAX_CHARS_PER_LINE);
+#endif /* def ENABLE_NLS */
   
   format_and_print_line (compile_title,
                         compilation_string,
index 4060aa5079cfaf570add0ec71d58d5b27d75f2e0..a9d729d42a69b449cf6998992f168ca5db42d6cf 100644 (file)
@@ -698,7 +698,7 @@ unique_create (const char *name, bool binary, char **opened_name)
    appropriately.  */
    
 FILE *
-fopen_excl (const char *fname, bool binary)
+fopen_excl (const char *fname, int binary)
 {
   int fd;
 #ifdef O_EXCL
index 4a31b37874583d8c38a931ca8d76831da3eb71d6..a645d52d102e3e939d9a4f3cd1bc8f936a5a0c0e 100644 (file)
@@ -84,7 +84,7 @@ wgint file_size (const char *);
 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);