[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11
From: |
Jim Meyering |
Subject: |
Re: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11 |
Date: |
Sun, 20 Jun 2010 13:39:59 +0200 |
Richard Lloyd wrote:
> 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, ...));
Thank you for the report.
Here's a patch for that one, in your name.
I'll push it to the gnulib repository later today.
>From 86ba51d2c17219b82b977da0a912e05a3d9bf858 Mon Sep 17 00:00:00 2001
From: Richard Lloyd <address@hidden>
Date: Sun, 20 Jun 2010 13:31:40 +0200
Subject: [PATCH] stdio.in.h: fix compilation failure when using HP-UX 11's C
compiler
* lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
This macro takes 3 arguments, not 4.
---
ChangeLog | 6 ++++++
lib/stdio.in.h | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8fe5099..27099b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-20 Richard Lloyd <address@hidden>
+
+ stdio.in.h: fix compilation failure when using HP-UX 11's C compiler
+ * lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
+ This macro takes 3 arguments, not 4.
+
2010-06-15 Giuseppe Scrivano <address@hidden>
ipv6: fix detection under mingw
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index ca8960e..135b084 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -661,7 +661,7 @@ _GL_FUNCDECL_RPL (printf, int,
(const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)))
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (printf, printf, int, (const char *format, ...));
+_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
# endif
# define GNULIB_overrides_printf 1
# else
--
1.7.1.664.gf1fb2
> * 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:
Can we get away with using no cast whatsoever?
i.e., removing the (char **) cast rather than adding two new ones?
> 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"...
Thanks! I've updated it.