Subject: Re: /usr/include/zconf.h uses HAVE_UNISTD_H
To: None <itojun@iijlab.net>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 10/14/1999 12:20:17
itojun@iijlab.net writes:
> 	Sorry I'm not a shared library wizard.  Do you mean:
> 	- have "long" gzseek() as a wrapper,
> 	- have "off_t" gzseek_correct() as real function, and
> 	- leave definition of z_off_t to long?

No, but neither an I a shared library wizard.

grep in /usr/include for __RENAME for examples of other functions
which have been 'fixed' or 'improved' in backward-compatible manners.

in a nutshell, something like:

In the library sources, provide a new gzseek() function with an
appropriate name (__gzseek_15?!) which takes a z_off_t (now an off_t),
and have a gzseek() function which takes a long rather than a z_off_t
(and which just turns around and calls the new function).

In the header(s), fix the definition of z_off_t and make sure gzseek()
still uses it, then add a __RENAME(__gzseek_15) (adjust for the name,
as appropriate) to the gzseek() prototype, so that uses of gzseek()
compiled with the new header in scope will actually use the new function.

do the same for the other function that uses z_off_t (gztell()).


I think that's the right general procedure, but somebody who's
actually do it (Jason? Charles? Klaus? others?) should probably speak
up...

Also, i'm not what the normal naming convention for the new functions
is...


cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.