public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH/libiberty] fix build of gdb/binutils with clang.
@ 2015-04-28 22:30 Yunlian Jiang
  2015-05-01 22:45 ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: Yunlian Jiang @ 2015-04-28 22:30 UTC (permalink / raw)
  To: gcc-patches

I believe this is the same problem as
https://gcc.gnu.org/ml/gcc-patches/2008-07/msg00292.html

The asprinf declaration is  messed up when using clang to build gdb.

diff --git a/include/libiberty.h b/include/libiberty.h
index b33dd65..a294903 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -625,8 +625,10 @@ extern int pwait (int, int *, int);
 /* Like sprintf but provides a pointer to malloc'd storage, which must
    be freed by the caller.  */

+#ifndef asprintf
 extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
 #endif
+#endif

 /* Like asprintf but allocates memory without fail. This works like
    xmalloc.  */

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-22 20:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 22:30 [PATCH/libiberty] fix build of gdb/binutils with clang Yunlian Jiang
2015-05-01 22:45 ` Ian Lance Taylor
2015-05-01 23:45   ` Yunlian Jiang
2015-05-02 18:58     ` Ian Lance Taylor
2015-05-04 22:49       ` Yunlian Jiang
2015-05-05  0:30         ` Ian Lance Taylor
2015-05-18 23:52           ` Yunlian Jiang
2015-05-19  0:15             ` Ian Lance Taylor
2015-05-19 18:15               ` Yunlian Jiang
2015-05-19 18:16                 ` DJ Delorie
2015-05-19 18:16                 ` Ian Lance Taylor
2015-05-20 18:28                   ` Yunlian Jiang
2015-05-20 20:15                     ` Ian Lance Taylor
2015-05-20 23:27                       ` Yunlian Jiang
2015-05-22 21:25                         ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).