图书介绍

GNU技术文档精粹 GNU C库技术手册 卷1 英文版2025|PDF|Epub|mobi|kindle电子书版本百度云盘下载

GNU技术文档精粹 GNU C库技术手册 卷1 英文版
  • (美)鲁斯摩尔(Loosemore,S.)等著 著
  • 出版社: 北京:机械工业出版社
  • ISBN:7111081765
  • 出版时间:2000
  • 标注页数:548页
  • 文件大小:24MB
  • 文件页数:620页
  • 主题词:

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

GNU技术文档精粹 GNU C库技术手册 卷1 英文版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

1 Introduction1

1.1 Getting Started1

1.2 Standards and Portability1

1.2.1 ISO C2

1.2.2 POSIX(The Portable Operating System Interface)2

1.2.3 Berkeley Unix3

1.2.4 SVID(The System V Interface Description)3

1.2.5 XPG(The X/Open Portability Guide)4

1.3 Using the Library4

1.3.1 Header Files4

1.3.2 Macro Definitions of Functions5

1.3.3 Reserved Names6

1.3.4 Feature Test Macros8

1.4 Roadmap to the Manual12

2 Error Reporting17

2.1 Checking for Errors17

2.2 Error Codes18

2.3 Error Messages30

3 Memory Allocation33

3.1 Dynamic Memory Allocation Concepts33

3.2 Dynamic Allocation and C33

3.3 Unconstrained Allocation34

3.3.1 Basic Storage Allocation34

3.3.2 Examples of malloc35

3.3.3 Freeing Memory Allocated with malloc36

3.3.4 Changing the Size of a Block37

3.3.5 Allocating Cleared Space38

3.3.6 Efficiency Considerations for malloc39

3.3.7 Allocating Aligned Memory Blocks39

3.3.8 Malloc Tunable Parameters39

3.3.9 Heap Consistency Checking40

3.3.10 Storage Allocation Hooks42

3.3.11 Statistics for Storage Allocation with malloc45

3.3.12 Summary of malloc-Related Functions46

3.4 Allocation Debugging47

3.4.1 How to install the tracing functionality47

3.4.2 Example program excerpts48

3.4.3 Some more or less clever ideas48

3.4.4 Interpreting the traces49

3.5 Obstacks51

3.5.1 Creating Obstacks51

3.5.2 Preparing for Using Obstacks52

3.5.3 Allocation in an Obstack53

3.5.4 Freeing Objects in an Obstack54

3.5.5 Obstack Functions and Macros55

3.5.6 Growing Objects56

3.5.7 Extra Fast Growing Objects57

3.5.8 Status of an Obstack59

3.5.9 Alignment of Data in Obstacks60

3.5.10 Obstack Chunks60

3.5.11 Summary of Obstack Functions61

3.6 Automatic Storage with Variable Size63

3.6.1 alloca Example63

3.6.2 Advantages of alloca64

3.6.3 Disadvantages of alloca65

3.6.4 GNU C Variable-Size Arrays65

4 Character Handling67

4.1 Classification of Characters67

4.2 Case Conversion69

4.3 Character class determination for wide characters70

4.4 Notes on using the wide character classes74

4.5 Mapping of wide characters75

5 String and Array Utilities77

5.1 Representation of Strings77

5.2 String and Array Conventions78

5.3 String Length78

5.4 Copying and Concatenation79

5.5 String/Array Comparison88

5.6 Collation Functions91

5.7 Search Functions94

5.8 Finding Tokens in a String97

5.9 Encode Binary Data100

5.10 Argz and Envz Vectors102

5.10.1 Argz Functions102

5.10.2 Envz Functions104

6 Character Set Handling107

6.1 Introduction to Extended Characters107

6.2 Overview about Character Handling Functions111

6.3 Restartable Multibyte Conversion Functions111

6.3.1 Selecting the conversion and its properties112

6.3.2 Representing the state of the conversion113

6.3.3 Converting Single Characters114

6.3.4 Converting Multibyte and Wide Character Strings121

6.3.5 A Complete Multibyte Conversion Example125

6.4 Non-reentrant Conversion Function127

