view lib/fchown-stub.c @ 17409:26a04e61f560

stdio: use __REDIRECT for fwrite, fwrite_unlocked * lib/stdio.in.h (fwrite): When working around bug 11959, use __REDIRECT rather than '#define fwrite(...) ... fwrite (...) ...'. This is a more-targeted way to fix the -Wunused-value issue with clang, and it works with GCC too. Problem with targeting reported by Eric Blake in <http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00067.html>. (fwrite_unlocked): Treat like fwrite. I ran into this issue while debugging the fwrite issue.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 15 May 2013 15:52:42 -0700
parents 18a38c9615f0
children
line wrap: on
line source

#include <config.h>

#include <sys/types.h>
#include <errno.h>

/* A trivial substitute for 'fchown'.

   DJGPP 2.03 and earlier (and perhaps later) don't have 'fchown',
   so we pretend no-one has permission for this operation. */

int
fchown (int fd, uid_t uid, gid_t gid)
{
  errno = EPERM;
  return -1;
}