home *** CD-ROM | disk | FTP | other *** search
- From: maj@hpfcso.FC.HP.COM (Mike Jassowski)
- Date: Thu, 30 Jul 1992 15:38:44 GMT
- Subject: Re: "source" on HP-UX
- Message-ID: <7371190@hpfcso.FC.HP.COM>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Path: sparky!uunet!usc!sdd.hp.com!hpscdc!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!maj
- Newsgroups: comp.sys.hp
- References: <1992Jul29.110828.16235@hp9000.csc.cuhk.hk>
- Lines: 30
-
- > Does anyone know if HP-UX the "source" command (or equivalent) ?
-
- 'Source' is a csh built-in. The equivalent in ksh or sh is '.'
-
- --Mike Jassowski
- egex() are kept in /lib/libPW.a. Unfortunately,
- > > /lib/libPW.a also contains some functions that have the same names as
- > > functions contained in the default C library, /lib/libc.a. To prevent
- > > unexpected results due to these name conflicts, always search libc
- > > before searching libPW. This is done with the ld (or cc) command line
- > > option sequence -lc -lPW which satisifies all standard C functions
- > > from libc then searches libPW for the regcmp() and regex() functions
- > > (there is also an implied -lc following the explicit -lPW to satisfy
- > > any additional C functions required by regcmp() and regex()).
- >
- > Of course, if you do this, then ld will simply grab all the routines in
- > libc.a instead of using shared libraries (and X is bloated enough software
- > as it is even with the shared libraries being used).
-
- The warning cited above is a little out of date. The libc library
- exists in both archived form and in shared lib form. Unless you take
- pains otherwise, -lc will cause the shared lib form of libc to be used
- to satisfy externals. Thus there's no real advantage to rolling your
- own shared lib or even making a special purpose archived lib. In fact,
- I see a risk in doing so because it freezes in any library routines
- which otherwise might be updated during subsequent system releases.
-
- Mike McNelly
- mike@fc.hp.com
- (Not a spokesman for anybody but myself)
-