summaryrefslogtreecommitdiff
path: root/src/msdos.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-04-26 11:56:25 +0000
committerRichard M. Stallman <rms@gnu.org>1996-04-26 11:56:25 +0000
commitec81a41f07bcfdf9ca8430ccbc7e2f96e080ec55 (patch)
tree6d9c0d48b2afe2b19ed881969ccca91f2ee0db60 /src/msdos.c
parent06f2a8f91ed0c8a4546736e7beb7500f81c4aac2 (diff)
downloademacs-ec81a41f07bcfdf9ca8430ccbc7e2f96e080ec55.tar.gz
(getdefdir) [DJGPP > 1]: Use 32-bit ESI to pass buffer
address to `intdos' instead of SI which can be 16-bit.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c7
1 files changed, 7 insertions, 0 deletions
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 (&regs, &regs);
return !regs.x.cflag;