[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <sys/ioctl.h> on msdos

From: Eli Zaretskii
Subject: Re: <sys/ioctl.h> on msdos
Date: Thu, 18 Nov 2010 05:26:26 -0500

> From: Dan Nicolaescu <address@hidden>
> Date: Wed, 17 Nov 2010 23:42:13 -0500
> Does msdos have <sys/ioctl.h> ?

It does, but this header defines DOS ioctl stuff, not the Posix ioctl
stuff.  There's no emulation of the Posix ioctl functionality in the
standard C library used to build the DOS port.

> In a few places 
> #ifndef MSDOS
> is used to avoid including it.

Yes, because doing so pollutes the namespace with gobs of symbols that
could get in the way.

> Other places use HAVE_SYS_IOCTL_H
> process.c includes it unconditionally in the non-msdos part.

I see these places where sys/ioctl.h is included in Emacs:

  - in process.c -- not relevant for MSDOS and included unconditionally
  - in keyboard.c -- conditioned by MSDOS
  - in sound.c -- conditioned by MSDOS
  - in xterm.c -- only relevant for DOS if someone revives the old DOS
    port of Xlib, which probably won't happen; conditioned by
  - in systty.h -- conditioned by HAVE_SYS_IOCTL_H

> It would be nicer to include it unconditionally everywhere, or to use
> the same conditional everywhere.

I could arrange for the MSDOS port to not define HAVE_SYS_IOCTL_H, and
then we could use that everywhere.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]