[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[screen-devel] [PATCH] Fixing configure script and removing LOTS of GCC
From: |
Gavrichenkov, Artyom |
Subject: |
[screen-devel] [PATCH] Fixing configure script and removing LOTS of GCC warnings on HP-UX |
Date: |
Tue, 11 Nov 2008 20:03:46 +0000 |
Hi all,
While compiling GNU Screen sources on HP-UX operating system I faced two issues:
- configure script failed to locate termcap shared libraries;
- GCC produced a batch of warnings about "incompatible implicit declaration" of
strlen and (less frequent) strcpy functions.
It's interesting for me that all these warnings seem to be intended -- there's
even special #ifdef to generate them, but for what reason? Maybe the answer is
changes in HP-UX system headers since "os.h" header has been written, but I
don't know exactly.
I'm providing a fix for all this. The following patch is tested on HP-UX on
both IA64 (OS v11.23) and PA-RISC (OS v11.11) architectures with GNU Screen
4.0.3 and works good.
Artyom Gavrichenkov | Engineer, HP Global Delivery Russia Center | Mailto:
address@hidden | Tel. No: +7 916 515 4958
---
diff -Nurp screen-4.0.3/configure screen-4.0.3.hpux/configure
--- screen-4.0.3/configure 2003-12-05 16:46:53.000000000 +0300
+++ screen-4.0.3.hpux/configure 2008-11-11 22:16:48.000000000 +0300
@@ -4789,6 +4789,9 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
LIBS="-ltermcap $olibs"
+if [ `uname` = "HP-UX" ]; then
+ LIBS="-L/usr/local/lib/hpux32 "$LIBS
+fi
{ echo "$as_me:$LINENO: checking libtermcap..." >&5
echo "$as_me: checking libtermcap..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
@@ -7945,6 +7948,9 @@ if test -z "$old_CFLAGS"; then
fi
fi
test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+if [ `uname` = "HP-UX" ]; then
+ LIBS="-L/usr/local/lib/hpux32 "$LIBS
+fi
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross
compiling
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-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 */
- [screen-devel] [PATCH] Fixing configure script and removing LOTS of GCC warnings on HP-UX,
Gavrichenkov, Artyom <=