Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-11-19 23:56:22 +0300
committerJeff Johnston <jjohnstn@redhat.com>2008-11-19 23:56:22 +0300
commit8ee939ea9f395f95357612d64d9be8e9a6529e46 (patch)
tree69f67c24be31e64b3973adbbacef499e6f753299 /newlib/libc/sys
parente231c7dae90002f4aa9a6e8bdb445a0bd6c392ae (diff)
2008-11-19 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/bits/dirent.h: New header file. * libc/sys/linux/sys/dirent.h: Include <bits/dirent.h> instead of <linux/dirent.h>. * 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.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/linux/bits/dirent.h53
-rw-r--r--newlib/libc/sys/linux/sys/dirent.h2
2 files changed, 54 insertions, 1 deletions
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 <bits/dirent.h> directly; include <dirent.h> 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 <sys/types.h>
-#include <linux/dirent.h>
+#include <bits/dirent.h>
#define _LIBC 1
#define NOT_IN_libc 1
#include <sys/lock.h>