26 #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
27 (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
28 #define USE_COOKIE_SEEK_POINTER 1
132 size_t Fread(
void * buf,
size_t size,
size_t nmemb, FD_t fd)
142 size_t Fwrite(
const void * buf,
size_t size,
size_t nmemb, FD_t fd)
164 FD_t
Fdopen(FD_t ofd,
const char * fmode)
171 FD_t
Fopen(
const char * path,
201 int Fcntl(FD_t fd,
int op,
void *lip)
215 int Mkdir(
const char * path, mode_t mode)
222 int Chdir(
const char * path)
229 int Rmdir(
const char * path)
240 int Chroot(
const char * path)
248 int Open(
const char * path,
int flags, mode_t mode)
255 int Rename(
const char * oldpath,
const char * newpath)
262 int Link(
const char * oldpath,
const char * newpath)
269 int Unlink(
const char * path)
276 int Stat(
const char * path,
struct stat * st)
283 int Lstat(
const char * path,
struct stat * st)
290 int Fstat(FD_t fd,
struct stat * st)
298 int Chown(
const char * path, uid_t owner, gid_t group)
306 int Fchown(FD_t fd, uid_t owner, gid_t group)
314 int Lchown(
const char * path, uid_t owner, gid_t group)
322 int Chmod(
const char * path, mode_t mode)
330 int Fchmod(FD_t fd, mode_t mode)
338 int Mkfifo(
const char * path, mode_t mode)
346 int Mknod(
const char * path, mode_t mode, dev_t dev)
355 int Utime(
const char * path,
const struct utimbuf * buf)
363 int Utimes(
const char * path,
const struct timeval * times)
371 int Symlink(
const char * oldpath,
const char * newpath)
380 int Readlink(
const char * path,
char * buf,
size_t bufsiz)
389 int Access(
const char * path,
int amode)
393 #if defined(__linux__)
397 int Mount(
const char *source,
const char *target,
398 const char *filesystemtype,
unsigned long mountflags,
406 int Umount(
const char *target)
413 int Umount2(
const char *target,
int flags)
427 int Glob_error(
const char * epath,
int eerrno)
433 int Glob(
const char * pattern,
int flags,
434 int errfunc(
const char * epath,
int eerrno),
451 DIR *
Opendir(
const char * path)
475 char *
Realpath(
const char * path,
char * resolved_path)
484 off_t
Lseek(
int fdno, off_t offset,
int whence)
505 ssize_t
fdRead(
void * cookie,
char * buf,
size_t count)
508 #define fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
512 ssize_t
fdWrite(
void * cookie,
const char * buf,
size_t count)
515 #define fdWrite(_fd, _buf, _count) fdio->write((_fd), (_buf), (_count))
522 #define fdClose(_fd) fdio->close(_fd)
526 FD_t
fdOpen(
const char *path,
int flags, mode_t mode)
529 #define fdOpen(_path, _flags, _mode) fdio->_open((_path), (_flags), (_mode))
535 FD_t
fdLink (
void * cookie,
const char * msg)
538 #define fdLink(_fd, _msg) \
539 ((FD_t)rpmioLinkPoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
544 FD_t
fdFree( FD_t fd,
const char * msg)
547 #define fdFree(_fd, _msg) \
548 ((FD_t)rpmioFreePoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
554 FD_t
fdNew (
const char * msg)
558 FD_t
XfdNew (
const char * msg,
const char * fn,
unsigned ln)
561 #define fdNew(_msg) XfdNew(_msg, __FILE__, __LINE__)
584 int rpmioMkpath(
const char * path, mode_t mode, uid_t uid, gid_t gid)
595 int rpmioAccess(
const char *FN,
const char * path,
int mode)
604 extern char * (*Getpass) (
const char * prompt)
606 char *
_GetPass (
const char * prompt)
670 int ufdCopy(FD_t sfd, FD_t tfd)
745 size_t size,
int limit,
int flags,
746 const char * (*dbg) (
void *item),
747 void (*init) (
void *item),
748 void (*fini) (
void *item))
762 const char * msg,
const char * fn,
unsigned ln)
776 const char * msg,
const char * fn,
unsigned ln)
790 const char * msg,
const char * fn,
unsigned ln)