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

Re: ssh success



On Wed, Oct 25, 2000 at 01:25:55AM +0200, Marcus Brinkmann wrote:
> On Tue, Oct 24, 2000 at 07:05:04PM -0500, Neal H Walfield wrote:
> > > > openssh itself needed several kludges: I replaced MAXHOSTNAME in a
> > > > couple of files with a "enough for everyone" value. Evil, but at the
> > > > time I lacked the docs to do it right.
> > > 
> > > Well, this needs to be fixed with realloc() and a loop.
> > 
> > How about alloca and asprintf?
> 
> Well, alloca takes the memory from the stack frame. When this is okay I
> don't know. I don't know how huge the stack is on various architectures,
> and if this imposes a serious limit.
> 
> asprintf is not defined by any standard I know of (read: POSIX), so it
> imposes compatibility issues across unices. BSD and glibc have it.
> 
> Thanks,
> Marcus

True, but this kind of modification need not work on all platforms. Other
platforms are happy with the MAX*LEN macros. But they are needed for the
code to work properly on Hurd. And as far as I know the only C library for 
Hurd is glibc. All you need is a properly placed #ifdef __GNU__ in the code.

Igor



Reply to: