git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] compat-util: add _DEFAULT_SOURCE define

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2014, 19:02 UTC
Message-ID
<xmqq61go7lme.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1410672815-2555-1-git-send-email-sergey.senozhatsky@gmail.com>
Sergey Senozhatsky <sergey.senozhatsky@gmail.com> writes:
Show 8 quoted lines
> glibc has deprecated the use of _BSD_SOURCE define
>
>   warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
>
> To make it easier to maintain a cross platform source code, that
> warning can be suppressed by _DEFAULT_SOURCE.
>
> Define both _BSD_SOURCE, _DEFAULT_SOURCE and cleanup the build.

I can see you defined DEFAULT_SOURCE, but where did you do "cleanup the build"? Or did you mean "define both (in order) to clean up"?

Just making sure we are not only seeing a patch half eaten by mail transport somewhere.

Show 17 quoted lines
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> ---
>  git-compat-util.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 4e7e3f8..08a9ee2 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -82,6 +82,7 @@
>  #define _ALL_SOURCE 1
>  #define _GNU_SOURCE 1
>  #define _BSD_SOURCE 1
> +#define _DEFAULT_SOURCE 1
>  #define _NETBSD_SOURCE 1
>  #define _SGI_SOURCE 1
Previous: Sergey SenozhatskyNext: Sergey Senozhatsky
Message 2 of 3 in “compat-util: add _DEFAULT_SOURCE define”
  1. compat-util: add _DEFAULT_SOURCE defineSergey Senozhatsky, Sep 14, 2014
  2. Junio C HamanoSep 15, 2014
  3. Sergey SenozhatskySep 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.