skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

openreadnclose_at.c (257B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/djbunix.h>
      4 #include <skalibs/unix-transactional.h>
      5 
      6 ssize_t openreadnclose_at (int dirfd, char const *file, char *s, size_t n)
      7 {
      8   int fd = openc_readatb(dirfd, file) ;
      9   return fd == -1 ? -1 : readnclose(fd, s, n) ;
     10 }