Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32660

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Solaris should support constants like termios' FIONREAD
Type:enhancementStage:resolved
Components:Versions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: jceaNosy List: jcea
Priority:normalKeywords:patch

Created on2018-01-25 00:56 byjcea, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 5328mergedjcea,2018-01-26 00:47
Messages (5)
msg310651 -(view)Author: Jesús Cea Avión (jcea)*(Python committer)Date: 2018-01-25 00:56
Solaris supports termios constants like FIONREAD with an appropiate "#include" in the C code. The main issue is that some names conflicts between System V and BSD personalities.I could evaluate the situation and do a patch proposal for Python 3.7. We are still a week away of 3.7RC1 and this patch would affect only Solaris/derivatives.
msg310719 -(view)Author: Jesús Cea Avión (jcea)*(Python committer)Date: 2018-01-25 23:58
Solaris has two personalities: System V and BSD. This is not usually an issue but sometimes some constants have a different value in a mode or the other.By default, when including <sys/ioctl.h> Solaris is in System V mode. We can force BSD mode defining symbol "BSD_COMP". This greatly expand the names available but, unfortunately, some values change.The comment in <sys/ioctl.h> is quite clear:""" *      There are some inherent problems in having a single file *      ioctl.h, with both System V and BSD flags. Introducing *      BSD flags into this file creates compilation problems *      with flags such as ECHO, NL1 etc., if termio.h and ioctl.h *      are included by the same file. Since these two files can *      be only included by System V applications, /usr/inclule/sys/ioctl.h *      will be System V mode and all the BSD flags will be turned off *      using #ifdef BSD_COMP. This file will also exist in *      /usr/ucbinclude/sys/ioctl.h for BSD applications but without the *      BSD flags turned off. System V appliactions can use ioctl.h without *      any changes, System V applications requiring BSD flags should *      -D BSD_COMP when compiling (and be warned about the common *      flags between System V and BSD) and BSD applications should *      use /usr/ucbinclude/sys/ioctl.h."""Using "gcc -dM -E" we can observe defined symbols.Ambiguous values when defininf "BSD_COMP" are: BS0, BS1, CR0, CR1, CR2, CR3, ECHO, FF0, FF1, FLUSHO, NL0, NL1, NOFLSH, PENDIN, TAB0, TAB1, TAB2, TOSTOP, XTABS.Sounds quite important, actually.Since I am no aiming to perfection, I would be satisfied making quite a few new symbols available, not all of them. A simple approach would be to include <sys/filio.h> and <sys/sockio.h>. In those header files there are only constants, not functions or data structures.Just including those headers we get these new symbols (none overlapping other):_FIO_COMPRESSED_FIO_COUNT_FILLED_FIO_GET_TOP_STATS_FIO_SEEK_DATA_FIO_SEEK_HOLE_FIO_SET_LUFS_DEBUG_FIO_SET_LUFS_ERROR_FIOAI_FIODIRECTIO_FIOFFS_FIOGDIO_FIOGETMAXPHYS_FIOGETSUPERBLOCK_FIOIO_FIOISBUSY_FIOISLOG_FIOISLOGOK_FIOLFS_FIOLFSS_FIOLOGDISABLE_FIOLOGENABLE_FIOLOGRESET_FIOOBSOLETE67_FIOSATIME_FIOSDIO_FIOSNAPSHOTCREATE_FIOSNAPSHOTCREATE_MULTI_FIOSNAPSHOTDELETE_FIOTUNE_IO(x,y)_IOR(x,y,t)_IORN(x,y,t)_IOW(x,y,t)_IOWN(x,y,t)_IOWR(x,y,t)_IOWRN(x,y,t)_SIOCSOCKFALLBACK_SYS_FILIO_H_SYS_IOCCOM_H_SYS_SOCKIO_HFIOASYNCFIOCLEXFIOGETOWNFIONBIOFIONCLEXFIONREADFIOSETOWNIF_UNITSELIOC_INIOC_INOUTIOC_OUTIOC_VOIDIOCPARM_MASKO_SIOCGIFCONFO_SIOCGLIFCONFSIOCADDMULTISIOCADDRTSIOCATMARKSIOCDARPSIOCDELMULTISIOCDELRTSIOCDXARPSIOCGARPSIOCGDSTINFOSIOCGENADDRSIOCGENPSTATSSIOCGETLSGCNTSIOCGETNAMESIOCGETPEERSIOCGETPROPSIOCGETSGCNTSIOCGETSYNCSIOCGETVIFCNTSIOCGHIWATSIOCGIFADDRSIOCGIFBRDADDRSIOCGIFCONFSIOCGIFDSTADDRSIOCGIFFLAGSSIOCGIFHWADDRSI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OCSQPTRSIOCSSDSTATSSIOCSSESTATSSIOCSXARPSIOCTMYADDRSIOCTMYSITESIOCTONLINKSIOCUPPERSIOCX25RCVSIOCX25TBLSIOCX25XMTSIOCXPROTONot all those symbols are going to be exported in Python.
msg310722 -(view)Author: Jesús Cea Avión (jcea)*(Python committer)Date: 2018-01-26 00:16
After doing this change, I see FIVE new symbols in Python's termios:"""FIONREAD, FIONCLEX, FIOCLEX, FIOASYNC, FIONBIO."""Good enough for now and me.
msg310723 -(view)Author: Jesús Cea Avión (jcea)*(Python committer)Date: 2018-01-26 00:40
With this change, a SmarOS native zone exports 206 symbols in Python termios. Before it export 201. By comparison, a Linux Ubuntu 16.04 Python provides 244 symbols.Some references for the future:http://www.verycomputer.com/168_45f4bd8c333a252f_1.htm
msg310946 -(view)Author: Jesús Cea Avión (jcea)*(Python committer)Date: 2018-01-28 13:00
New changesetf0a95f27c043e847a23940534fdfc53e1b3e31a1 by jcea in branch 'master':bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)https://github.com/python/cpython/commit/f0a95f27c043e847a23940534fdfc53e1b3e31a1
History
DateUserActionArgs
2022-04-11 14:58:57adminsetgithub: 76841
2019-01-04 20:51:00cheryl.sabellasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-01-28 13:00:50jceasetmessages: +msg310946
2018-01-26 00:47:48jceasetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request5173
2018-01-26 00:40:47jceasetmessages: +msg310723
2018-01-26 00:16:47jceasetmessages: +msg310722
2018-01-25 23:58:39jceasetmessages: +msg310719
2018-01-25 00:56:59jceacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp