mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 10:50:08 +00:00
Fix standalone stdio.h inclusion.
This commit is contained in:
parent
6651fa1216
commit
cd2f000c07
@ -1,5 +1,12 @@
|
|||||||
|
2010-01-10 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #11125]
|
||||||
|
* libio/stdio.h: Define va_list, off_t, and ssize_t.
|
||||||
|
|
||||||
2010-01-09 Ulrich Drepper <drepper@redhat.com>
|
2010-01-09 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libio/stdio.h: Define va_list also for XPG7.
|
||||||
|
|
||||||
* conform/conformtest.pl: Update for XPG7 and some bug fixes.
|
* conform/conformtest.pl: Update for XPG7 and some bug fixes.
|
||||||
* conform/data/ctype.h-data: Likewise.
|
* conform/data/ctype.h-data: Likewise.
|
||||||
* conform/data/dirent.h-data: Likewise.
|
* conform/data/dirent.h-data: Likewise.
|
||||||
|
@ -56,14 +56,17 @@ $CFLAGS{"POSIX2008"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_POSIX_C_SOURCE
|
|||||||
# These are symbols which are known to pollute the namespace.
|
# These are symbols which are known to pollute the namespace.
|
||||||
@knownproblems = ('unix', 'linux', 'i386');
|
@knownproblems = ('unix', 'linux', 'i386');
|
||||||
|
|
||||||
# Some headers need a bit more attention.
|
if ($dialect ne "XOPEN2K8" && $dialect ne "POSIX2008") {
|
||||||
$mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
|
# Some headers need a bit more attention. At least with XPG7
|
||||||
$mustprepend{'regex.h'} = "#include <sys/types.h>\n";
|
# all headers should be self-contained.
|
||||||
$mustprepend{'sched.h'} = "#include <sys/types.h>\n";
|
$mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
|
||||||
$mustprepend{'signal.h'} = "#include <pthread.h>\n";
|
$mustprepend{'regex.h'} = "#include <sys/types.h>\n";
|
||||||
$mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
|
$mustprepend{'sched.h'} = "#include <sys/types.h>\n";
|
||||||
$mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
|
$mustprepend{'signal.h'} = "#include <pthread.h>\n";
|
||||||
$mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
|
$mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
|
||||||
|
$mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
|
||||||
|
$mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
|
||||||
|
}
|
||||||
|
|
||||||
# Make a hash table from this information.
|
# Make a hash table from this information.
|
||||||
while ($#keywords >= 0) {
|
while ($#keywords >= 0) {
|
||||||
|
@ -36,11 +36,14 @@ type va_list
|
|||||||
type size_t
|
type size_t
|
||||||
#if defined XOPEN2K8 || defined POSIX2008
|
#if defined XOPEN2K8 || defined POSIX2008
|
||||||
type off_t
|
type off_t
|
||||||
|
type ssize_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
function void clearerr (FILE*)
|
function void clearerr (FILE*)
|
||||||
function {char*} ctermid (char*)
|
function {char*} ctermid (char*)
|
||||||
|
#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
|
||||||
function {char*} cuserid (char*)
|
function {char*} cuserid (char*)
|
||||||
|
#endif
|
||||||
#if defined XOPEN2K8 || defined POSIX2008
|
#if defined XOPEN2K8 || defined POSIX2008
|
||||||
function int dprintf (int, const char*, ...)
|
function int dprintf (int, const char*, ...)
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Define ISO C stdio on top of C++ iostreams.
|
/* Define ISO C stdio on top of C++ iostreams.
|
||||||
Copyright (C) 1991, 1994-2007, 2008, 2009 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1994-2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -74,7 +74,7 @@ typedef struct _IO_FILE __FILE;
|
|||||||
|
|
||||||
#include <libio.h>
|
#include <libio.h>
|
||||||
|
|
||||||
#ifdef __USE_XOPEN
|
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
# ifndef _VA_LIST_DEFINED
|
# ifndef _VA_LIST_DEFINED
|
||||||
typedef _G_va_list va_list;
|
typedef _G_va_list va_list;
|
||||||
@ -85,6 +85,26 @@ typedef _G_va_list va_list;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __USE_XOPEN2K8
|
||||||
|
# ifndef __off_t_defined
|
||||||
|
# ifndef __USE_FILE_OFFSET64
|
||||||
|
typedef __off_t off_t;
|
||||||
|
# else
|
||||||
|
typedef __off64_t off_t;
|
||||||
|
# endif
|
||||||
|
# define __off_t_defined
|
||||||
|
# endif
|
||||||
|
# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
|
||||||
|
typedef __off64_t off64_t;
|
||||||
|
# define __off64_t_defined
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifndef __ssize_t_defined
|
||||||
|
typedef __ssize_t ssize_t;
|
||||||
|
# define __ssize_t_defined
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The type of the second argument to `fgetpos' and `fsetpos'. */
|
/* The type of the second argument to `fgetpos' and `fsetpos'. */
|
||||||
__BEGIN_NAMESPACE_STD
|
__BEGIN_NAMESPACE_STD
|
||||||
#ifndef __USE_FILE_OFFSET64
|
#ifndef __USE_FILE_OFFSET64
|
||||||
|
Loading…
Reference in New Issue
Block a user