From cd2f000c074b07931bd78ab5ff5fa3c0f7db628a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Jan 2010 00:39:22 -0800 Subject: Fix standalone stdio.h inclusion. --- libio/stdio.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'libio') diff --git a/libio/stdio.h b/libio/stdio.h index d7d241c..85542b1 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -1,5 +1,5 @@ /* 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. The GNU C Library is free software; you can redistribute it and/or @@ -74,7 +74,7 @@ typedef struct _IO_FILE __FILE; #include -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_XOPEN2K8 # ifdef __GNUC__ # ifndef _VA_LIST_DEFINED typedef _G_va_list va_list; @@ -85,6 +85,26 @@ typedef _G_va_list va_list; # 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'. */ __BEGIN_NAMESPACE_STD #ifndef __USE_FILE_OFFSET64 -- cgit v1.1