From 8ee939ea9f395f95357612d64d9be8e9a6529e46 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 19 Nov 2008 20:56:22 +0000 Subject: 2008-11-19 Jeff Johnston * libc/sys/linux/bits/dirent.h: New header file. * libc/sys/linux/sys/dirent.h: Include instead of . * libc/posix/Makefile.am: Remove reallocf. * libc/posix/Makefile.in: Regenerated. * libc/posix/reallocf.c: Moved to... * libc/stdlib/reallocf.c: Here * libc/stdlib/malloc.c: Add reallocf documentation. * libc/include/stdlib.h: Add reallocf and _reallocf_r prototypes. * libc/stdlib/Makefile.am: Add reallocf. * libc/stdlib/Makefile.in: Regenerated. * libc/posix/_isatty.c: Set errno. --- newlib/libc/sys/linux/bits/dirent.h | 53 +++++++++++++++++++++++++++++++++++++ newlib/libc/sys/linux/sys/dirent.h | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 newlib/libc/sys/linux/bits/dirent.h (limited to 'newlib/libc/sys') diff --git a/newlib/libc/sys/linux/bits/dirent.h b/newlib/libc/sys/linux/bits/dirent.h new file mode 100644 index 000000000..e6eb17a41 --- /dev/null +++ b/newlib/libc/sys/linux/bits/dirent.h @@ -0,0 +1,53 @@ +/* Copyright (C) 1996, 1997 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_DIRENT_H +# error "Never use directly; include instead." +#endif + +struct dirent + { +#ifndef __USE_FILE_OFFSET64 + __ino_t d_ino; + __off_t d_off; +#else + __ino64_t d_ino; + __off64_t d_off; +#endif + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; + +#ifdef __USE_LARGEFILE64 +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; /* We must not include limits.h! */ + }; +#endif + +#define d_fileno d_ino /* Backwards compatibility. */ + +#undef _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF +#define _DIRENT_HAVE_D_TYPE diff --git a/newlib/libc/sys/linux/sys/dirent.h b/newlib/libc/sys/linux/sys/dirent.h index 4bbae4229..58d774594 100644 --- a/newlib/libc/sys/linux/sys/dirent.h +++ b/newlib/libc/sys/linux/sys/dirent.h @@ -7,7 +7,7 @@ #define _SYS_DIRENT_H #include -#include +#include #define _LIBC 1 #define NOT_IN_libc 1 #include -- cgit v1.2.3