Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121228204021.GE20323@brightrain.aerifal.cx>
Date: Fri, 28 Dec 2012 15:40:22 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] include/stdio.h: declare *asprintf with
 _BSD_SOURCE

On Fri, Dec 28, 2012 at 09:23:17AM -0500, Strake wrote:
> *asprintf is indeed declared in BSD stdio.h, so do the same in musl.

This change should be fine.

> commit 389e354a13ee040a9a413e61639be6d68ff1bc03
> Author: strake <strake888@...il.com>
> Date:   Fri Dec 28 09:20:13 2012 -0500
> 
>     include/stdio.h: declare *asprintf with _BSD_SOURCE
> 
> diff --git a/include/stdio.h b/include/stdio.h
> index 6e8e645..79b2c0f 100644
> --- a/include/stdio.h
> +++ b/include/stdio.h
> @@ -177,9 +177,12 @@ int putw(int, FILE *);
>  char *fgetln(FILE *, size_t *);
>  #endif
> 
> -#ifdef _GNU_SOURCE
> +#if defined _GNU_SOURCE || defined _BSD_SOURCE
>  int asprintf(char **, const char *, ...);
>  int vasprintf(char **, const char *, va_list);
> +#endif
> +
> +#ifdef _GNU_SOURCE

There's already an #if block just above that's GNU-or-BSD. I'm just
moving these two declarations into it rather than making a new one.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.