Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpfcso!hpfcbig!jenings From: jenings@hpfcbig.SDE.HP.COM (Byron Jenings) Newsgroups: comp.sys.hp Subject: Re: #pragma _HP_SECONDARY_DEF Message-ID: <7540070@hpfcbig.SDE.HP.COM> Date: 18 May 91 07:38:17 GMT References: Organization: HP SESD, Fort Collins, CO Lines: 27 Tor Lillqvist writes: |How do you use the undocumented _HP_SECONDARY_DEF pragma? (I found it |with `strings /lib/ccom`.) I suppose this is what causes the "sdef" |entries as output by nm. This is an example from when I wanted to wrap an extra layer around brk and sbrk. You'll need to look at the nm output in libc to see when your replacement functions should have a name starting with one or two underscores. #ifdef _HPUX_SOURCE # pragma _HP_SECONDARY_DEF _sbrk sbrk # define sbrk _sbrk # pragma _HP_SECONDARY_DEF __brk brk # define brk __brk #endif char *sbrk(incr) { ... } int brk(endds) { ... }