This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11125] New: <stdio.h> is incomplete for POSIX 2008


POSIX 2008 requires that <stdio.h> expose ssize_t, va_list, and getline (among
others) if _POSIX_C_SOURCE is 200809L or greater.  However, this valid POSIX
2008 program fails to compile with glibc:

$ cat file.c
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
int main ()
{
  ssize_t s;
  va_list v;
  char *p = NULL;
  size_t s1 = 0;
  return getline (&p, &s1, stdin);
}
$ gcc -o file -Wall file.c
file.c: In function 'main':
file.c:5: error: 'ssize_t' undeclared (first use in this function)
file.c:5: error: (Each undeclared identifier is reported only once
file.c:5: error: for each function it appears in.)
file.c:5: error: expected ';' before 's'
file.c:6: error: 'va_list' undeclared (first use in this function)
file.c:6: error: expected ';' before 'v'
file.c:9: warning: implicit declaration of function 'getline'
$

-- 
           Summary: <stdio.h> is incomplete for POSIX 2008
           Product: glibc
           Version: 2.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: ebb9 at byu dot net
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11125

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]