6.4.1 Non-reentrant Conversion of Single Characters127

6.4.2 Non-reentrant Conversion of Strings129

6.4.3 States in Non-reentrant Functions130

6.5 Generic Charset Conversion131

6.5.1 Generic Character Set Conversion Interface132

6.5.2 A complete iconv example136

6.5.3 Some Details about other iconv Implementations138

6.5.4 The iconv Implementation in the GNU C library140

6.5.4.1 Format of'gconv-modules'files141

6.5.4.2 Finding the conversion path in iconv143

6.5.4.3 iconv module data structures143

6.5.4.4 iconv module interfaces147

7 Locales and Internationalization157

7.1 What Effects a Locale Has157

7.2 Choosing a Locale158

7.3 Categories of Activities that Locales Affect158

7.4 How Programs Set the Locale159

7.5 Standard Locales161

7.6 Accessing Locale Information162

7.6.1 localeconv:It is portable but162

7.6.1.1 Generic Numeric Formatting Parameters163

7.6.1.2 Printing the Currency Symbol164

7.6.1.3 Printing the Sign of a Monetary Amount166

7.6.2 Pinpoint Access to Locale Data167

7.7 A dedicated function to format numbers172

8 Message Translation177

8.1 X/Open Message Catalog Handling177

8.1.1 The catgets function family178

8.1.2 Format of the message catalog files181

8.1.3 Generate Message Catalogs files183

8.1.4 How to use the catgets interface185

8.1.4.1 Not using symbolic names185

8.1.4.2 Using symbolic names185

8.1.4.3 How does to this allow to develop186

8.2 The Uniforum approach to Message Translation188

8.2.1 The gettext family of functions188

8.2.1.1 What has to be done to translate a message?189

8.2.1.2 How to determine which catalog to be used191

8.2.1.3 User influence on gettext193

8.2.2 Programs to handle message catalogs for gettext196

9 Searching and Sorting199

9.1 Defining the Comparison Function199

9.2 Array Search Function199

9.3 Array Sort Function200

9.4 Searching and Sorting Example201

9.5 The hsearch function204

9.6 The tsearch function207

10 Pattern Matching211

10.1 Wildcard Matching211

10.2 Globbing212

10.2.1 Calling glob212

10.2.2 Flags for Globbing214

10.2.3 More Flags for Globbing216

10.3 Regular Expression Matching218

10.3.1 POSIX Regular Expression Compilation218

10.3.2 Flags for POSIX Regular Expressions220

10.3.3 Matching a Compiled POSIX Regular Expression221

10.3.4 Match Results with Subexpressions222

10.3.5 Complications in Subexpression Matching223

10.3.6 POSIX Regexp Matching Cleanup223

10.4 Shell-Style Word Expansion224

10.4.1 The Stages of Word Expansion225

10.4.2 Calling wordexp225

10.4.3 Flags for Word Expansion227

10.4.4 wordexp Example228

10.4.5 Details of Tilde Expansion229

10.4.6 Details of Variable Substitution229

11 Input/Output Overview233

11.1 Input/Output Concepts233

11.1.1 Streams and File Descriptors233

11.1.2 File Position234

11.2 File Names235

11.2.1 Directories235

11.2.2 File Name Resolution236

11.2.3 File Name Errors237

11.2.4 Portability of File Names238

12 Input/Output on Streams239

12.1 Streams239

12.2 Standard Streams239

12.3 Opening Streams240

12.4 Closing Streams243

12.5 Simple Output by Characters or Lines244

12.6 Character Input245

12.7 Line-Oriented Input246

12.8 Unreading248

12.8.1 What Unreading Means248

12.8.2 Using ungetc To Do Unreading249

12.9 Block Input/Output250

12.10 Formatted Output251

12.10.1 Formatted Output Basics251

12.10.2 Output Conversion Syntax252

12.10.3 Table of Output Conversions254

12.10.4 Integer Conversions255

12.10.5 Floating-Point Conversions257

12.10.6 Other Output Conversions259

12.10.7 Formatted Output Functions261

12.10.8 Dynamically Allocating Formatted Output262

