34 #if !defined(__LCLINT__) && defined(__GLIBC__) && \
35 (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
36 #define USE_COOKIE_SEEK_POINTER 1
130 size_t Fread(
void * buf,
size_t size,
size_t nmemb, FD_t fd)
141 size_t Fwrite(
const void * buf,
size_t size,
size_t nmemb, FD_t fd)
163 FD_t
Fdopen(FD_t ofd,
const char * fmode)
170 FD_t
Fopen(
const char * path,
200 int Fcntl(FD_t fd,
int op,
void *lip)
214 int Mkdir(
const char * path, mode_t mode)
221 int Chdir(
const char * path)
228 int Rmdir(
const char * path)
239 int Chroot(
const char * path)
247 int Open(
const char * path,
int flags, mode_t mode)
254 int Rename(
const char * oldpath,
const char * newpath)
261 int Link(
const char * oldpath,
const char * newpath)
268 int Unlink(
const char * path)
275 int Stat(
const char * path,
struct stat * st)
282 int Lstat(
const char * path,
struct stat * st)
290 int Chown(
const char * path, uid_t owner, gid_t group)
298 int Lchown(
const char * path, uid_t owner, gid_t group)
306 int Chmod(
const char * path, mode_t mode)
314 int Mkfifo(
const char * path, mode_t mode)
322 int Mknod(
const char * path, mode_t mode, dev_t dev)
330 int Utime(
const char * path,
const struct utimbuf * buf)
338 int Utimes(
const char * path,
const struct timeval * times)
346 int Symlink(
const char * oldpath,
const char * newpath)
355 int Readlink(
const char * path,
char * buf,
size_t bufsiz)
366 int Access(
const char * path,
int amode)
379 int Glob_error(
const char * epath,
int eerrno)
385 int Glob(
const char * pattern,
int flags,
386 int errfunc(
const char * epath,
int eerrno),
403 DIR *
Opendir(
const char * path)
425 char *
Realpath(
const char * path,
char * resolved_path)
433 off_t
Lseek(
int fdno, off_t offset,
int whence)
461 ssize_t
fdRead(
void * cookie,
char * buf,
size_t count)
466 #define fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
471 ssize_t
fdWrite(
void * cookie,
const char * buf,
size_t count)
474 #define fdWrite(_fd, _buf, _count) fdio->write((_fd), (_buf), (_count))
481 #define fdClose(_fd) fdio->close(_fd)
485 FD_t
fdOpen(
const char *path,
int flags, mode_t mode)
488 #define fdOpen(_path, _flags, _mode) fdio->_open((_path), (_flags), (_mode))
494 FD_t
fdLink (
void * cookie,
const char * msg)
499 FD_t
XfdLink (
void * cookie,
const char * msg,
const char * fn,
unsigned ln)
502 #define fdLink(_fd, _msg) XfdLink(_fd, _msg, __FILE__, __LINE__)
508 FD_t
fdFree( FD_t fd,
const char * msg)
513 FD_t
XfdFree( FD_t fd,
const char * msg,
const char * fn,
unsigned ln)
516 #define fdFree(_fd, _msg) XfdFree(_fd, _msg, __FILE__, __LINE__)
522 FD_t
fdNew (
const char * msg)
527 FD_t
XfdNew (
const char * msg,
const char * fn,
unsigned ln)
530 #define fdNew(_msg) XfdNew(_msg, __FILE__, __LINE__)
553 int rpmioMkpath(
const char * path, mode_t mode, uid_t uid, gid_t gid)
564 int rpmioAccess(
const char *FN,
const char * path,
int mode)
573 extern char * (*Getpass) (
const char * prompt)
575 char *
_GetPass (
const char * prompt)
635 int ufdCopy(FD_t sfd, FD_t tfd)
648 int timedRead(FD_t fd,
void * bufptr,
int length)
651 #define timedRead (ufdio->read)
682 return (c >=
'a' && c <=
'z');
685 return (c >=
'A' && c <=
'Z');
691 return (c >=
'0' && c <=
'9');
697 return (c ==
' ' || c ==
'\t');
700 return (
xisblank(c) || c ==
'\n' || c ==
'\r' || c ==
'\f' || c ==
'\v');
706 return ((c & 0x80) != 0x80);
719 return ((
xisupper(c)) ? (c | (
'a' -
'A')) : c);
722 return ((
xislower(c)) ? (c & ~(
'a' -
'A')) : c);
728 int xstrcasecmp(
const char * s1,
const char * s2) ;
733 int xstrncasecmp(
const char *s1,
const char * s2,
size_t n) ;
752 if (p != NULL) free((
void *)p);