Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!umich!vela!srodawa From: srodawa@vela.acs.oakland.edu (Ron Srodawa) Newsgroups: comp.unix.xenix.sco Subject: Re: Problems creating Patch 2.0.12u3 Message-ID: <6278@vela.acs.oakland.edu> Date: 3 May 91 04:51:35 GMT References: <44@hlthnt.UUCP> Organization: Oakland University, Rochester MI. Lines: 107 In article <44@hlthnt.UUCP> sginn@hlthnt.UUCP (Steve Ginn) writes: > >I was recently trying to compile the above named app and everything >ran fine until it started linking and came up with the following >problems: >/bin/ld : error: Unresolved externals: >_rindex in file(s): You have bumped into one of several common Berkeley BSD library routines that are not supported in the SCO Development System. (They are included as a part of the SCO TCP/IP Development System.) What follows is a shar file containing my own source code which I wrote when I had the same problem and before I had the SCO TCP/IP Development System. Anyone may use these routines freely for any purpose. No warranty. Hope these help you out of your bind.. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'bcmp.c' <<'END_OF_FILE' X#include Xint bcmp(char *b1, char *b2, int length) X{ X return (memcmp(b1,b2,length)); X} X END_OF_FILE if test 99 -ne `wc -c <'bcmp.c'`; then echo shar: \"'bcmp.c'\" unpacked with wrong size! fi # end of 'bcmp.c' fi if test -f 'bcopy.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'bcopy.c'\" else echo shar: Extracting \"'bcopy.c'\" \(93 characters\) sed "s/^X//" >'bcopy.c' <<'END_OF_FILE' X#include X Xvoid bcopy(char *b1, char *b2, int length) X{ X memcpy(b2,b1,length); X} X END_OF_FILE if test 93 -ne `wc -c <'bcopy.c'`; then echo shar: \"'bcopy.c'\" unpacked with wrong size! fi # end of 'bcopy.c' fi if test -f 'bzero.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'bzero.c'\" else echo shar: Extracting \"'bzero.c'\" \(93 characters\) sed "s/^X//" >'bzero.c' <<'END_OF_FILE' X#include Xbzero(char *b1, int length) X{ X char *r; X X r = memset(b1, 0, length); X} END_OF_FILE if test 93 -ne `wc -c <'bzero.c'`; then echo shar: \"'bzero.c'\" unpacked with wrong size! fi # end of 'bzero.c' fi if test -f 'rindex.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'rindex.c'\" else echo shar: Extracting \"'rindex.c'\" \(143 characters\) sed "s/^X//" >'rindex.c' <<'END_OF_FILE' Xchar *rindex(char *s, char c) X{ X char *r = (char *) 0; X char *t; X X for (t = s; *t != '\0'; t++) { X if (*t==c) r = t; X } X return (r); X} END_OF_FILE if test 143 -ne `wc -c <'rindex.c'`; then echo shar: \"'rindex.c'\" unpacked with wrong size! fi # end of 'rindex.c' fi echo shar: End of shell archive. exit 0 -- | Ronald J. Srodawa | Internet: srodawa@vela.oakland.edu | | School of Engineering and CS | UUCP: srodawa@vela.UUCP | | Oakland University | Voice: (313) 370-2247 | | Rochester, Michigan 48309-4401 | |