[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: xgetdomainname.c should include stdlib.h
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] Re: xgetdomainname.c should include stdlib.h |
Date: |
Sun, 18 Apr 2004 23:32:51 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> Simon Josefsson <address@hidden> wrote:
>> Or maybe xalloc.h should include stdlib.h? It does define a macro
>> that uses free; but it is marked as deprecated...
>>
>> 2004-04-18 Simon Josefsson <address@hidden>
>>
>> * xgetdomainname.c: Include stdlib.h, for free.
> ...
>> /* Get errno. */
>> #include <errno.h>
>> +
>> +/* Get free. */
>> +#include <stdlib.h>
>>
>> #include "xalloc.h"
>
> I agree that including stdlib.h is better.
in xgetdomainname.c or xalloc.h?
> BTW, wouldn't it be better without the `Get ...' comments?
> The `Get errno.' one certainly doesn't add anything useful.
Yes, perhaps. The cases where I find those comments useful are when
checking if the header file is still required -- searching for the
function/variable name mentioned in the comment answer that quickly.
But generally, I appreciate consistency, so pick one approach and make
it so (perhaps even document the approach) -- right now I'm not sure
if there is a single approach in gnulib on this.