12.10.9 Variable Arguments Output Functions263

12.10.10 Parsing a Template String266

12.10.11 Example of Parsing a Template String267

12.11 Customizing printf269

12.11.1 Registering New Conversions269

12.11.2 Conversion Specifier Options270

12.11.3 Defining the Output Handler272

12.11.4 printf Extension Example273

12.11.5 Predefined printf Handlers274

12.12 Formatted Input275

12.12.1 Formatted Input Basics276

12.12.2 Input Conversion Syntax277

12.12.3 Table of Input Conversions278

12.12.4 Numeric Input Conversions279

12.12.5 String Input Conversions281

12.12.6 Dynamically Allocating String Conversions282

12.12.7 Other Input Conversions283

12.12.8 Formatted Input Functions283

12.12.9 Variable Arguments Input Functions284

12.13 End-Of-File and Errors285

12.14 Text and Binary Streams285

12.15 File Positioning286

12.16 Portable File-Position Functions289

12.17 Stream Buffering291

12.17.1 Buffering Concepts292

12.17.2 Flushing Buffers292

12.1 7.3 Controlling Which Kind of Buffering293

12.18 Other Kinds of Streams295

12.18.1 String Streams295

12.18.2 Obstack Streams297

12.18.3 Programming Your Own Custom Streams298

12.18.3.1 Custom Streams and Cookies298

12.18.3.2 Custom Stream Hook Functions300

12.19 Formatted Messages301

12.19.1 Printing Formatted Messages301

12.19.2 Adding Severity Classes304

12.19.3 How to use fmtmsg and addseverity304

13 Low-Level Input/Output307

13.1 Opening and Closing Files307

13.2 Input and Output Primitives310

13.3 Setting the File Position of a Descriptor315

13.4 Descriptors and Streams318

13.5 Dangers of Mixing Streams and Descriptors319

13.5.1 Linked Chanuels320

13.5.2 Independent Channels320

13.5.3 Cleaning Streams321

13.6 Fast Scatter-Gather I/O321

13.7 Memory-mapped I/O323

13.8 Waiting for Input or Output326

13.9 Synchronizing I/O operations330

13.10 Perform I/O Operations in Parallel331

13.10.1 Asynchronous Read and Write Operations334

13.10.2 Getting the Status of AIO Operations338

13.10.3 Getting into a Consistent State340

13.10.4 Cancellation of AIO Operations342

13.10.5 How to optimize the AIO implementation343

13.11 Control Operations on Files344

13.12 Duplicating Descriptors345

13.13 File Descriptor Flags347

13.14 File Status Flags349

13.14.1 File Access Modes349

13.14.2 Open-time Flags350

13.14.3 I/O Operating Modes352

13.14.4 Getting and Setting File Status Flags353

13.15 File Locks354

13.16 Interrupt-Driven Input358

13.17 Generic I/O Control operations359

14 File System Interface361

14.1 Working Directory361

14.2 Accessing Directories363

14.2.1 Format of a Directory Entry363

14.2.2 Opening a Directory Stream364

14.2.3 Reading and Closing a Directory Stream365

14.2.4 Simple Program to List a Directory366

14.2.5 Random Access in a Directory Stream367

14.2.6 Scanning the Content of a Directory367

14.2.7 Simple Program to List a Directory,Mark II369

14.3 Working with Directory Trees370

14.4 Hard Links374

14.5 Symbolic Links375

14.6 Deleting Files377

14.7 Renaming Files378

14.8 Creating Directories379

14.9 File Attributes380

14.9.1 The meaning of the File Attributes380

14.9.2 Reading the Attributes of a File385

14.9.3 Testing the Type of a File386

14.9.4 File Owner388

14.9.5 The Mode Bits for Access Permission389

14.9.6 How Your Access to a File is Decided391

14.9.7 Assigning File Permissions392

14.9.8 Testing Permission to Access a File394

14.9.9 File Times395

14.9.10 File Size397

14.10 Making Special Files400

14.11 Temporary Files401

15 Pipes and FIFOs405

15.1 Creating a Pipe405

