From 2bdc9f9e7a4e404bbc2b2adb02fe2dde55d46d32 Mon Sep 17 00:00:00 2001 From: begasus Date: Wed, 3 May 2017 19:11:04 +0200 Subject: fix gcc2 parse errors diff --git a/src/ftp.c b/src/ftp.c index dca07af..744dd62 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -492,7 +492,8 @@ int do_delete(_fsession * fsession, char * filename){ printout(vDEBUG, _("RMD of directory %s failed, probably not empty; deleting recursively\n"), filename); /* save the current path so that we can cd back to it later, after the recursive delete */ - char * oldpath = cpy(fsession->ftp->current_directory); + { + char * oldpath = cpy(fsession->ftp->current_directory); char * newpath = malloc(strlen(fsession->ftp->current_directory) + 1 + strlen(filename) + 1); *newpath = '\0'; strcat(newpath, fsession->ftp->current_directory); @@ -511,7 +512,8 @@ int do_delete(_fsession * fsession, char * filename){ free(fsession->ftp->current_directory); fsession->ftp->current_directory = cpy(newpath); - struct fileinfo * dl = ftp_get_current_directory_list(fsession->ftp); + { + struct fileinfo * dl = ftp_get_current_directory_list(fsession->ftp); if(!dl) { res = ftp_get_list(fsession->ftp); @@ -543,6 +545,8 @@ int do_delete(_fsession * fsession, char * filename){ fsession->ftp->current_directory = cpy(oldpath); res = ftp_do_rmd(fsession->ftp, filename); } + } + } } else { printout(vDEBUG, "%s is a file, symlink or unknown; using DELE\n", filename); res = ftp_do_dele(fsession->ftp, filename); diff --git a/src/ftplib.c b/src/ftplib.c index cf83a18..a58fa42 100644 --- a/src/ftplib.c +++ b/src/ftplib.c @@ -607,7 +607,8 @@ int ftp_do_chmod(ftp_con * self, char * file) { int res; printout(vMORE, "==> SITE CHMOD %s %s ... ", opt.chmod, file); - char *value = malloc(strlen(opt.chmod) + { + char *value = malloc(strlen(opt.chmod) + 1 /* " " */ + strlen(file) + 1 /* \0 */); @@ -626,6 +627,7 @@ int ftp_do_chmod(ftp_con * self, char * file) { } printout(vMORE, _("\n")); return 0; + } } /* Global (hence stable) pseudo file pointer for Wget ftp_parse_ls(). */ diff --git a/src/queue.c b/src/queue.c index 9a5255e..b90f518 100644 --- a/src/queue.c +++ b/src/queue.c @@ -155,7 +155,8 @@ void separate_urls(void) { /* cut a trailing slash in the filename */ if (*(K->url + strlen(K->url) - 1) == '/') *(K->url + strlen(K->url) - 1) = '\0'; - char *d = strrchr(K->url + 6, '/'); + { + char *d = strrchr(K->url + 6, '/'); if(d) { int len = (d - K->url + 1); char * tmpurl = malloc(len + 1); @@ -165,6 +166,7 @@ void separate_urls(void) { free(K->url); K->url = tmpurl; } + } } else if (*(K->url + strlen(K->url) - 1) != '/') { K->url = realloc(K->url, strlen(K->url) + 2); strcat(K->url, "/"); diff --git a/src/socketlib.c b/src/socketlib.c index ab77d2b..391a600 100644 --- a/src/socketlib.c +++ b/src/socketlib.c @@ -51,6 +51,8 @@ #include #ifndef __HAIKU__ # include +#else +# include #endif #include #include -- 2.7.0 From 36f7241941d730c23fe1f0a37b8e031f9122a43f Mon Sep 17 00:00:00 2001 From: begasus Date: Wed, 3 May 2017 20:51:57 +0200 Subject: fix install paths diff --git a/Makefile.in b/Makefile.in index 6756cd2..99021ef 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ #wput makefile PACKAGE = @PACKAGE@ prefix = @prefix@ -datadir = $(prefix)/share -mandir = $(datadir)/man/man1 +datadir = @datadir@ +mandir = @mandir@ exec_prefix = @exec_prefix@ bindir=@bindir@ -- 2.7.0