Re: [gamin] some portability stuff
- From: Michael Banck <mbanck debian org>
- To: gamin-list gnome org
- Subject: Re: [gamin] some portability stuff
- Date: Fri, 24 Sep 2004 16:50:24 +0200
On Mon, Sep 20, 2004 at 06:08:14AM -0400, Daniel Veillard wrote:
> On Sat, Sep 18, 2004 at 03:12:50PM +0200, Michael Banck wrote:
> Looked at it, applied to my tree, and then I forgot about it :-)
Thanks.
> I'm a bit surprized by "ENABLE_POLLING" since even with DNOTIFY
> (and possibly INOTIFY) there are case where we use only polling for
> some resources. Seems to me that ENABLE_POLLING means only that
> ENABLE_DNOTIFY and ENABLE_INOTIFY are not defined.
Yeah, that was the plan. I am not that intimate with the code, perhaps
this is superfluous.
> > Another problem I have not yet tackled is the unconditional use of
> > PATH_MAX in fam.h and gam_poll.c. POSIX only says PATH_MAX should define
> > the maximum path if the system actually has a limit. The GNU project
> > does not impose arbitrary system limit. This means PATH_MAX is not
> > defined on the GNU system, resulting in a build failure.
> >
> > The clean way would be to allocate memory dynamically for char *filename
> > and char *real, as filenames and paths seem to be a core business of
> > gamin (other projects just #define PATH_MAX to something arbitrary if it
> > is not defined). I do not know whether my C is good enough to produce a
> > proper patch for this, so I would like to know what you think about this
> > issue.
>
> I don't want to allow too big path, and want to minimize dynamic
> allocation, I think limiting path to a fixed lenght is a good thing in
> that specific case.
This would be good enough for the time being I guess. Something like
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
should work (/usr/include/linux/limits.h has that value here).
Can you change this, or should I send a patch?
thanks,
Michael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]