15.2 Pipe to a Subprocess407

15.3 FIFO Special Files409

15.4 Atomicity of Pipe I/O410

16 Sockets411

16.1 Socket Concepts411

16.2 Communication Styles412

16.3 Socket Addresses413

16.3.1 Address Formats414

16.3.2 Setting the Address of a Socket415

16.3.3 Reading the Address of a Socket416

16.4 Interface Naming417

16.5 The Local Namespace418

16.5.1 Local Namespace Concepts418

16.5.2 Details of Local Namespace418

16.5.3 Example of Local-Namespace Sockets419

16.6 The Internet Namespace420

16.6.1 Internet Socket Address Formats421

16.6.2 Host Addresses422

16.6.2.1 Internet Host Addresses422

16.6.2.2 Host Address Data Type424

16.6.2.3 Host Address Functions425

16.6.2.4 Host Names427

16.6.3 Internet Ports431

16.6.4 The Services Database432

16.6.5 Byte Order Conversion433

16.6.6 Protocols Database434

16.6.7 Internet Socket Example436

16.7 Other Namespaces437

16.8 Opening and Closing Sockets437

16.8.1 Creating a Socket437

16.8.2 Closing a Socket438

16.8.3 Socket Pairs439

16.9 Using Sockets with Connections440

16.9.1 Making a Connection440

16.9.2 Listening for Connections441

16.9.3 Accepting Connections442

16.9.4 Who is Connected to Me?443

16.9.5 Transferring Data444

16.9.5.1 Sending Data444

16.9.5.2 Receiving Data445

16.9.5.3 Socket Data Options446

16.9.6 Byte Stream Socket Example446

16.9.7 Byte Stream Connection Server Example448

16.9.8 Out-of-Band Data450

16.10 Datagram Socket Operations454

16.10.1 Sending Datagrams454

16.10.2 Receiving Datagrams455

16.10.3 Datagram Socket Example455

16.10.4 Example of Reading Datagrams457

16.11 The inetd Daemon458

16.11.1 inetd Servers459

16.11.2 Configuring inetd459

16.12 Socket Options460

16.12.1 Socket Option Functions460

16.12.2 Socket-Level Options461

16.13 Networks Database462

17 Low-Level Terminal Interface465

17.1 Identifying Terminals465

17.2 I/O Queues466

17.3 Two Styles of Input:Canonical or Not466

17.4 Terminal Modes467

17.4.1 Terminal Mode Data Types467

17.4.2 Terminal Mode Functions468

17.4.3 Setting Terminal Modes Properly470

17.4.4 Input Modes471

17.4.5 Output Modes473

17.4.6 Control Modes474

17.4.7 Local Modes476

17.4.8 Line Speed479

17.4.9 Special Characters480

17.4.9.1 Characters for Input Editing481

17.4.9.2 Characters that Cause Signals483

17.4.9.3 Special Characters for Flow Control484

17.4.9.4 Other Special Characters484

17.4.10 Noncanonical Input485

17.5 Line Control Functions487

17.6 Noncanonical Mode Example489

17.7 Pseudo-Terminals491

17.7.1 Allocating Pseudo-Terminals491

17.7.2 Opening a Pseudo-Terminal Pair493

18 Mathematics495

18.1 Predefined Mathematical Constants495

18.2 Trigonometric Functions496

18.3 Inverse Trigonometric Functions498

18.4 Exponentiation and Logarithms499

18.5 Hyperbolic Functions504

18.6 Special Functions505

18.7 Pseudo-Random Numbers508

18.7.1 ISO C Random Number Functions508

18.7.2 BSD Random Number Functions509

18.7.3 SVID Random Number Function510

18.8 Is Fast Code or Small Code preferred?515

19 Arithmetic Functions517

19.1 Floating Point Numbers517

19.2 Floating-Point Number Classification Functions517

19.3 Errors in Floating-Point Calculations519

19.3.1 FP Exceptions519

19.3.2 Infinity and NaN521

19.3.3 Examining the FPU status word523

19.3.4 Error Reporting by Mathematical Functions524

19.4 Rounding Modes525

