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

Message-Id: <3.0.1.32.19980107133801.007c9600@yacker.xiotech.com>
Date: Wed, 07 Jan 1998 13:38:01 -0600
To: djgpp-workers AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: patch for lseek
Mime-Version: 1.0

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

This makes it possible for a fsext to lseek its file descriptor
Randy
--=====================_884223481==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="lseek.dif"

*** /local/src/libc/posix/unistd/lseek.c~1	Sun Feb 26 19:43:10 1995
--- /local/src/libc/posix/unistd/lseek.c	Wed Jan  7 13:10:44 1998
***************
*** 5,9 ****
  #include <go32.h>
  #include <dpmi.h>
! 
  #include <libc/dosio.h>
  
--- 5,9 ----
  #include <go32.h>
  #include <dpmi.h>
! #include <sys/fsext.h>
  #include <libc/dosio.h>
  
***************
*** 12,15 ****
--- 12,23 ----
  {
    __dpmi_regs r;
+   __FSEXT_Function *func = __FSEXT_get_function(handle);
+   if (func)
+   {
+     int rv;
+     if (func(__FSEXT_lseek, &rv, &handle))
+       return rv;
+   }
+ 
    r.h.ah = 0x42;
    r.h.al = whence;

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



--=====================_884223481==_--

- Raw text -


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