[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to build bash-3.0 on HP-UX 10.x/11.x
From: |
Harald Koenig |
Subject: |
patch to build bash-3.0 on HP-UX 10.x/11.x |
Date: |
Mon, 9 Aug 2004 12:04:20 +0200 |
User-agent: |
Mutt/1.4.2.1i |
Configuration Information [Automatically generated, do not change]:
Machine: hp9000s700
OS: HP-UX-B.11.11
Compiler: cc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='hp9000s700'
-DCONF_OSTYPE='HP-UX-B.11.11' -DCONF_MACHTYPE='hppa2.0w-hp-hpux11.11'
-DCONF_VENDOR='hp'
-DLOCALEDIR='/scr/toccata/koenig/bash-3.0/PREINSTALL//share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DHPUX -I.
-I/soft/bash/bash-3.0/bash-3.0 -I/soft/bash/bash-3.0/bash-3.0/include
-I/soft/bash/bash-3.0/bash-3.0/lib -I/soft/bash/bash-3.0/bash-3.0/lib/intl
-I/scr/toccata/koenig/bash-3.0/ARENA/lib/intl -O2 -D_LARGE_FILES
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500
uname output: HP-UX toccata B.11.11 U 9000/785 2008760960 unlimited-user license
Machine Type: hppa2.0w-hp-hpux11.11
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
bash-3 did not compile on HP-UX 10.20, 11.00, 11.11 and 11.22 (ia64)
for patches see below.
on HP-UX, "timezone is defined as a struct{} which causes this error message
(from 11.22)
Error 173: "/soft/bash/bash-3.0/bash-3.0/lib/sh/strftime.c", line 101 #
Redefined symbol 'timezone'; previously defined at ["/usr/include/sys/time.h",
line 611].
extern int timezone, altzone;
^^^^^^^^
and on hp-ux 11.00:
/soft/bash/bash-3.0/bash-3.0/lib/sh/strftime.c:101: error: conflicting
types for `timezone'
/usr/include/sys/time.h:450: error: previous declaration of `timezone'
/soft/bash/bash-3.0/bash-3.0/lib/sh/strftime.c: In function `strftime':
and there is no external variable "altzone", I'm using
a quick hack for now (see below)
/usr/ccs/bin/ld: Unsatisfied symbols:
altzone (first referenced in ./lib/sh/libsh.a(clock.o)) (data)
collect2: ld returned 1 exit status
gmake: *** [bash] Error 1
the patch for memalign() in malloc.c was needed only on hpux 11.22
(btw, why are there still non-ANSI K&R functions in bash source code ?!?!) :
Error 42: "/soft/bash/bash-3.0/bash-3.0/lib/malloc/malloc.c", line 1214
# ANSI C requires same function declarations to have compatible types. Previous
function declaration was "void *memalign(unsigned long,unsigned long)"
["/usr/include/stdlib.h", line 358].
memalign (alignment, size)
^^^^^^^^
gmake[1]: *** [malloc.o] Error 2
Repeat-By:
configure/make/make install ;-)
Fix:
-------------------------------------------------------------------------------
diff -ur orig/bash-3.0/lib/malloc/malloc.c bash-3.0/lib/malloc/malloc.c
--- orig/bash-3.0/lib/malloc/malloc.c Sat Dec 20 01:19:02 2003
+++ bash-3.0/lib/malloc/malloc.c Tue Aug 3 17:24:29 2004
@@ -1212,7 +1212,7 @@
PTR_T
memalign (alignment, size)
- unsigned int alignment;
+ size_t alignment;
size_t size;
{
return internal_memalign (alignment, size, (char *)NULL, 0, 0);
diff -ur orig/bash-3.0/lib/sh/strftime.c bash-3.0/lib/sh/strftime.c
--- orig/bash-3.0/lib/sh/strftime.c Thu Mar 4 04:13:23 2004
+++ bash-3.0/lib/sh/strftime.c Tue Aug 3 17:47:45 2004
@@ -95,8 +95,12 @@
#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
extern char *tzname[2];
extern int daylight;
-#if defined(SOLARIS) || defined(mips) || defined (M_UNIX)
+#if defined(SOLARIS) || defined(mips) || defined (M_UNIX) || defined(HPUX)
+#ifdef HPUX /* HAK:: */
+extern long int timezone;
+#else
extern long int timezone, altzone;
+#endif
#else
extern int timezone, altzone;
#endif
@@ -147,6 +151,9 @@
#endif /* HAVE_TZNAME */
#endif /* HAVE_TM_NAME */
#endif /* HAVE_TM_ZONE */
+#ifdef HPUX /* HAK:: */
+long int altzone = timezone-3600L;
+#endif
/* various tables, useful in North America */
static const char *days_a[] = {
Harald Koenig
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig \/\/\/\/\/\/\/\/\/
science+computing ag // / \\ \
koenig@science-computing.de ^^^^^ ^^^^^
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch to build bash-3.0 on HP-UX 10.x/11.x,
Harald Koenig <=