19.5 Floating-Point Control Functions527

19.6 Arithmetic Functions528

19.6.1 Absolute Value528

19.6.2 Normalization Functions529

19.6.3 Rounding Functions531

19.6.4 Remainder Functions532

19.6.5 Setting and modifying single bits of FP values533

19.6.6 Floating-Point Comparison Functions535

19.6.7 Miscellaneous FP arithmetic functions536

19.7 Complex Numbers537

19.8 Projections,Conjugates,and Decomposing of Complex538

19.9 Integer Division539

19.10 Parsing of Numbers540

19.10.1 Parsing of Integers541

19.10.2 Parsing of Floats544

19.11 Old-fashioned System V number-to-string functions545

20 Date and Time549

20.1 Processor Time549

20.1.1 Basic CPU Time Inquiry549

20.1.2 Detailed Elapsed CPU Time Inquiry550

20.2 Calendar Time551

20.2.1 Simple Calendar Time552

20.2.2 High-Resolution Calendar552

20.2.3 Broken-down Time555

20.2.4 Formatting Date and Time558

20.2.5 Convert textual time and date information back564

20.2.5.1 Interpret string according to given format564

20.2.5.2 A user-friendlier way to parse times and dates570

20.2.6 Specifying the Time Zone with TZ572

20.2.7 Functions and Variables for Time Zones575

20.2.8 Time Functions Example576

20.3 Precision Time576

20.4 Setting an Alarm579

20.5 Sleeping582

20.6 Resource Usage583

20.7 Limiting Resource Usage585

20.8 Process Priority588

21 Non-Local Exits591

21.1 Introduction to Non-Local Exits591

21.2 Details of Non-Local Exits593

21.3 Non-Local Exits and Signals594

22 Signal Handling595

22.1 Basic Concepts of Signals595

22.1.1 Some Kinds of Signals595

22.1.2 Concepts of Signal Generation596

22.1.3 How Signals Are Delivered596

22.2 Standard Signals597

22.2.1 Program Error Signals598

22.2.2 Termination Signals601

22.2.3 Alarm Signals602

22.2.4 Asynchronous I/O Signals603

22.2.5 Job Control Signals603

22.2.6 Operation Error Signals605

22.2.7 Miscellaneous Signals606

22.2.8 Signal Messages607

22.3 Specifying Signal Actions608

22.3.1 Basic Signal Handling608

22.3.2 Advanced Signal Handling610

22.3.3 Interaction of signal and sigaction612

22.3.4 sigaction Function Example612

22.3.5 Flags for sigaction614

22.3.6 Initial Signal Actions614

22.4 Defining Signal Handlers615

22.4.1 Signal Handlers that Return616

22.4.2 Handlers That Terminate the Process617

22.4.3 Nonlocal Control Transfer in Handlers618

22.4.4 Signals Arriving While a Handler Runs619

22.4.5 Signals Close Together Merge into One620

22.4.6 Signal Handling and Nonreentrant Functions623

22.4.7 Atomic Data Access and Signal Handling624

22.4.7.1 Problems with Non-Atomic Access625

22.4.7.2 Atomic Types626

22.4.7.3 Atomic Usage Patterns626

22.5 Primitives Interrupted by Signals627

22.6 Generating Signals628

22.6.1 Signaling Yourself628

22.6.2 Signaling Another Process629

22.6.3 Permission for using kill630

22.6.4 Using kill for Communication631

22.7 Blocking Signals633

22.7.1 Why Blocking Signals is Useful633

22.7.2 Signal Sets633

22.7.3 Process Signal Mask635

22.7.4 Blocking to Test for Delivery of a Signal636

22.7.5 Blocking Signals for a Handler637

22.7.6 Checking for Pending Signals638

22.7.7 Remembering a Signal to Act On Later639

22.8 Waiting for a Signal641

22.8.1 Using pause641

22.8.2 Problems with pause641

22.8.3 Using sigsuspend642

22.9 Using a Separate Signal Stack643

22.10 BSD Signal Handling646

22.10.1 BSD Function to Establish a Handler646

22.10.2 BSD Functions for Blocking Signals647

