From: gskalla@garm.informatik.uni-osnabrueck.de (Gernot Skalla)
Subject: patch-2.012g8 for HP
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 26 Sep 1992 15:11:39 GMT

Dear David and other ones, who are involved,

yesterday I tried to compile 'patch-2.0.12g8' on a
HP9000/730 running HP-UX 8.07

The following problem occurred
	% configure
	  [...]
	% make
		cc -c -g  -I. version.c
		cc -g backupfile.o getopt.o getopt1.o inp.o patch.o pch.o util.o
	 version.o   -lPW -o patch
	/bin/ld: Duplicate symbol "fatal" in /lib/libPW.a(fatal.o)
	/bin/ld: Unsatisfied symbols:
	   Error (data)
	/bin/ld: Found 1 duplicate symbol(s)
	*** Error code 1

	Stop
	%

In  ftp.csc.liv.ac.uk:/hpux/Gnu/tar-1.111.tar.Z
I found some ideas, how to get it working.
I changed:

-------------------------- cut here ------------------------------------
*** /dev/null	Sat Sep 26 10:49:26 1992
--- xmalloc.c	Fri Sep 25 14:18:42 1992
***************
*** 0 ****
--- 1,39 ----
+ /*
+ 	xmalloc
+ 
+ 	last edit:	92/09/25	gsk
+ 
+ */
+ #ifndef lint
+ static char	SCCSid[] = "@(#)xmalloc.c	1.1";	/* for the "what" utility */
+ #endif
+ 
+ #ifndef alloca  /* If compiling with GCC, this file's not needed.  */
+ 						/* probably right!	*/
+ 
+ #include "EXTERN.h"
+ #include "common.h"
+ #include "util.h"
+ 
+ #ifdef __STDC__
+ typedef void	*pointer;		/* generic pointer type */
+ #else
+ typedef char	*pointer;		/* generic pointer type */
+ #endif
+ 
+ #define	NULL	0			/* null pointer constant */
+ 
+ extern pointer	xmalloc(size)
+ unsigned size;
+ {
+         pointer ret;
+ 
+         if(!size)
+                 size++;
+         ret=malloc(size);
+         if(ret==0)
+                 fatal1("Couldn't allocate memory");
+         return ret;
+ }
+ 
+ #endif /* no alloca */
*** Makefile.orig	Fri Sep 25 14:34:45 1992
--- Makefile	Fri Sep 25 14:40:07 1992
***************
*** 6,18 ****
  srcdir = .
  VPATH = .
  
! CC = cc
  
  INSTALL = cp
  INSTALL_PROGRAM = $(INSTALL)
  INSTALL_DATA = $(INSTALL)
  
! LIBS =  -lPW
  
  CFLAGS = -g
  LDFLAGS = -g
--- 6,18 ----
  srcdir = .
  VPATH = .
  
! CC = cc +DA1.0
  
  INSTALL = cp
  INSTALL_PROGRAM = $(INSTALL)
  INSTALL_DATA = $(INSTALL)
  
! LIBS = 
  
  CFLAGS = -g
  LDFLAGS = -g
***************
*** 32,40 ****
  SHELL = /bin/sh
  
  SRCS = backupfile.c getopt.c getopt1.c inp.c patch.c pch.c util.c ! 	version.c rename.c alloca.c
  OBJS = backupfile.o getopt.o getopt1.o inp.o patch.o pch.o util.o ! 	version.o  
  HDRS = EXTERN.h INTERN.h backupfile.h common.h getopt.h   	inp.h patchlevel.h pch.h util.h version.h
  MISC = COPYING ChangeLog INSTALL Makefile.in README NEWS --- 32,40 ----
  SHELL = /bin/sh
  
  SRCS = backupfile.c getopt.c getopt1.c inp.c patch.c pch.c util.c ! 	version.c rename.c alloca.c xmalloc.c
  OBJS = backupfile.o getopt.o getopt1.o inp.o patch.o pch.o util.o ! 	version.o  alloca.o xmalloc.o
  HDRS = EXTERN.h INTERN.h backupfile.h common.h getopt.h   	inp.h patchlevel.h pch.h util.h version.h
  MISC = COPYING ChangeLog INSTALL Makefile.in README NEWS -------------------------- cut here ------------------------------------

And it compiled quite well. At least, the result of the compilation
came along with the context diff above. Looking at "configure" I had
no idea where to insert it. So I came to the conclusion to leave it
to someone familiar with the stuff.

A copy of the 'patch'-directory with the original and changed files
will go to  ftp.csc.liv.ac.uk  and be available there for HP users
(At least I hope so! ;-) )

Good luck
(and thanks for the good software)
	Gernot
-----------------------------------------------------------------------------
Gernot Skalla, Universitaet Osnabrueck, FB 6,		Programming X is
Albrechtstr. 28, 4500 Osnabrueck			like calculating the
Tel:   (+49) 541 969-2486				square root of pi
Email: gskalla@informatik.Uni-Osnabrueck.DE		using roman numerals.

Newsgroups: gnu.utils.bug