libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF is not defined.
authorMichael Forney <mforney@mforney.org>
Fri, 26 Apr 2019 15:35:01 +0000 (15:35 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 26 Apr 2019 15:35:01 +0000 (09:35 -0600)
* libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF
is not defined.

From-SVN: r270605

include/ChangeLog
include/libiberty.h

index ffa48aef7c4bf85827c99937cfae140a6a05536f..fe77f86b73398423edde0b6b0308cac228fad404 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-26  Michael Forney  <mforney@mforney.org>
+
+       * libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF
+       is not defined.
+
 2019-04-03  Vineet Gupta  <vgupta@synopsys.com>
 
        PR89877
index 574761350267b1eaa281343a11fe5dd5c737f9e5..e11aa97f0baa16da765c78e87dcf9d19f2720ff1 100644 (file)
@@ -649,7 +649,7 @@ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
 
 extern char *xasprintf (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF_1;
 
-#if !HAVE_DECL_VASPRINTF
+#if defined(HAVE_DECL_VASPRINTF) && !HAVE_DECL_VASPRINTF
 /* Like vsprintf but provides a pointer to malloc'd storage, which
    must be freed by the caller.  */