Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-sdd!hpcndnm!jad From: jad@hpcndnm.cnd.hp.com (John Dilley) Newsgroups: comp.sys.hp Subject: Re: BSD rindex, etc. Message-ID: Date: 26 Sep 90 21:51:39 GMT References: <8155@milton.u.washington.edu> Sender: news@sdd.hp.com (Usenet News) Organization: Hewlett Packard, Colorado Networks Division Lines: 51 In-Reply-To: jdunlap@milton.u.washington.edu's message of 26 Sep 90 17:06:18 GMT Nntp-Posting-Host: hpcndnm.cnd.hp.com In article <8155@milton.u.washington.edu> jdunlap@milton.u.washington.edu (John Dunlap) writes: >Some time ago, I recall a discussion about the BSD string functions >being available in HP-UX. I am looking for rindex and strings.h >among other things. I would like to have easier porting of BSD >applications to HP-UX. In HP-UX there is a library, libBSD.a, which helps with porting by providing many Berkeley compatibility functions. The functions found in this library are listed below for your reference. This will not help you with include files whose names or contents are different between HP-UX and other flavors of UNIX -- my suggestion is you use #ifdef to differentiate between the various flavors as follows: #ifdef hpux #include #else /* BSD */ #include #endif You might be better off using symbols other than hpux for portability. Be aware that linking in this routines may cause your application to behave differently by redefining signal(). You should also be aware that there are differences between bcopy()/bzero() and memcpy()/memset(). The symbols defined in my libBSD.a file are: bcmp.o:0x00000000 T _bcmp bcopy.o:0x00000000 T _bcopy bzero.o:0x00000000 T _bzero index.o:0x00000000 T _index index.o:0x00000016 T _rindex getwd.o:0x00000000 T _getwd killpg.o:0x00000000 T _killpg signal.o:0x00000000 T _signal sigvec.o:0x00000000 T _sigvec setpgrp.o:0x00000000 T _setpgrp getpgrp.o:0x00000000 T _getpgrp This library is in the fileset PROG_SUPL, which I believe is shipped in the 7.0 release of HP-UX on Series 300 and Series 800 systems. -- jad -- John Dilley Hewlett-Packard Colorado Networks Division UX-mail: jad@cnd.hp.com Phone: (303) 229-2787 -- This is not an official statement of Hewlett-Packard Corp, and does not necessarily reflect the views of HP. The information above is provided completely without warranty of any kind.