Are there OSes which have but not ?











up vote
0
down vote

favorite












I am currently pondering the presence of <sys/termios.h> on many systems, most of which have a symlink between it and <termios.h>, musl libc’s being a considerable exception: its <sys/termios.h> warns you that it’s wrong and to use <termios.h> instead.



On the BSDs, the actual file is in sys/ and the symlink in /usr/include, so one might have been historically excused for using this… but, giving that GNU autoconf’s AC_SYS_POSIX_TERMIOS does not look there (even though the configure.ac of a program I am looking at does use AC_CHECK_HEADERS([ … sys/termios.h … termios.h …]), I was wondering:



Is there any system in existence which has <sys/termios.h> with the usual suspects (tcgetattr, tcsetattr, cfgetospeed and related constants) but not <termios.h>?



Another piece of software I’m looking at only tries <termios.h> (both fall back to termio, one even to sgtty…), and I’m now trying to figure out whether I should patch one to also look at <sys/termios.h> (and probably the autoconf macro, too) or patch the other to not look there because it might be pointless.










share|improve this question




















  • 4




    POSIX specifies <termios.h>, so any OS claiming conformance should have that.
    – Barmar
    Nov 8 at 3:03










  • Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
    – mirabilos
    Nov 8 at 11:52










  • Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
    – Barmar
    Nov 8 at 16:08










  • Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
    – mirabilos
    Nov 8 at 20:29






  • 1




    I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
    – Chrono Kitsune
    Nov 15 at 5:44















up vote
0
down vote

favorite












I am currently pondering the presence of <sys/termios.h> on many systems, most of which have a symlink between it and <termios.h>, musl libc’s being a considerable exception: its <sys/termios.h> warns you that it’s wrong and to use <termios.h> instead.



On the BSDs, the actual file is in sys/ and the symlink in /usr/include, so one might have been historically excused for using this… but, giving that GNU autoconf’s AC_SYS_POSIX_TERMIOS does not look there (even though the configure.ac of a program I am looking at does use AC_CHECK_HEADERS([ … sys/termios.h … termios.h …]), I was wondering:



Is there any system in existence which has <sys/termios.h> with the usual suspects (tcgetattr, tcsetattr, cfgetospeed and related constants) but not <termios.h>?



Another piece of software I’m looking at only tries <termios.h> (both fall back to termio, one even to sgtty…), and I’m now trying to figure out whether I should patch one to also look at <sys/termios.h> (and probably the autoconf macro, too) or patch the other to not look there because it might be pointless.










share|improve this question




















  • 4




    POSIX specifies <termios.h>, so any OS claiming conformance should have that.
    – Barmar
    Nov 8 at 3:03










  • Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
    – mirabilos
    Nov 8 at 11:52










  • Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
    – Barmar
    Nov 8 at 16:08










  • Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
    – mirabilos
    Nov 8 at 20:29






  • 1




    I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
    – Chrono Kitsune
    Nov 15 at 5:44













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am currently pondering the presence of <sys/termios.h> on many systems, most of which have a symlink between it and <termios.h>, musl libc’s being a considerable exception: its <sys/termios.h> warns you that it’s wrong and to use <termios.h> instead.



On the BSDs, the actual file is in sys/ and the symlink in /usr/include, so one might have been historically excused for using this… but, giving that GNU autoconf’s AC_SYS_POSIX_TERMIOS does not look there (even though the configure.ac of a program I am looking at does use AC_CHECK_HEADERS([ … sys/termios.h … termios.h …]), I was wondering:



Is there any system in existence which has <sys/termios.h> with the usual suspects (tcgetattr, tcsetattr, cfgetospeed and related constants) but not <termios.h>?



Another piece of software I’m looking at only tries <termios.h> (both fall back to termio, one even to sgtty…), and I’m now trying to figure out whether I should patch one to also look at <sys/termios.h> (and probably the autoconf macro, too) or patch the other to not look there because it might be pointless.










share|improve this question















I am currently pondering the presence of <sys/termios.h> on many systems, most of which have a symlink between it and <termios.h>, musl libc’s being a considerable exception: its <sys/termios.h> warns you that it’s wrong and to use <termios.h> instead.



On the BSDs, the actual file is in sys/ and the symlink in /usr/include, so one might have been historically excused for using this… but, giving that GNU autoconf’s AC_SYS_POSIX_TERMIOS does not look there (even though the configure.ac of a program I am looking at does use AC_CHECK_HEADERS([ … sys/termios.h … termios.h …]), I was wondering:



Is there any system in existence which has <sys/termios.h> with the usual suspects (tcgetattr, tcsetattr, cfgetospeed and related constants) but not <termios.h>?



Another piece of software I’m looking at only tries <termios.h> (both fall back to termio, one even to sgtty…), and I’m now trying to figure out whether I should patch one to also look at <sys/termios.h> (and probably the autoconf macro, too) or patch the other to not look there because it might be pointless.







c portability autoconf termios






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 7:03









JJJ

29k147591




29k147591










asked Nov 8 at 2:59









mirabilos

3,4232855




3,4232855








  • 4




    POSIX specifies <termios.h>, so any OS claiming conformance should have that.
    – Barmar
    Nov 8 at 3:03










  • Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
    – mirabilos
    Nov 8 at 11:52










  • Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
    – Barmar
    Nov 8 at 16:08










  • Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
    – mirabilos
    Nov 8 at 20:29






  • 1




    I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
    – Chrono Kitsune
    Nov 15 at 5:44














  • 4




    POSIX specifies <termios.h>, so any OS claiming conformance should have that.
    – Barmar
    Nov 8 at 3:03










  • Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
    – mirabilos
    Nov 8 at 11:52










  • Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
    – Barmar
    Nov 8 at 16:08










  • Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
    – mirabilos
    Nov 8 at 20:29






  • 1




    I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
    – Chrono Kitsune
    Nov 15 at 5:44








4




4




POSIX specifies <termios.h>, so any OS claiming conformance should have that.
– Barmar
Nov 8 at 3:03




POSIX specifies <termios.h>, so any OS claiming conformance should have that.
– Barmar
Nov 8 at 3:03












Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
– mirabilos
Nov 8 at 11:52




Sure it does, but I was asking about portability, not about POSIX. This means especially to run on systems that predate or don’t implement POSIX.
– mirabilos
Nov 8 at 11:52












Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
– Barmar
Nov 8 at 16:08




Much of POSIX simply made existing practice among Unix variants official. And where there was no concensus (i.e. hard split between AT&T and BSD), it frequently copped out and said that either method was conforming.
– Barmar
Nov 8 at 16:08












Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
– mirabilos
Nov 8 at 20:29




Sure, but this is deliberately an archæology question, for portability to ancient weird systems someone may have around at VCFe or in some emulator. I know enough people dealing in those, but not experts like the autoconf people (e.g. @BrunoHaible) who know whether there was a system in existence that did so-and-so.
– mirabilos
Nov 8 at 20:29




1




1




I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
– Chrono Kitsune
Nov 15 at 5:44




I used the file search at TUHS. SysIII seems to be the earliest incarnation of <termio.h> (note the lack of an S), which <termios.h> was heavily based upon, though it lacked "the usual suspects" and was apparently used with ioctl instead. I dug around for older TTY-related files/functions the site had (other than termcap), and it seems that you'd be looking at using <sgtty.h>, notably on BSD systems before <sys/termios.h>. My guess is that <sys/termios.h> is/was a BSD thing; other systems POSIX-correctly have it installed as <termios.h>
– Chrono Kitsune
Nov 15 at 5:44

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53200928%2fare-there-oses-which-have-sys-termios-h-but-not-termios-h%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53200928%2fare-there-oses-which-have-sys-termios-h-but-not-termios-h%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini