home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / unistd / chown.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-18  |  489 b   |  21 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <unistd.h>
  4. #include <sys/stat.h>
  5. #include <errno.h>
  6.  
  7. /* MS-DOS couldn't care less about file ownerships, so we could
  8.    always succeed.  At least fail for non-existent files
  9.    and for devices.  */
  10.  
  11. int
  12. chown(const char *path, uid_t owner, gid_t group)
  13. {
  14.   if (!__file_exists(path))       /* non-existent file */
  15.   {
  16.     errno = ENOENT;
  17.     return -1;
  18.   }
  19.   return 0;
  20. }
  21.