Re: Wget 1.8-beta2 now available
On 2001-12-01 23:30 +0100, Hrvoje Niksic wrote: Here is the next 1.8 beta. Please test it if you can -- try compiling it on your granma's Ultrix box, run it on your niece's flashy web site, see if cookies work, etc. Get it from: ftp://gnjilux.srk.fer.hr/pub/unix/util/wget/.betas/wget-1.8-beta2.tar.gz Success: - Debian GNU/Linux woody, 80x86, GCC 2.95.4 - Solaris 7, SPARC, GCC 2.95.2 Failure: - HP-UX 10.0, PA-RISC, GCC 3.0.1 Problem #1 : gcc -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c connect.c connect.c: In function `test_socket_open': connect.c:190: warning: passing arg 2 of `select' from incompatible pointer type connect.c: In function `select_fd': connect.c:283: warning: passing arg 2 of `select' from incompatible pointer type connect.c:283: warning: passing arg 3 of `select' from incompatible pointer type connect.c:283: warning: passing arg 4 of `select' from incompatible pointer type (These are just warnings.) Problem #2 : gcc -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c host.c host.c: In function `lookup_host': host.c:258: `h_errno' undeclared (first use in this function) host.c:258: (Each undeclared identifier is reported only once host.c:258: for each function it appears in.) Apparently, h_errno is not declared at all under HP-UX (ie. find /usr/include -follow -type f | xargs grep h_errno turns up nothing). Declaring h_errno (extern int h_errno;) fixes the problem. I suppose we need something like : #if HPUX extern int h_errno; #endif Problem #3 : gcc -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c snprintf.c snprintf.c: In function `dopr': snprintf.c:311: `short int' is promoted to `int' when passed through `...' snprintf.c:311: (so you should pass `int' not `short int' to `va_arg') snprintf.c:323: `short unsigned int' is promoted to `int' when passed through `...' snprintf.c:335: `short unsigned int' is promoted to `int' when passed through `...' snprintf.c:349: `short unsigned int' is promoted to `int' when passed through `...' GCC has become very annoying with that sort of things... I did the suggested changes and the error messages vanished. - OSF/1 4.0, alpha, DEC C 5.6 Problem #1 : cc -std1 -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O -Olimit 2000 -c host.c cc: Error: host.c, line 221: In the initializer for lst[0], tmpstore does not have a constant address, but occurs in a context that requires an address constant. This is an extension of the language. char *lst[] = { tmpstore, NULL }; --^ The error message is misleading, IMO. The real problem is that we're initialising an auto array, which is something C does not support, at least not C89/C90. The following patch silences the compiler : diff -ur wget-1.8-beta2/src/host.c wget-1.8-beta2_aym/src/host.c --- wget-1.8-beta2/src/host.c Fri Nov 30 11:50:29 2001 +++ wget-1.8-beta2_aym/src/host.c Mon Dec 3 16:30:58 2001 @@ -218,7 +218,7 @@ if ((int)addr != -1) { char tmpstore[IP4_ADDRESS_LENGTH]; - char *lst[] = { tmpstore, NULL }; + char *lst[2]; /* ADDR is defined to be in network byte order, which is what this returns, so we can just copy it to STORE_IP. However, @@ -232,6 +232,8 @@ offset = 0; #endif memcpy (tmpstore, (char *)addr + offset, IP4_ADDRESS_LENGTH); + lst[0] = tmpstore; + lst[1] = NULL; return address_list_new (lst); } Problem #2 : There is also this shit. Take a deep breath : cc: Warning: snprintf.c, line 128: In this declaration, type signed long long is a language extension. LLONG value, int base, int min, int max, int flags); ---^ cc: Warning: snprintf.c, line 170: In this declaration, type signed long long is a language extension. LLONG value; --^ cc: Warning: snprintf.c, line 315: In this statement, type signed long long is a language extension. value = va_arg (args, LLONG); --^ cc: Warning: snprintf.c, line 315: In this statement, type signed long long is a language extension. value = va_arg (args, LLONG); --^ cc: Warning: snprintf.c, line 315: In this statement, type signed long long is a language extension. value = va_arg (args, LLONG); --^ cc: Warning: snprintf.c, line 315: In this statement, type signed long long is a language extension.
Re: Wget 1.8-beta2 now available
On Mon, 3 Dec 2001, Andre Majorel wrote: Problem #2 : gcc -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c host.c host.c: In function `lookup_host': host.c:258: `h_errno' undeclared (first use in this function) host.c:258: (Each undeclared identifier is reported only once host.c:258: for each function it appears in.) Apparently, h_errno is not declared at all under HP-UX (ie. find /usr/include -follow -type f | xargs grep h_errno turns up nothing). Declaring h_errno (extern int h_errno;) fixes the problem. I suppose we need something like : #if HPUX extern int h_errno; #endif Better yet: #if !HAVE_DECL_H_ERRNO extern int h_errno; #endif and use AC_CHECK_DECLS(h_errno,,,[#include netdb.h]) somewhere in configure.in. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--+ +e-mail: [EMAIL PROTECTED], PGP key available+
Re: Wget 1.8-beta2 now available
On 2001-12-03 18:30 +0100, Hrvoje Niksic wrote: Andre Majorel [EMAIL PROTECTED] writes: gcc -I. -I.-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\ -DLOCALEDIR=\/usr/local/share/locale\ -O2 -Wall -Wno-implicit -c connect.c connect.c: In function `test_socket_open': connect.c:190: warning: passing arg 2 of `select' from incompatible pointer type connect.c: In function `select_fd': connect.c:283: warning: passing arg 2 of `select' from incompatible pointer type connect.c:283: warning: passing arg 3 of `select' from incompatible pointer type connect.c:283: warning: passing arg 4 of `select' from incompatible pointer type (These are just warnings.) And weird ones, too. These arguments are of type pointer to fd_set. What would HPUX like to see there? HP-UX 10 wants (int *). However it defines fd_set as struct { long[]; } so it works anyway. HP-UX 10 is wrong. SUS2 (and POSIX ?) say (fd_set *). HP-UX 11 has it right. I suppose the best thing to do is to ignore those warnings. I think I'll use something like: #ifndef h_errno extern int h_errno; #endif h_errno is not necessarily a macro ! What do you think of Maciej's proposal ? Two questions here: * Does HPUX really not have snprintf()? It sounds weird that a modern OS wouldn't have it. I find describing HP-UX 10 as a modern OS mildly amusing. :-) I completely disagree with your perception that snprintf() is to be taken for granted. It's only since C99 that's it's part of C. But to answer your question, no HP-UX doesn't have it (neither in the headers nor in libc). * short int is promoted to int, ok. Does that go for all the architectures, or just some? Should I simply replace short int with int to get it to compile? Yes, replace short int and unsigned short by int. It's not architecture specific, the same thing happened to me on x86. GCC 2.95 doesn't care, GCC 2.96 and 3.0 complain. The error message is misleading, IMO. The real problem is that we're initialising an auto array, which is something C does not support, at least not C89/C90. Indeed. I wonder why I thought that was legal C. Ok, I'll apply your patch. Not enough cafeine. :-) -- André Majorel URL:http://www.teaser.fr/~amajorel/ (Not speaking for my employer, etc.)
Re: Wget 1.8-beta2 now available
Andre Majorel [EMAIL PROTECTED] writes: And weird ones, too. These arguments are of type pointer to fd_set. What would HPUX like to see there? HP-UX 10 wants (int *). However it defines fd_set as struct { long[]; } so it works anyway. HP-UX 10 is wrong. SUS2 (and POSIX ?) say (fd_set *). HP-UX 11 has it right. I suppose the best thing to do is to ignore those warnings. Agreed. I think I'll use something like: #ifndef h_errno extern int h_errno; #endif h_errno is not necessarily a macro ! I know that. The above code says: if h_errno is a macro, do nothing. otherwise, declare it. What do you think of Maciej's proposal ? It sounds like the right thing to do. Two questions here: * Does HPUX really not have snprintf()? It sounds weird that a modern OS wouldn't have it. I find describing HP-UX 10 as a modern OS mildly amusing. :-) How old is it? I used to work on HPUX 9, and I'm not old by most definitions of the word. I completely disagree with your perception that snprintf() is to be taken for granted. It's only since C99 that's it's part of C. It's been a part of C since C99, that's true. But Wget relies on a lot of functionality not strictly in C, from alloca to the socket interface. Also, snprintf has become a big security thing recently, when a number of exploits was based on overflowing a buffer written to by sprintf. The pressure on vendors might be responsible for some of them being unusually swift in providing the function. But yes, I know I can't take it for granted, hence the provided replacement. But to answer your question, no HP-UX doesn't have it (neither in the headers nor in libc). HPUX 11 doesn't have it either? Interesting. * short int is promoted to int, ok. Does that go for all the architectures, or just some? Should I simply replace short int with int to get it to compile? Yes, replace short int and unsigned short by int. It's not architecture specific, the same thing happened to me on x86. GCC 2.95 doesn't care, GCC 2.96 and 3.0 complain. Ah, ok. Thanks for the info.
Re: Wget 1.8-beta2 now available
On 2001-12-01 23:30 +0100, Hrvoje Niksic wrote: Here is the next 1.8 beta. Please test it if you can -- try compiling it on your granma's Ultrix box, run it on your niece's flashy web site, see if cookies work, etc. Get it from: ftp://gnjilux.srk.fer.hr/pub/unix/util/wget/.betas/wget-1.8-beta2.tar.gz Success: - NCR MP-RAS 3.0, x86, NCR High Performance C Compiler R3.0c - FreeBSD 4.0, x86, GCC 2.95.2 Thanks ! -- André Majorel URL:http://www.teaser.fr/~amajorel/ (Not speaking for my employer, etc.)
Re: Wget 1.8-beta2 now available
Maciej W. Rozycki [EMAIL PROTECTED] writes: Better yet: #if !HAVE_DECL_H_ERRNO extern int h_errno; #endif and use AC_CHECK_DECLS(h_errno,,,[#include netdb.h]) somewhere in configure.in. My version of Autoconf does not have an AC_CHECK_DECLS macro.
Re: Wget 1.8-beta2 now available
On Mon, 3 Dec 2001, Hrvoje Niksic wrote: and use AC_CHECK_DECLS(h_errno,,,[#include netdb.h]) somewhere in configure.in. My version of Autoconf does not have an AC_CHECK_DECLS macro. Hmm, how about considering autoconf 2.52? It is said to be less broken than 2.13 and indeed it seems so. If it's too late for such a transition, which I suppose it is (admittedly, the jump from 1.7.1 to 1.8 was done an express way), you may just borrow the macro from autoconf until the transition is done. This way it's done the compatible way. I may see how to do this, but I have no free time slots at the moment, so I may be unable to code anything until the next week. Anyone feel free to do it sooner. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--+ +e-mail: [EMAIL PROTECTED], PGP key available+
Re: Wget 1.8-beta2 now available
On 2001-12-03 19:16 +0100, Hrvoje Niksic wrote: I find describing HP-UX 10 as a modern OS mildly amusing. :-) How old is it? I used to work on HPUX 9, and I'm not old by most definitions of the word. Around 1995. I completely disagree with your perception that snprintf() is to be taken for granted. It's only since C99 that's it's part of C. It's been a part of C since C99, that's true. But Wget relies on a lot of functionality not strictly in C, from alloca to the socket interface. Also, snprintf has become a big security thing recently, when a number of exploits was based on overflowing a buffer written to by sprintf. The pressure on vendors might be responsible for some of them being unusually swift in providing the function. But yes, I know I can't take it for granted, hence the provided replacement. Yes, I'm with you on that. We have exactly the same problems as you here and I for one wish snprintf() had been there from the start. But to answer your question, no HP-UX doesn't have it (neither in the headers nor in libc). HPUX 11 doesn't have it either? Interesting. HP-UX 10 doesn't but HP-UX 11 has it, according to docs.hp.com. The work you did on the list of already downloaded URLs seems to have been efficient ; Wget's long standing tendency to forget files in recursive downloads appears to be gone. A million thanks to Hrvoje, the contributors and the testers. -- André Majorel URL:http://www.teaser.fr/~amajorel/ (Not speaking for my employer, etc.)
Re: Wget 1.8-beta2 now available
Maciej W. Rozycki [EMAIL PROTECTED] writes: On Mon, 3 Dec 2001, Hrvoje Niksic wrote: and use AC_CHECK_DECLS(h_errno,,,[#include netdb.h]) somewhere in configure.in. My version of Autoconf does not have an AC_CHECK_DECLS macro. Hmm, how about considering autoconf 2.52? Yes, but not before the 1.8 release. I'd like this week to be a stabilizing period, with no new features or instabilities. It is said to be less broken than 2.13 and indeed it seems so. Autoconf 2.13 works for Wget, so I'm not all that eager to replace it. Let them stabilize 2.52 some more. I have no desire to be mutilated by the bleeding edge of Autoconf development. you may just borrow the macro from autoconf until the transition is done. This way it's done the compatible way. I may see how to do this, but I have no free time slots at the moment, so I may be unable to code anything until the next week. Anyone feel free to do it sooner. IMO there is no reason for that. The solution from Wget 1.7.1 may not be pretty, but it worked on all known architectures without a single bug report about it: #ifndef h_errno # ifndef __CYGWIN__ extern int h_errno; # endif #endif That should be good enough for 1.8.
Wget 1.8-beta2 now available
Here is the next 1.8 beta. Please test it if you can -- try compiling it on your granma's Ultrix box, run it on your niece's flashy web site, see if cookies work, etc. Get it from: ftp://gnjilux.srk.fer.hr/pub/unix/util/wget/.betas/wget-1.8-beta2.tar.gz (The `.betas' directory is intentionally unreadable, but the file is there.)
Re: Wget 1.8-beta2 now available
On Sat, 1 Dec 2001, Hrvoje Niksic wrote: Here is the next 1.8 beta. Please test it if you can -- try compiling it on your granma's Ultrix box, run it on your niece's flashy web site, see if cookies work, etc. Get it from: ftp://gnjilux.srk.fer.hr/pub/unix/util/wget/.betas/wget-1.8-beta2.tar.gz It compiled fine for me on my shell account at my ISP (Alpha-dec-osf4.0) and on my home Redhat Linux 6.2 system. (On the linux box, I had to edit the Makefile to deal with undefined symbols in main.c when compiling beta1 but this issue was resolved with beta2.) The --limit-rate option is a real plus for those of us with dialup connections. It's nice being able to control our downloads *hogging* of the limited bandwidth. Thanks. Jesse McDonnell
Re: Wget 1.8-beta2 now available
Hello. Here is the next 1.8 beta. Please test it if you can -- try compiling it on your granma's Ultrix box, run it on your niece's flashy web site, see if cookies work, etc. Get it from: ftp://gnjilux.srk.fer.hr/pub/unix/util/wget/.betas/wget-1.8-beta2.tar.gz Please pay attention to po files before the release of wget 1.8. I would appreciate if you (or the one in charge) would update Translation Project's information and wait for submission of new po files. Just to be sure, ja.po for wget-1.8-beta2 is attached. Thanks in advance. -- Hiroshi Takekawa [EMAIL PROTECTED] Dept. of Information Engineering, The University of Tokyo. wget-1.8-beta2.ja.po.bz2 Description: Binary data