www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/23/15:25:03

Date: Sun, 23 Oct 94 19:43:54 +0100
From: buers AT dg1 DOT chemie DOT uni-konstanz DOT de (Dieter Buerssner)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Bug in access, with fix

access() will fail sometimes.

As a previous discussion showed, the flags in the register structure
must be set, before calling go32_dpmi_simulate_int.
The trivial patch does this. Of course it might be even better to use memset
to clear the whole register structure, but, after only clearing the flags,
the bug never showed again.


Dieter


*** access.oc2	Mon Sep 12 00:26:16 1994
--- access.c	Sun Oct 16 05:07:32 1994
***************
*** 21,27 ****
  int access(const char *fn, int flags)
  {
    _go32_dpmi_registers r;
!   r.x.ss = r.x.sp = 0;
    r.h.ah = 0x43;
    r.h.al = 0;
    r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;
--- 21,27 ----
  int access(const char *fn, int flags)
  {
    _go32_dpmi_registers r;
!   r.x.flags = r.x.ss = r.x.sp = 0;
    r.h.ah = 0x43;
    r.h.al = 0;
    r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;





- Raw text -


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