A Source Book from the Open Group
Total Page:16
File Type:pdf, Size:1020Kb
A Source Book from The Open Group The Single UNIX· Specification: The Authorized Guide to Version 3, 2nd Edition The Open Group Copyright ¶ June 2004, The Open Group All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of the copyright owners. A Source Book from The Open Group The Single UNIX· Specification: The Authorized Guide to Version 3, 2nd Edition ISBN: 1-931624-47-X Document Number: G041 Published in the U.S. by The Open Group, June 2004. Any comments relating to the material contained in this document may be submitted by email to: [email protected] ii A Source Book from The Open Group (2004) ____________________________________________________ Contents ____________________________________________________ Chapter 1 The Single UNIX Specification............................................ 1 1.1 Introduction.................................................................................. 1 1.2 Background ................................................................................. 1 1.3 The Value of Standards................................................................ 2 1.4 The Single UNIX Specification ..................................................... 2 1.5 Benefits for Application Developers.............................................. 3 1.6 Benefits for Users........................................................................ 3 1.7 The Common API Specification.................................................... 3 1.8 The Single UNIX Specification, Version 2..................................... 5 1.9 The Single UNIX Specification, Version 3..................................... 5 1.10 IEEE Std 1003.1 .......................................................................... 8 1.11 ISO/IEC 9945 .............................................................................. 8 1.12 The Austin Group......................................................................... 8 1.13 Summary..................................................................................... 9 Chapter 2 The Open Brand....................................................................... 11 2.1 Product Standards ....................................................................... 12 2.2 Conformance Statements............................................................ 12 2.3 Testing......................................................................................... 13 2.4 The Single UNIX Specification, Version 3..................................... 13 Chapter 3 The Single UNIX Environment ............................................ 15 3.1 Introduction.................................................................................. 15 3.2 Formal Standards Alignment ........................................................ 16 3.3 Portability Codes.......................................................................... 16 3.4 Option Groups ............................................................................. 22 3.5 Common Directories and Devices ................................................ 22 3.6 Environment Variables................................................................. 23 3.7 YACC Grammars as Specifications.............................................. 23 3.8 Regular Expressions.................................................................... 24 3.9 File Access .................................................................................. 24 3.10 Programming Environment........................................................... 24 3.10.1 Interface Counts ....................................................................... 24 3.10.2 C-Language Support................................................................. 25 3.10.3 Feature Test Macros and Name Space Issues .......................... 25 3.10.4 Error Numbers .......................................................................... 26 3.10.5 Standard I/O Streams ............................................................... 26 3.10.6 STREAMS ................................................................................ 26 The Single UNIX· Specification: The Authorized Guide to Version 3, 2nd Edition iii Contents 3.10.7 XSI Interprocess Communication.............................................. 26 3.10.8 Realtime ................................................................................... 27 3.10.9 Threads .................................................................................... 27 3.10.10 General Terminal Interface........................................................ 27 3.10.11 How to Read an XSH Reference Page...................................... 27 3.11 Commands and Utilities Environment........................................... 28 3.11.1 Shell Command Language........................................................ 28 3.11.2 Symbolic Links.......................................................................... 28 3.11.3 File Format Notation.................................................................. 28 3.11.4 How to Read an XCU Reference Page...................................... 29 3.12 Networking Services Environment................................................ 29 3.13 Terminal Interfaces Environment.................................................. 30 3.14 Internationalization....................................................................... 30 Chapter 4 The Single UNIX Specification, Version 3....................... 33 4.1 Base Definitions (XBD) ................................................................ 33 4.2 System Interfaces (XSH) ............................................................. 34 4.3 Shell and Utilities (XCU)............................................................... 34 4.4 Rationale (XRAT)......................................................................... 35 4.5 X/Open Curses (XCURSES)........................................................ 35 Chapter 5 System Interfaces ................................................................... 37 5.1 Base Documents ......................................................................... 37 5.2 Overview of Changes................................................................... 38 5.3 System Interfaces by Category .................................................... 44 5.4 XSH Option Groups ..................................................................... 50 5.5 Options Policy.............................................................................. 52 Chapter 6 Shell and Utilities .................................................................... 55 6.1 Options in XCU............................................................................ 55 6.2 Functional Overview..................................................................... 55 6.3 Base Documents ......................................................................... 57 6.4 Overview of Changes................................................................... 57 6.5 Exclusion of Utilities..................................................................... 59 Chapter 7 Headers ...................................................................................... 63 7.1 Header and Name Space Rules................................................... 63 7.1.1 ISO C Headers ......................................................................... 63 7.1.2 POSIX.1-2001 Base Headers ................................................... 64 7.1.3 XSI Headers ............................................................................. 65 7.2 Names Safe to Use...................................................................... 65 7.2.1 Reserved Names ...................................................................... 66 7.3 Base Documents ......................................................................... 66 7.4 Overview of Changes................................................................... 66 iv A Source Book from The Open Group (2004) Contents Chapter 8 Terminal Interfaces ................................................................. 69 8.1 Functional Overview..................................................................... 69 8.2 Curses in an Issue 6 Environment................................................ 70 Chapter 9 System Interface Table.......................................................... 73 Chapter 10 Utilities Interface Table ......................................................... 99 Chapter 11 Headers Interface Table ........................................................ 105 Chapter 12 XCURSES Interface Table .................................................... 109 Chapter 13 System Interfaces Migration ............................................... 119 Chapter 14 Utilities Migration.................................................................... 344 Chapter 15 Headers Migration................................................................... 391 Chapter 16 ISO C Migration........................................................................ 425 16.1 Introduction.................................................................................. 425 16.2 Language Changes...................................................................... 425 16.2.1 New Keywords.......................................................................... 425 16.2.2 New Types...............................................................................