From ynk@ome Wed May 1 20:24:26 1991 Received: from mcsun.EU.net by dkuug.dk via EUnet with SMTP (5.64+/8+bit/IDA-1.2.8) id AA10027; Wed, 1 May 91 20:24:26 +0200 Received: by mcsun.EU.net via EUnet; id AA15580 (5.65a/CWI-2.83); Wed, 1 May 91 20:24:16 +0200 Received: by kddlab.kddlabs.co.jp (5.64/6.2Junet) id AA05897; Wed, 1 May 91 18:12:14 +0900 Received: by tis1.tis.toshiba.co.jp (3.2/6.4J.6-R34) id AA19187; Wed, 1 May 91 16:36:40 JST Return-Path: Message-Id: <9105010736.AA19187@tis1.tis.toshiba.co.jp> To: wg15rin@dkuug.dk From: y.nakahara@ome.toshiba.co.jp (Yasushi Nakahara) Subject: Re: (wg15rin 107) new POSIX byte definition (00040) Date: Wed May 1 13:47:10 JST 1991 X-Charset: ASCII X-Char-Esc: 29 WG15RIN people, : Date: Sun, 28 Apr 91 10:51:27 +0200 : From: Keld J|rn Simonsen : To: dkuug.dk!wg15rin : Subject: (wg15rin 107) new POSIX byte definition (00040) : : Here is a proposed new definition for byte in POSIX.2, based on : balloting objections and discussions with Greger. Donn, see if my .1 : references are valid and provide any other comments. Keld, what does : RIN think of this? The diffmark "1" is used for Draft 11.1. : : Hal Good job, Hal. : 2.2.2.22 byte: : : An individually addressible unit of data storage that is equal to or 1 : larger than an octet, used to store a character or a portion of a 1 : character; see 2.2.2.24. 1 : : A byte is composed of a contiguous sequence of bits, the number of which 1 : is implementation defined. The least significant bit is called the low- : order bit; the most significant is called the high-order bit. : [POSIX.1 {8}] I think that the "definition" of byte itself is fine. However, in POSIX.1 or other POSIX.x, do we provide the POSIX developers/users with a mechanism for data/file interchange across the POSIX systems where a number of bits for a byte may vary from system to system? In other words, can we safely say that the current data interchange format defined by POSIX.1 based on "byte offset" and "byte counts", i.e. an extended tar format and/or an extended cpio format, is surely portable only with the proposed definition of byte? : NOTE: This definition of byte is actually from the C Standard {7} : because POSIX.1 {8} merely references it without copying the text. It 1 : has been reworded slightly to clarify its intent without introducing the 1 : C Standard {7} terminology ``basic execution character set,'' which is 1 : inapplicable to this standard. It deviates intentionally from the usage 1 : of byte in some other standards, where it is used as a synonym for octet 1 : (always eight bits). On a POSIX.1 {8} system, a byte may be larger than 1 : eight bits so that it can be an integral portion of larger data objects 1 : that are not evenly divisible by eight bits (such as a 36-bit word that 1 : contains 4 9-bit bytes). 1 : : Rationale: : : This standard uses the term character to mean a sequence of one or more : bytes representing a single graphic symbol, as defined in POSIX.1 {8}. 1 : The deviation in the exact text of the C Standard {7} definition for byte 1 : meets the intent of the C Standard {7} Rationale and the developers of 1 : POSIX.1 {8}, but clears up the ambiguity raised by the term basic 1 : execution character set, which is not defined in POSIX.1 {8}. It is 1 : expected that a future version of POSIX.1 {8} will align with the text 1 : used here. The octet-minimum requirement is merely a reflection of the 1 : {CHAR_BIT} value in POSIX.1 {8} and the C Standard {7}. 1 Again, as far as the Standard terminology is concerned, the above definition, note, and rationale have no problem. And I understand that the minimum requirement for {CHAR_BIT} value in POSIX.1 is eight. However, what I'm concerning about the byte definition in POSIX environments is that if a system uses more than eight bits for a byte, there is no well defined/ described way in the (current) POSIX Standard on how to develop a "portable" application which handles external data in files or on communication lines whose data may be written with another bit size of a byte. Comments? -- Yasushi Nakahara TOSHIBA Corp. New Phone: +81 428-32-0722, New Fax: +81 428-32-0408 Email: ynk@ome.toshiba.co.jp | y.nakahara@ui.org | ..!tsbome!ynk