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.
                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.
                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 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 327: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 339: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 353: In this statement, type "unsigned long long" 
is a language extension.
                value = va_arg (args, unsigned LLONG);
      ------------------^
      cc: Warning: snprintf.c, line 409: In this declaration, type "signed long long" 
is a language extension.
                LLONG *num;
      ----------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 410: In this statement, type "signed long long" is 
a language extension.
                num = va_arg (args, LLONG *);
      ----------------^
      cc: Warning: snprintf.c, line 495: 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 498: In this declaration, type "unsigned long 
long" is a language extension.
        unsigned LLONG uvalue;
      --^

    Those are not fatal errors, just warnings.

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Not speaking for my employer, etc.)

Reply via email to