23 Process Startup and Termination649

23.1 Program Arguments649

23.1.1 Program Argument Syntax Conventions650

23.1.2 Parsing Program Arguments651

23.2 Parsing program options using getopt651

23.2.1 Using the getopt function651

23.2.2 Example of Parsing Arguments with getopt652

23.2.3 Parsing Long Options with getopt_long654

23.2.4 Example of Parsing Long Options with getopt_long656

23.3 Parsing Program Options with Argp659

23.3.1 The argp_parse Function659

23.3.2 Argp Global Variables660

23.3.3 Specifying Argp Parsers660

23.3.4 Specifying Options in an Argp Parser662

23.3.4.1 Flags for Argp Options663

23.3.5 Argp Parser Functions664

23.3.5.1 Special Keys for Argp Parser Functions665

23.3.5.2 Functions For Use in Argp Parsers667

23.3.5.3 Argp Parsing State668

23.3.6 Combining Multiple Argp Parsers670

23.3.7 Flags for argp_parse671

23.3.8 Customizing Argp Help Output672

23.3.8.1 Special Keys for Argp Help Filter Functions672

23.3.9 The argp_help Function673

23.3.10 Flags for the argp_help Function673

23.3.11 Argp Examples675

23.3.11.1 A Minimal Program Using Argp675

23.3.11.2 A Program Using Argp with Only Default Options675

23.3.11.3 A Program Using Argp with User Options677

23.3.11.4 A Program Using Multiple Combined Argp Parsers681

23.3.12 Argp User Customization681

23.3.12.5 Parsing of Suboptions685

23.3.13 Parsing of Suboptions Example686

23.4 Environment Variables688

23.4.1 Environment Access689

23.4.2 Standard Environment Variables691

23.5 Program Termination693

23.5.1 Normal Termination693

23.5.2 Exit Status694

23.5.3 Cleanups on Exit694

23.5.4 Aborting a Program696

23.5.5 Termination Internals696

24 Processes699

24.1 Running a Command699

24.2 Process Creation Concepts700

24.3 Process Identification700

24.4 Creating a Process701

24.5 Executing a File702

24.6 Process Completion705

24.7 Process Completion Status708

24.8 BSD Process Wait Functions709

24.9 Process Creation Example710

25 Job Control713

25.1 Concepts of Job Control713

25.2 Job Control is Optional714

25.3 Controlling Terminal of a Process714

25.4 Access to the Controlling Terminal715

25.5 Orphaned Process Groups715

25.6 Implementing a Job Control Shell716

25.6.1 Data Structures for the Shell716

25.6.2 Initializing the Shell718

25.6.3 Launching Jobs720

25.6.4 Foreground and Background724

25.6.5 Stopped and Terminated Jobs725

25.6.6 Continuing Stopped Jobs730

25.6.7 The Missing Pieces730

25.7 Functions for Job Control731

25.7.1 Identifying the Controlling Terminal731

25.7.2 Process Group Functions732

25.7.3 Functions for Controlling Terminal Access734

26 System Databases and Name Service Switch737

26.1 NSS Basics737

26.2 The NSS Configuration File738

26.2.1 Services in the NSS configuration File739

26.2.2 Actions in the NSS configuration739

26.2.3 Notes on the NSS Configuration File740

26.3 NSS Module Internals741

26.3.1 The Naming Scheme of the NSS Modules741

26.3.2 The Interface of the Function in NSS Modules742

26.4 Extending NSS744

26.4.1 Adding another Service to NSS744

26.4.2 Internals of the NSS Module Functions745

27 Users and Groups749

27.1 User and Group IDs749

27.2 The Persona of a Process749

27.3 Why Change the Persona of a Process?750

27.4 How an Application Can Change Persona751

27.5 Reading the Persona of a Process751

27.6 Setting the User ID752

27.7 Setting the Group IDs753

27.8 Enabling and Disabling Setuid Access755

27.9 Setuid Program Example756

27.10 Tips for Writing Setuid Programs759

27.11 Identifying Who Logged In759

27.12 The User Accounting Database760

27.12.1 Manipulating the User Accounting Database761

