Fixes needed for VMS.

This commit is contained in:
Steven Schweda 2009-09-11 19:41:57 -07:00
parent bd3028f1cd
commit 5ef1d7b949
6 changed files with 36 additions and 6 deletions

View 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

View File

@ -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)
{

View 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

View 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,

View 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

View 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);