bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: progreloc.c


From: Paul Eggert
Subject: Re: progreloc.c
Date: Tue, 21 Nov 2006 15:35:28 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Charles Wilson <address@hidden> writes:

> http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00054.html
>
> Relevant to recent discussion about LGPL modules depending on GPL
> ones, this file has no module so was missed during that discussion.
> The message above sent last week provides a patch to fix *most* of the
> issues with progreloc -- save a license change on the progname module
> (which, I believe?, needs to come from RMS).
>
> However, the other fixes could be applied now, so that there is only
> one remaining GPL/LGPL issue, instead of four.

I looked at the change, and that's something that Bruno would have to
approve.  Some comments, anyway:

The code doesn't need to include pathmax.h or depend on the pathmax
module.  The code operates only if __linux__ is defined.  So you can
just include <limits.h> and use PATH_MAX.

local_readlink should not be defined if __linux__ is not defined,
since it's used only if __linux__ is defined.

There's no need to call strncpy.  strcpy will do.

I don't see why the buffer size is PATH_MAX + 2.  PATH_MAX + 1 should
do.

Please use GNU indenting style.


One other thing -- this is an independent issue.  The code doesn't
need to use 'open' -- 'stat' will do, if the resulting st_dev and
st_ino get saved into static storage.  This is true of both the GPLed
and LGPLed version.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]