Document: WG14 N1207
Date: 2007/02/28


Defect Report #3xx

Previous Defect Report < - > Next Defect Report
 

Submitter: Nick Stoughton (US)
Submission Date: 2007-02-28
Source: Austin Group

Version: 1.2
Date: 2007-02-28
Subject: stdio.h macro definition problems

Summary

The BUFSIZ macro is introduced in 7.19.1 para 3 as

BUFSIZ
which expands to an integer constant expression that is the size of the buffer used by the setbuf function

There is no requirement that BUFSIZ should be a non-zero, positive integer constant expression. Such a requirement should be spelled out clearly.

The same is true for FOPEN_MAX and FILENAME_MAX.

Suggested Technical Corrigendum

Change the definition of BUFSIZ to:

BUFSIZ
which expands to a non-zero, positive integer constant expression that is the size of the buffer used by the setbuf function
Similarly,
FOPEN_MAX
which expands to a non-zero, positive integer constant expression that is the minimum number of files that the implementation guarantees can be open simultaneously;

FILENAME_MAX
which expands to a non-zero, positive integer constant expression that is the size needed for an array of char large enough to hold the longest file name string that the implementation guarantees can be opened;


Technical Corrigendum


Previous Defect Report < - > Next Defect Report