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

Re: Linux/Hurd compatibility



On Fri, May 14, 1999 at 04:59:49PM -0700, Dean Hudson wrote:
> On Wed, 12 May 1999, Marcus Brinkmann wrote:
> 
> > I have less problems with programs that use /proc than with programs which
> > rely on the slight POSIX incompleteness/incompatibility of Linux. For
> > example, it is a bit easier to program if you know PATH_MAX is an integer...
> > but if it is not defined, you need to check with sysconf and cope with
> > unlimited paths. On Linux, PATH_MAX is defined, so most people simply rely
> > on it.
> 
> I've looked at this a just a wee bit. It should be pretty easy to check if
> sysconf( _SC_LINE_MAX ) returns -1 without error. But I'm not quite sure
> what the desired behavior is exactly. I'm a bit of a rookie; I'm not quite
> clear on what should be done in terms of allocating memory in this case.

Exactly what I don't know :)

Please look at thee sources of inetutils. I *know* there are good examples
because this is what they had to do to port the net stuff to GNU. You can
ask the inetutils author if you have further questions about this (or ask on
bug-hurd). You are on the right track, go, Dean, go!

Here is a small list of programs which have this problem. It is far from
complete:

Package debianutils, file run-parts.c, uses PATH_MAX.
Package bsdmainutils, file calendar.c an write.c, use MAXPATHLEN and
MAXHOSTNAMELEN.
Package bsdutils, file wall.c, uses MAXHOSTNAMELEN.
Package cron, file database.c, uses MAXPATHLEN.

If you can clobber together an example, it may be easy for me to adjust
further programs on-the-fly while compiling them. But figuring out this
first example would help a lot. I have too much to do to look at inetutils
myself. This weekend, I will have a go at X, wish me luck!

Thanks!
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org   finger brinkmd@ 
Marcus Brinkmann              GNU    http://www.gnu.org     master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Reply to: