Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!uxd.cso.uiuc.edu!uxe.cso.uiuc.edu!spirit From: spirit@uxe.cso.uiuc.edu Newsgroups: comp.sys.hp Subject: Re: linking BSD type software on HP-UX Message-ID: <47500006@uxe.cso.uiuc.edu> Date: 22 Mar 89 00:48:00 GMT References: <940@eastman.UUCP> Lines: 66 Nf-ID: #R:eastman.UUCP:940:uxe.cso.uiuc.edu:47500006:000:1606 Nf-From: uxe.cso.uiuc.edu!spirit Mar 21 18:48:00 1989 Hello, If you look at a BSD machines man pages you will find out that the functions missing on the HP are relatively simple to replace. You can use the alternative routines below which have similar functions, or write your own. Examples of some of the stuff I have used are below: ................................................................ To use replacemnts for bcopy, index, and rindex ................................................................ #include #include #define bcopy(source,dest,count) memcpy(dest,source,count) #define index(string,ch) strchr(string,ch) #define rindex(string,ch) strrchr(string,ch) ................................................................ Easy code to rewrite though (please check for errors) ................................................................ /* * bcmp -- cmp b1 and b2, return 0 if identical, non-zero otherwise */ bcmp(b1,b2,length) char *b1,*b2; int length; { int i; for (i=0;i