[Bug admin/18022] New: change in libiberty.h prevents compilation by IBM C compiler

2015-02-25 Thread aixtools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18022

Bug ID: 18022
   Summary: change in libiberty.h prevents compilation by IBM C
compiler
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: critical
  Priority: P2
 Component: admin
  Assignee: unassigned at sourceware dot org
  Reporter: aixtools at gmail dot com

I was able to compile and build binutils-2.24 without any real issues. However,
version 2.25 will not build.

make stops with the following error


Details:

  +103  /* HAVE_DECL_* is a three-state macro: undefined, 0 or 1.  If it is
  +104 undefined, we haven't run the autoconf check so provide the
  +105 declaration without arguments.  If it is 0, we checked and failed
  +106 to find the declaration so provide a fully prototyped one.  If it
  +107 is 1, we found it so don't provide any declaration at all.  */
  +108  #if !HAVE_DECL_BASENAME
  +109  #if defined (__GNU_LIBRARY__ ) || defined (__linux__) \
  +110   || defined (__FreeBSD__) || defined (__OpenBSD__) || defined
(__NetBSD__) \
  +111   || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined
(__MINGW32__) \
  +112   || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME)
  +113  extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL
ATTRIBUTE_NONNULL(1);
  +114  #else
  +115  /* Do not allow basename to be used if there is no prototype seen.  We
  +116 either need to use the above prototype or have one from
  +117 autoconf which would result in HAVE_DECL_BASENAME being set.  */
  +118  #define basename basename_cannot_be_used_without_a_prototype
  +119  #endif
  +120  #endif

The important part of the diff for this file between 2.24 and 2.25 is:
--- ./binutils-2.24/include/libiberty.h 2013-11-04 15:33:39 +
+++ ./binutils-2.25/include/libiberty.h 2014-10-14 07:32:04 +
...
@@ -106,8 +106,11 @@
to find the declaration so provide a fully prototyped one.  If it
is 1, we found it so don't provide any declaration at all.  */
 #if !HAVE_DECL_BASENAME
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__)
|| defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) ||
defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
-extern char *basename (const char *);
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) \
+ || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \
+ || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \
+ || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME) 
+extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL
ATTRIBUTE_NONNULL(1);
 #else
 /* Do not allow basename to be used if there is no prototype seen.  We
either need to use the above prototype or have one from
...

Hopefully, this will not be too difficult to correct.

If you need any additional info (e.g., config.log) - just ask.

Michael

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/18022] change in libiberty.h prevents compilation by IBM C compiler

2015-02-25 Thread aixtools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18022

--- Comment #2 from Michael  ---
My bad - was stil asleep I guess...

/opt/bin/make > build/aix/make.out # only text to stderr shown
"./regex.c", line 31.3: 1506-224 (I) Incorrect pragma ignored.
"/usr/include/alloca.h", line 34.1: 1506-224 (I) Incorrect pragma ignored.
"./../include/libiberty.h", line 113.24: 1506-172 (S) Parameter type list for
function basename contains parameters without identifiers.
"./../include/libiberty.h", line 113.38: 1506-276 (S) Syntax error: possible
missing '{'?
make[2]: *** [cp-demangle.o] Error 1
make[1]: *** [all-libiberty] Error 2
make: *** [all] Error 2
/opt/bin/make returned an error

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils