* <sys/ioctl.h> on msdos
@ 2010-11-18 4:42 Dan Nicolaescu
2010-11-18 10:26 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2010-11-18 4:42 UTC (permalink / raw)
To: emacs-devel
Does msdos have <sys/ioctl.h> ?
In a few places
#ifndef MSDOS
is used to avoid including it.
Other places use HAVE_SYS_IOCTL_H
process.c includes it unconditionally in the non-msdos part.
It would be nicer to include it unconditionally everywhere, or to use
the same conditional everywhere.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-18 4:42 <sys/ioctl.h> on msdos Dan Nicolaescu
@ 2010-11-18 10:26 ` Eli Zaretskii
2010-11-19 17:54 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2010-11-18 10:26 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
> From: Dan Nicolaescu <dann@gnu.org>
> 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
HAVE_SYS_IOCTL_H
- 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-18 10:26 ` Eli Zaretskii
@ 2010-11-19 17:54 ` Eli Zaretskii
2010-11-20 7:39 ` Dan Nicolaescu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2010-11-19 17:54 UTC (permalink / raw)
To: dann, emacs-devel
> From: Eli Zaretskii <eliz@gnu.org>
> Date: Thu, 18 Nov 2010 05:26:26 -0500
> Cc: emacs-devel@gnu.org
>
> > 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.
Should I do this?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-19 17:54 ` Eli Zaretskii
@ 2010-11-20 7:39 ` Dan Nicolaescu
2010-11-20 9:08 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2010-11-20 7:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Eli Zaretskii <eliz@gnu.org>
>> Date: Thu, 18 Nov 2010 05:26:26 -0500
>> Cc: emacs-devel@gnu.org
>>
>> > 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.
>
> Should I do this?
Not sure.
Are you sure that including sys/ioctl.h unconditionally has some bad effects?
Is HAVE_SYS_IOCTL_H currently defined?
If yes, then it seems that the only extra places to include sys/ioctl.h would be
keyboard.c and sound.c.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-20 7:39 ` Dan Nicolaescu
@ 2010-11-20 9:08 ` Eli Zaretskii
2010-11-21 4:40 ` Dan Nicolaescu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2010-11-20 9:08 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
> Cc: emacs-devel@gnu.org
> From: Dan Nicolaescu <dann@gnu.org>
> Date: Sat, 20 Nov 2010 02:39:50 -0500
>
> Are you sure that including sys/ioctl.h unconditionally has some bad effects?
No, I'm not. It's just good engineering practice.
> Is HAVE_SYS_IOCTL_H currently defined?
Yes. It's defined by one of the system headers included by config.h
(after config.in is edited by msdos/sed2v2.inp).
> If yes, then it seems that the only extra places to include sys/ioctl.h would be
> keyboard.c and sound.c.
sound.c doesn't matter, since MSDOS does not define HAVE_SOUND (so we
can remove that part altogether from sound.c).
Are you planning on removing HAVE_SYS_IOCTL_H altogether and not
testing for it in `configure'? Because if HAVE_SYS_IOCTL_H is to
stay, there could be no harm in undefining HAVE_SYS_IOCTL_H on MSDOS:
it will be in on of the msdos/ Sed scripts, not visible in any of the
Emacs sources. We will just replace a couple of "#ifndef MSDOS" with
"#ifdef HAVE_SYS_IOCTL_H".
If you do want to remove HAVE_SYS_IOCTL_H, then I guess it would be
okay to remove the MSDOS conditions from the places that include
sys/ioctl.h, and see if anything breaks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-20 9:08 ` Eli Zaretskii
@ 2010-11-21 4:40 ` Dan Nicolaescu
2010-11-21 17:45 ` Eli Zaretskii
2010-11-26 12:17 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2010-11-21 4:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: emacs-devel@gnu.org
>> From: Dan Nicolaescu <dann@gnu.org>
>> Date: Sat, 20 Nov 2010 02:39:50 -0500
>>
>> Are you sure that including sys/ioctl.h unconditionally has some bad effects?
>
> No, I'm not. It's just good engineering practice.
>
>> Is HAVE_SYS_IOCTL_H currently defined?
>
> Yes. It's defined by one of the system headers included by config.h
> (after config.in is edited by msdos/sed2v2.inp).
>
>> If yes, then it seems that the only extra places to include sys/ioctl.h would be
>> keyboard.c and sound.c.
>
> sound.c doesn't matter, since MSDOS does not define HAVE_SOUND (so we
> can remove that part altogether from sound.c).
>
> Are you planning on removing HAVE_SYS_IOCTL_H altogether and not
> testing for it in `configure'? Because if HAVE_SYS_IOCTL_H is to
Yes, given that we are including sys/ioctl.h in unconditionally in a
few places, it makes no sense to have configure test if it exists.
> stay, there could be no harm in undefining HAVE_SYS_IOCTL_H on MSDOS:
> it will be in on of the msdos/ Sed scripts, not visible in any of the
> Emacs sources. We will just replace a couple of "#ifndef MSDOS" with
> "#ifdef HAVE_SYS_IOCTL_H".
> If you do want to remove HAVE_SYS_IOCTL_H, then I guess it would be
> okay to remove the MSDOS conditions from the places that include
> sys/ioctl.h, and see if anything breaks.
I can't test that, so it would be great if you could.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-21 4:40 ` Dan Nicolaescu
@ 2010-11-21 17:45 ` Eli Zaretskii
2010-11-26 12:17 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2010-11-21 17:45 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
> Cc: emacs-devel@gnu.org
> From: Dan Nicolaescu <dann@gnu.org>
> Date: Sat, 20 Nov 2010 23:40:39 -0500
>
> > Are you planning on removing HAVE_SYS_IOCTL_H altogether and not
> > testing for it in `configure'? Because if HAVE_SYS_IOCTL_H is to
>
> Yes, given that we are including sys/ioctl.h in unconditionally in a
> few places, it makes no sense to have configure test if it exists.
Then go ahead and remove HAVE_SYS_IOCTL_H and the conditions to
include sys/ioctl.h.
> > If you do want to remove HAVE_SYS_IOCTL_H, then I guess it would be
> > okay to remove the MSDOS conditions from the places that include
> > sys/ioctl.h, and see if anything breaks.
>
> I can't test that, so it would be great if you could.
Sure, that's what I meant.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: <sys/ioctl.h> on msdos
2010-11-21 4:40 ` Dan Nicolaescu
2010-11-21 17:45 ` Eli Zaretskii
@ 2010-11-26 12:17 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2010-11-26 12:17 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
> Cc: emacs-devel@gnu.org
> From: Dan Nicolaescu <dann@gnu.org>
> Date: Sat, 20 Nov 2010 23:40:39 -0500
>
> > If you do want to remove HAVE_SYS_IOCTL_H, then I guess it would be
> > okay to remove the MSDOS conditions from the places that include
> > sys/ioctl.h, and see if anything breaks.
>
> I can't test that, so it would be great if you could.
I ran a few sanity checks and didn't see anything that broke as result
of this change.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-26 12:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 4:42 <sys/ioctl.h> on msdos Dan Nicolaescu
2010-11-18 10:26 ` Eli Zaretskii
2010-11-19 17:54 ` Eli Zaretskii
2010-11-20 7:39 ` Dan Nicolaescu
2010-11-20 9:08 ` Eli Zaretskii
2010-11-21 4:40 ` Dan Nicolaescu
2010-11-21 17:45 ` Eli Zaretskii
2010-11-26 12:17 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.