27.12.2 XPG User Accounting Database Functions766

27.12.3 Logging In and Out768

27.13 User Database769

27.13.1 The Data Structure that Describes a User769

27.13.2 Looking Up One User769

27.13.3 Scanning the List of All Users770

27.13.4 Writing a User Entry772

27.14 Group Database772

27.14.1 The Data Structure for a Group772

27.14.2 Looking Up One Group772

27.14.3 Scanning the List of All Groups773

27.15 User and Group Database Example775

27.16 Netgroup Database776

27.16.1 Netgroup Data776

27.16.2 Looking up one Netgroup777

27.16.3 Testing for Netgroup Membership778

28 System Information779

28.1 Host Identification779

28.2 Hardware/Software Type Identification780

28.3 Which filesystems are mounted and/or available?781

29 System Configuration Parameters789

29.1 General Capacity Limits789

29.2 Overall System Options790

29.3 Which Version of POSIX is Supported792

29.4 Using sysconf793

29.4.1 Definition of sysconf793

29.4.2 Constants for sysconf Parameters793

29.4.3 Examples of sysconf801

29.5 Minimum Values for General Capacity Limits802

29.6 Limits on File System Capacity803

29.7 Optional Features in File Support805

29.8 Minimum Values for File System Limits806

29.9 Using pathconf807

29.10 Utility Program Capacity Limits808

29.11 Minimum Values for Utility Limits809

29.12 String-Valued Parameters810

30 DES Encryption and Password Handling813

30.1 Legal Problems813

30.2 Reading Passwords814

30.3 Encrypting Passwords815

30.4 DES Encryption818

31 POSIX Threads821

31.1 Basic Thread Operations821

31.2 Thread Attributes823

31.3 Cancellation825

31.4 Cleanup Handlers826

31.5 Mutexes828

31.6 Condition Variables832

31.7 POSIX Semaphores835

31.8 Thread-Specific Data836

31.9 Threads and Signal Handling839

31.10 Miscellaneous Thread Functions840

Appendix A C Language Facilities in the Library845

A.1 Explicitly Checking Internal Consistency845

A.2 Variadic Functions846

A.2.1 Why Variadic Functions are Used847

A.2.2 How Variadic Functions are Defined and Used847

A.2.2.1 Syntax for Variable Arguments848

A.2.2.2 Receiving the Argument Values848

A.2.2.3 How Many Arguments Were Supplied849

A.2.2.4 Calling Variadic Functions850

A.2.2.5 Argument Access Macros850

A.2.3 Example of a Variadic Function852

A.2.3.1 Old-Style Variadic Functions853

A.3 Null Pointer Constant853

A.4 Important Data Types854

A.5 Data Type Measurements855

A.5.1 Computing the Width of an Integer Data Type855

A.5.2 Range of an Integer Type855

A.5.3 Floating Type Macros857

A.5.3.1 Floating Point Representation Concepts857

A.5.3.2 Floating Point Parameters859

A.5.3.3 IEEE Floating Point862

A.5.4 Structure Field Offset Measurement863

App endix B Summary of Library Facilities865

Appendix C Installing the GNU C Library997

C.1 Configuring and compiling GNU Libc997

C.2 Installing the C Library1000

C.3 Recommended Tools for Compilation1001

C.4 Supported Configurations1003

C.5 Specific advice for Linux systems1004

C.6 Reporting Bugs1005

Appendix D Library Maintenance1007

D.1 Adding New Functions1007

D.2 Porting the GNU C Library1008

D.2.1 Layout of the'sysdeps'Directory Hierarchy1011

D.2.2 Porting the GNU C Library to Unix Systems1014

Appendix E Contributors to the GNU C Library1015

Appendix F GNU LIBRARY GENERAL PUBLIC LICENSE1023

Preamble1023

TERMS AND CONDITIONS FOR COPYING,DISTRIBUTION AND MODIFICATION1025

How to Apply These Terms to Your New Libraries1032

Concept Index1033

Type Index1047

Function and Macro Index1051

Variable and Constant Macro Index1067

Program and File Index1079

热门推荐