From 6c05ef1e11c64d4c6eeddf105ad8e8692182d57c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 26 Apr 1996 11:56:25 +0000 Subject: [PATCH] (getdefdir) [DJGPP > 1]: Use 32-bit ESI to pass buffer address to `intdos' instead of SI which can be 16-bit. --- src/msdos.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msdos.c b/src/msdos.c index 05f5f4670e4..c90e9766579 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2093,7 +2093,14 @@ getdefdir (drive, dst) *dst++ = '/'; regs.h.dl = drive; +#if __DJGPP__ > 1 + /* regs.x.si can be 16 or 32 bits, depending on whether _NAIVE_DOS_REGS + or _BORLAND_DOS_REGS have or haven't been defined. We should work + with either, so use regs.d.esi which is always 32 bit-wide. */ + regs.d.esi = (int) dst; +#else regs.x.si = (int) dst; +#endif regs.h.ah = 0x47; intdos (®s, ®s); return !regs.x.cflag; -- 2.39.2