[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Bug #82418

On Wed, Jan 22, 2003 at 08:14:43AM -0500, Adam H. Pendleton wrote:
> On Wednesday, January 22, 2003, at 07:57 AM, Jeff Johnson wrote:
> > What on earth are you talking about?
>  From rpmio.h:
> Fopen(/*@null@*/ const char * path,
>                      /*@null@*/ const char * fmode);
>  From wrapstdio.c (W. Richard Stevens):
> Fopen(const char *pathname, const char *mode)
>  From rpmio.h:
> Stat(const char * path, /*@out@*/ struct stat * st)
>  From wrapunix.c:
> Stat(const char *pathname, struct stat *ptr)
> etc. etc.
> Capitalizing the first letter of the functions like that is pretty 
> common, but it normally indicates a wrapper function for the lowercase 
> equivalent.  A quick inspection of the rpmio source code shows that 
> this is not the case; in fact, the uppercase functions do not actually 
> check for errors from the lowercase functions, they provide some other 
> type of error checking specific to RPM.  My question is, what is the 
> purpose of these functions being listed rpmio.h and why are the 
> exported by librpm?  Are they meant to be used as replacements for 
> their lowercase counterparts by users of librpm (and by users I mean 
> programs linking to the library)?

Ah, you're very confused.

Yes, capitalizing the 1st letter of functionally equivalent routines is
common, can lead to messy name collisions.

The rpmio library provides
	a) simple FTP/HTTP clients by passing a URI to Fopen().
	b) a rather clunky syscall-like rpc interface on top of FTP.
	c) digests and decompression on the fly.
This is much more than a "wrapper".

Most of this functionality is not needed by programmers using rpm.

It's up to you whether you wish to use rpmio or not. You *will* need
to pass a FD_t into rpmlib to read packages, however. The can be done
by calling fdDup() on a file descriptor of your own making if necessary.

73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []