From 8da3fc6db1926f13aceb842860fbfd7d5a2871a5 Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 1 Dec 1999 20:00:39 +0000 Subject: Solaris fiddles. CVS patchset: 3449 CVS date: 1999/12/01 20:00:39 --- lib/rpmio.h | 9 ++++++--- lib/url.c | 4 ++-- system.h | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/rpmio.h b/lib/rpmio.h index 23ec78f7d..1262095c0 100644 --- a/lib/rpmio.h +++ b/lib/rpmio.h @@ -16,9 +16,9 @@ extern "C" { #if HAVE_LIBIO_H #include #else -typedef ssize_t cookie_read_function_t (void *cookie, void *buf, size_t nbytes); -typedef ssize_t cookie_write_function_t (void *cookie, const void *buf, size_t nbytes); -typedef int cookie_seek_function_t (void *cookie, fpos_t *pos, int whence); +typedef ssize_t cookie_read_function_t (void *cookie, char *buf, size_t nbytes); +typedef ssize_t cookie_write_function_t (void *cookie, const char *buf, size_t nbytes); +typedef int cookie_seek_function_t (void *cookie, off_t offset, int whence); typedef int cookie_close_function_t (void *cookie); typedef struct { cookie_read_function_t *read; @@ -26,6 +26,9 @@ typedef struct { cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; +FILE * fopencookie (void *magic_cookie, const char * modes, + cookie_io_functions_t io_funcs); +#define fopencookie(_a, _b, _c) (NULL) #endif typedef /*@null@*/ FD_t fdio_ref_function_t ( /*@only@*/ void * cookie, diff --git a/lib/url.c b/lib/url.c index adfb776da..74d2eac0f 100644 --- a/lib/url.c +++ b/lib/url.c @@ -66,7 +66,7 @@ DBGREFS(0, (stderr, "--> url %p -- %d %s at %s:%u\n", u, u->nrefs, msg, file, li return u; if (u->ctrl) { #ifndef NOTYET - FILE * fp = fdGetFp(u->ctrl); + void * fp = fdGetFp(u->ctrl); if (fp) { fdPush(u->ctrl, fpio, fp, -1); /* Push fpio onto stack */ Fclose(u->ctrl); @@ -83,7 +83,7 @@ DBGREFS(0, (stderr, "--> url %p -- %d %s at %s:%u\n", u, u->nrefs, msg, file, li } if (u->data) { #ifndef NOTYET - FILE * fp = fdGetFp(u->data); + void * fp = fdGetFp(u->data); if (fp) { fdPush(u->data, fpio, fp, -1); /* Push fpio onto stack */ Fclose(u->data); diff --git a/system.h b/system.h index d337c393d..6b7fca12a 100644 --- a/system.h +++ b/system.h @@ -89,6 +89,10 @@ extern time_t timezone; char *memchr (); #endif +#if !defined(HAVE_STPCPY) +char * stpcpy(char * dest, const char * src); +#endif + #include #ifndef errno extern int errno; -- cgit v1.2.3