bug-idutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11


From: Richard Lloyd
Subject: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11
Date: Thu, 17 Jun 2010 10:50:05 +0100 (BST)

I'm using HP's ANSI C compiler on PA-RISC and Itanium platforms running
HP-UX 11.11, 11.23 and 11.31 and came across a couple of code issues that
needed fixing:

* Line 666 of lib/stdio.in.h reads:

  _GL_CXXALIAS_RPL (printf, printf, int, (const char *format, ...));

  which has 4 parameters to the macro instead of 3. The first printf should
  be removed so that it reads:

  _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));

* Lines 150-153 of gnulib-tests/setenv.c read:

      new_environ =
        (char **) (last_environ == NULL
                   ? malloc ((size + 2) * sizeof (char *))
                   : realloc (last_environ, (size + 2) * sizeof (char *)));

  malloc() and realloc() both return (void *), so casting a (void *) to
  (char **) upsets the HP C compiler. The solution is to cast the
  malloc()/realloc() return value to (char *) first:

      new_environ =
        (char **) (last_environ == NULL
                   ? (char *)malloc ((size + 2) * sizeof (char *))
                   : (char *)realloc (last_environ, (size + 2) * sizeof (char 
*)));

On a non-coding issue, someone might want to update the top-level README file
of idutils, because it makes references to 'mkid' throughout (and no mention
of idutils at all!) and claims that "Version 4 will follow in the coming
months"...

HP-UX Archive Librarian,    E-mail queries: address@hidden
Connect Internet Solutions, Official HP-UX Archive WWW sites:
Liverpool,                  United Kingdom: http://hpux.connect.org.uk/
United Kingdom.             Netherlands:    http://hpux.its.tudelft.nl/
                            United States:  http://hpux.cs.utah.edu/



-- 
This e-mail (and any attachments) is private and confidential. If you have 
received it in error, please notify the sender immediately and delete it 
from your system. Do not use, copy or disclose the information in any way 
nor act in reliance on it.

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Connect
Internet Solutions Ltd. This e-mail and any attachments are believed to be
virus free but it is the recipient's responsibility to ensure that they are.

Connect Internet Solutions Ltd
(A company registered in England No: 04424350)
Registered Office: 4th Floor, New Barratt House, 47 North John Street,
Liverpool, L2 6SG
Telephone: +44 (0) 151 282 4321
Fax: +44 (0) 151 282 4322
VAT registration number: 758 2838 85



reply via email to

[Prev in Thread] Current Thread [Next in Thread]