screen-devel
[Top][All Lists]
Advanced

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

Re: [screen-devel] [PATCH] Fixing configure script and removing LOTS of


From: Juergen Weigert
Subject: Re: [screen-devel] [PATCH] Fixing configure script and removing LOTS of GCC warnings on HP-UX
Date: Wed, 12 Nov 2008 01:39:07 +0100
User-agent: Mutt/1.5.7i

On Nov 11, 08 14:09:18 -0800, Micah Cowan wrote:
> > --- screen-4.0.3/os.h   2002-01-08 18:42:33.000000000 +0300
> > +++ screen-4.0.3.hpux/os.h      2008-11-11 22:18:00.000000000 +0300
> > @@ -83,7 +83,7 @@ extern int errno;
> >  #  define strlen ___strlen___
> >  #  include <string.h>
> >  #  undef strlen
> > -#  if !defined(NEWSOS) && !defined(__hpux)
> > +#  if !defined(NEWSOS)
> >      extern size_t strlen(const char *);
> >  #  endif
> >  # else /* SVR4 */
> > 
> 
> Better yet, perhaps we can remove that re-definition of strlen
> altogether. Anyone around here know what it was there for? Must have
> been some reason we throw out the system's idea of what strlen is...
> 

Not sure about this one. It mentions NEWSOS, giving me a hint at the time
when this code was written. (ca 15 years ago...)

I'd assume the intent was not a redefinition, but a first initial
declaration. With NEWSOS and __hpux being among the few systems 
that cared to ship a declaration of strlen in their header files at all.

It went unnoticed all the years, as int and size_t are pretty compatible 
on most systems -- at least for the actual sizes strings happen to have 
in screen.
I'd recommend to treat it the same as K&R prototypes: historical baggage.

        cheers,
                Jw.

-- 
 o \  Juergen Weigert      unix-software __/ _=======.=======_     
<V> | address@hidden         creator    __/        _---|____________\/    
 \  |            0179/2069677      __/          (____/            /\
(/) | ____________________________/              _/ \_ vim:set sw=2 wm=8




reply via email to

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