screen-devel
[Top][All Lists]
Advanced

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

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


From: Gavrichenkov, Artyom
Subject: [screen-devel] RE: [PATCH] Fixing configure script and removing LOTS of GCC warnings on HP-UX
Date: Wed, 12 Nov 2008 14:53:03 +0000

Hi,

>From:  Micah Cowan
>Subject:       Re: [screen-devel] [PATCH] Fixing configure script and removing 
>LOTS of GCC warnings on HP-UX
>Date:  Tue, 11 Nov 2008 14:09:18 -0800Gavrichenkov, Artyom wrote:
> /usr/local is generally reserved for... _locally_ installed libraries.
> It doesn't strike me as appropriate to hardcode some path from there
> into our configure script. It seems more appropriate to me that you give
> the configure script appropriate arguments;

Okay, looks like it's really just an issue with our local testbed 
configuration. Sorry!

> But this defines strlen to return the wrong type! (At least, the HP-UX
> machine I have handy has strlen returning int.)

On several HP-UX machines near me the following is true:

>printf '%s %s %s\n' `uname -s` `uname -r` `uname -m`
HP-UX B.11.23 ia64
>grep strlen /usr/include/string.h | grep -v ^#\ \*pragma
     extern int strlen();
         extern size_t strlen(char *);
         extern size_t strlen(const char *);
       extern size_t strlen();
>

where the first declaration is under #ifdef _CLASSIC_ANSI_TYPES -- this macro 
isn't used anywhere in Screen code, isn't it?

I may provide you our string.h if it's needed, but you may look in 
documentation as well: http://docs.hp.com/en/B2355-60127/index.html

Anyway, even in case some (old?) HP-UX versions had strlen() returning int 
(guess it converted to size_t), it's better to have a declaration with size_t 
than no declaration at all.

I've attached new patch. You may ignore it if you choose so (that's just 
warnings after all).

> Micah J. Cowan
> Programmer, musician, typesetting enthusiast, gamer.
> GNU Maintainer: wget, screen, teseq

Artyom Gavrichenkov | Engineer, HP Global Delivery Russia Center | Mailto: 
address@hidden | Tel. No: +7 916 515 4958

---
diff -Nurp screen-4.0.3/os.h screen-4.0.3.hpux/os.h
--- screen-4.0.3/os.h   2002-01-08 18:42:33.000000000 +0300
+++ screen-4.0.3.hpux/os.h  2008-11-12 17:26:11.000000000 +0300
@@ -79,16 +79,18 @@ extern int errno;
 #  include <strings.h>
 # endif /* NEWSOS */
 #else /* SYSV */
-# if defined(SVR4) || defined(NEWSOS)
+# if defined(__hpux)
+#  include <string.h>
+# elif defined(SVR4) || defined(NEWSOS)
 #  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 */
+# else /* __hpux */
 #  include <string.h>
-# endif /* SVR4 */
+# endif /* __hpux */
 #endif /* SYSV */

 #ifdef USEVARARGS




reply via email to

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