25 #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
26 (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
27 #define USE_COOKIE_SEEK_POINTER 1
136 size_t Fread(
void * buf,
size_t size,
size_t nmemb, FD_t fd)
146 size_t Fwrite(
const void * buf,
size_t size,
size_t nmemb, FD_t fd)
162 int Fgetpos(FD_t fd, fpos_t *pos)
164 int Fsetpos(FD_t fd, fpos_t *pos)
176 FD_t
Fdopen(FD_t ofd,
const char * fmode)
183 FD_t
Fopen(
const char * path,
213 int Fcntl(FD_t fd,
int op,
void *lip)
227 int Mkdir(
const char * path, mode_t mode)
234 int Chdir(
const char * path)
241 int Rmdir(
const char * path)
252 int Chroot(
const char * path)
260 int Open(
const char * path,
int flags, mode_t mode)
267 int Rename(
const char * oldpath,
const char * newpath)
274 int Link(
const char * oldpath,
const char * newpath)
281 int Unlink(
const char * path)
288 int Stat(
const char * path,
struct stat * st)
295 int Lstat(
const char * path,
struct stat * st)
302 int Fstat(FD_t fd,
struct stat * st)
309 int Fadvise(FD_t fd, off_t offset, off_t length,
int advice)
316 int Fallocate(FD_t fd, off_t offset, off_t length)
324 int Chown(
const char * path, uid_t owner, gid_t group)
332 int Fchown(FD_t fd, uid_t owner, gid_t group)
340 int Lchown(
const char * path, uid_t owner, gid_t group)
348 int Chmod(
const char * path, mode_t mode)
356 int Lchmod(
const char * path, mode_t mode)
364 int Fchmod(FD_t fd, mode_t mode)
372 int Chflags(
const char * path,
unsigned int flags)
380 int Lchflags(
const char * path,
unsigned int flags)
388 int Fchflags(FD_t fd,
unsigned int flags)
396 int Mkfifo(
const char * path, mode_t mode)
404 int Mknod(
const char * path, mode_t mode, dev_t dev)
413 int Utime(
const char * path,
const struct utimbuf * buf)
421 int Utimes(
const char * path,
const struct timeval * times)
429 int Lutimes(
const char * path,
const struct timeval * times)
437 int Symlink(
const char * oldpath,
const char * newpath)
446 int Readlink(
const char * path,
char * buf,
size_t bufsiz)
455 int Access(
const char * path,
int amode)
459 #if defined(__linux__)
463 int Mount(
const char *source,
const char *target,
464 const char *filesystemtype,
unsigned long mountflags,
472 int Umount(
const char *target)
479 int Umount2(
const char *target,
int flags)
493 int Glob_error(
const char * epath,
int eerrno)
499 int Glob(
const char * pattern,
int flags,
500 int errfunc(
const char * epath,
int eerrno),
518 char *
Realpath(
const char * path,
char * resolved_path)
527 off_t
Lseek(
int fdno, off_t offset,
int whence)
548 ssize_t
fdRead(
void * cookie,
char * buf,
size_t count)
551 #define fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
555 ssize_t
fdWrite(
void * cookie,
const char * buf,
size_t count)
558 #define fdWrite(_fd, _buf, _count) fdio->write((_fd), (_buf), (_count))
565 #define fdClose(_fd) fdio->close(_fd)
569 FD_t
fdOpen(
const char *path,
int flags, mode_t mode)
572 #define fdOpen(_path, _flags, _mode) fdio->_open((_path), (_flags), (_mode))
578 FD_t
fdLink (
void * cookie,
const char * msg)
581 #define fdLink(_fd, _msg) \
582 ((FD_t)rpmioLinkPoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
587 FD_t
fdFree( FD_t fd,
const char * msg)
590 #define fdFree(_fd, _msg) \
591 ((FD_t)rpmioFreePoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
597 FD_t
fdNew (
const char * msg)
601 FD_t
XfdNew (
const char * msg,
const char * fn,
unsigned ln)
604 #define fdNew(_msg) XfdNew(_msg, __FILE__, __LINE__)
627 int rpmioMkpath(
const char * path, mode_t mode, uid_t uid, gid_t gid)
638 int rpmioAccess(
const char *FN,
const char * path,
int mode)
647 extern char * (*Getpass) (
const char * prompt)
649 char *
_GetPass (
const char * prompt)
713 int ufdCopy(FD_t sfd, FD_t tfd)
788 size_t size,
int limit,
int flags,
789 char * (*dbg) (
void *item),
790 void (*init) (
void *item),
791 void (*fini) (
void *item))
805 const char * msg,
const char * fn,
unsigned ln)
819 const char * msg,
const char * fn,
unsigned ln)
833 const char * msg,
const char * fn,
unsigned ln)