delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/07/14:34:24

Message-Id: <3.0.1.32.19980107133712.007c7de0@yacker.xiotech.com>
Date: Wed, 07 Jan 1998 13:37:12 -0600
To: djgpp-workers AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: patch for link
Mime-Version: 1.0

--=====================_884223432==_
Content-Type: text/plain; charset="us-ascii"

This makes it possible for an fsext to provide link() capabilities.
Randy
--=====================_884223432==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="link.dif"

*** /local/src/libc/posix/unistd/link.c~1	Wed May 10 02:13:46 1995
--- /local/src/libc/posix/unistd/link.c	Wed Jan  7 13:10:26 1998
***************
*** 7,10 ****
--- 7,11 ----
  #include <utime.h>		/* For utime() */
  #include <errno.h>		/* For errno */
+ #include <sys/fsext.h>
  
  /* Of course, DOS can't really do a link.  We just do a copy instead,
***************
*** 17,21 ****
    struct utimbuf times;
    char buf[16384];
!   int fd1, fd2, nbyte, status1, status2;
  
    /* Fail if either path is null */
--- 18,22 ----
    struct utimbuf times;
    char buf[16384];
!   int fd1, fd2, nbyte, status1, status2,rv;
  
    /* Fail if either path is null */
***************
*** 30,33 ****
--- 31,38 ----
      return -1;
    }
+ 
+   /* see if a file system extension implements the link */
+   if (__FSEXT_call_open_handlers(__FSEXT_link, &rv, &path1))
+     return rv;
  
    /* Fail if path1 does not exist - stat() will set errno */

--=====================_884223432==_
Content-Type: text/plain; charset="us-ascii"



--=====================_884223432==_--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019