cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Build Curl-7.8 on IRIX

From: Nielsen Linus <Linus.Nielsen_at_elema.siemens.se>
Date: Fri, 6 Jul 2001 16:47:53 +0200

> I have recently downloaded the program, and I'm working to
> get it compiled on IRIX platform. While compiling the code
> the compiler generated the many warnings. I hope that you
> will find the attached messages usefull.

Very useful. Thank you.

> I wanted to point out a possible bug in the installation
> procedure. After unpacking the .tar.gz file, I run the ocnfigure
> scripts, and tried to compile the code (as a regular user). I
> switched to 'root' to install the code into /usr/local/bin. However
> when I switched to 'root' I could not run the install target,
> since the 'config.h' file was not up-to-date. (The root user does
> not have write access to user home directories):
>
> Makefile output:
> cd . \
> && CONFIG_FILES= CONFIG_HEADERS=config.h \
> /bin/sh ./config.status
> ./config.status[29]: conf38541.file: cannot create: Permission denied
> config.status: creating config.h
> config.status: config.h is unchanged
> ./config.status[812]: stamp-h1: cannot create: Permission denied
>
> I examines the Makefilested the code, and found out that I
> can solve the problem by explictly 'touching' the following files:
> touch config.h
> touch stamp-h1
> touch config.h.in
>
> I will appreciate if you can fix this install issue for your
> next release.

We'll look into that. I'm not an autoconf guru, but I assume
that there are other people on this list that know more than I do.
I guess you're one of the first to see this, as 'root' normally
has write access to the home directories on most systems.

About the warnings, most of them are harmless, but there are a few
that are serious:

> cc-1183 cc: WARNING File = file.c, Line = 170
> An unsigned integer is being compared to zero.
>
> if (0 <= nread)
> ^

This warning is plain stupid. I can't see why this comparison would
break regardless of sign. However, a few lines further down, there
is a comparison that _will_ break (and why your compiler doesn't warn
about that one is a mystery to me):

    if (nread <= 0)
      break;

Please change the type of 'nread' and 'expected_size' to ssize_t:

  size_t expected_size=-1;
  size_t nread;

Next serious warning:
> cc-1183 cc: WARNING File = ftp.c, Line = 678
> An unsigned integer is being compared to zero.
>
> if(nread < 0)
> ^

This is the same thing. Change the type of nread
to ssize_t instead:

  ssize_t nread;

I will make sure that we address these issues for the next release.

Good luck!

/Linus
Received on 2001-07-06