]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/mach/hurd/dirstream.h: Define `struct __dirstream'
authorRoland McGrath <roland@gnu.org>
Mon, 28 Aug 1995 09:00:05 +0000 (09:00 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 28 Aug 1995 09:00:05 +0000 (09:00 +0000)
instead of `DIR'.
* sysdeps/unix/bsd/dirstream.h: Likewise.
* sysdeps/stub/dirstream.h: Likewise.
* sysdeps/unix/dirstream.h: Likewise.
* sysdeps/mach/hurd/telldir.c: Include "dirstream.h".
* sysdeps/mach/hurd/seekdir.c: Likewise.
* sysdeps/mach/hurd/opendir.c: Likewise.
* sysdeps/mach/hurd/closedir.c: Likewise.
* sysdeps/mach/hurd/readdir.c: Likewise.
* sysdeps/unix/telldir.c: Likewise.
* sysdeps/unix/seekdir.c: Likewise.
* sysdeps/unix/rewinddir.c: Likewise.
* sysdeps/unix/readdir.c: Likewise.
* sysdeps/unix/opendir.c: Likewise.
* sysdeps/unix/closedir.c: Likewise.
* sysdeps/unix/bsd/telldir.c: Likewise.
* sysdeps/unix/bsd/readdir.c: Likewise.
* dirent/Makefile (headers): Remove dirstream.h.
(distribute): Put it here instead.

19 files changed:
ChangeLog
dirent/Makefile
sysdeps/mach/hurd/closedir.c
sysdeps/mach/hurd/dirstream.h
sysdeps/mach/hurd/opendir.c
sysdeps/mach/hurd/readdir.c
sysdeps/mach/hurd/seekdir.c
sysdeps/mach/hurd/telldir.c
sysdeps/stub/dirstream.h
sysdeps/unix/bsd/dirstream.h
sysdeps/unix/bsd/readdir.c
sysdeps/unix/bsd/telldir.c
sysdeps/unix/closedir.c
sysdeps/unix/dirstream.h
sysdeps/unix/opendir.c
sysdeps/unix/readdir.c
sysdeps/unix/rewinddir.c
sysdeps/unix/seekdir.c
sysdeps/unix/telldir.c

index 036a1219c3a4e3aa5fe97bc0311b22f37560a8f1..be40e78b986b0db69900f01cf43e0e252c3d6db0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 Fri Aug 25 12:12:42 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
+       * sysdeps/mach/hurd/dirstream.h: Define `struct __dirstream'
+       instead of `DIR'.
+       * sysdeps/unix/bsd/dirstream.h: Likewise.
+       * sysdeps/stub/dirstream.h: Likewise.
+       * sysdeps/unix/dirstream.h: Likewise.
+       * sysdeps/mach/hurd/telldir.c: Include "dirstream.h".
+       * sysdeps/mach/hurd/seekdir.c: Likewise.
+       * sysdeps/mach/hurd/opendir.c: Likewise.
+       * sysdeps/mach/hurd/closedir.c: Likewise.
+       * sysdeps/mach/hurd/readdir.c: Likewise.
+       * sysdeps/unix/telldir.c: Likewise.
+       * sysdeps/unix/seekdir.c: Likewise.
+       * sysdeps/unix/rewinddir.c: Likewise.
+       * sysdeps/unix/readdir.c: Likewise.
+       * sysdeps/unix/opendir.c: Likewise.
+       * sysdeps/unix/closedir.c: Likewise.
+       * sysdeps/unix/bsd/telldir.c: Likewise.
+       * sysdeps/unix/bsd/readdir.c: Likewise.
+       * dirent/Makefile (headers): Remove dirstream.h.
+       (distribute): Put it here instead.
+
        * sysdeps/mach/hurd/mmap.c: Fix inverted test of MAP_FIXED.
 
        * stdio/vfscanf.c (number): Allow field width to inhibit first
index 02352768d00a0f6db319d7cae9520d1f6917c63d..532020d1eb8beb56ae6bdd6c2c86037b29fdba58 100644 (file)
 #
 subdir         := dirent
 
-headers                := dirent.h dirstream.h
+headers                := dirent.h
 routines       := opendir closedir readdir rewinddir \
                   seekdir telldir scandir alphasort \
                   getdents dirfd
-distribute := direct.h
+distribute := direct.h dirstream.h
 
 tests     := list tst-seekdir
 
index 6ac86a6cd4f74e1403ce4c96c9b67cccf0132e6e..521787d02db26867b03345f438d0db22744db024 100644 (file)
@@ -24,6 +24,7 @@ Cambridge, MA 02139, USA.  */
 #include <unistd.h>
 #include <hurd.h>
 #include <hurd/fd.h>
+#include "dirstream.h"
 
 /* Close the directory stream DIRP.
    Return 0 if successful, -1 if not.  */
index 42bbd07c4f7031298fe634ec4f9930391ddf2120..a8c5fd12cbc5c6857a115287b3904ba28e98b314 100644 (file)
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA.  */
    The Hurd directory format is the same as `struct dirent', so `readdir'
    returns a pointer into the buffer we read directory data into.  */
 
-typedef struct
+struct __dirstream
   {
     void *__fd;                        /* `struct hurd_fd' pointer for descriptor.  */
     char *__data;              /* Directory block.  */
@@ -34,6 +34,6 @@ typedef struct
     int __entry_ptr;           /* Entry number `__ptr' corresponds to.  */
     unsigned long int __allocation; /* Space allocated for the block.  */
     unsigned long int __size;  /* Total valid data in the block.  */
-  } DIR;
+  };
 
 #endif /* dirstream.h */
index 40cb9d0dc09a92cfcb74910e66db16376c709893..8ab964a11da41843a1fdc7b8307d5fe521895b82 100644 (file)
@@ -29,6 +29,7 @@ Cambridge, MA 02139, USA.  */
 #include <stdio.h>
 #include <hurd.h>
 #include <hurd/fd.h>
+#include "dirstream.h"
 
 
 /* Open a directory stream on NAME.  */
index 746b11e523468834c7b25403c5a9b25ac7b91f06..3c17d248e16175511d7e94515785a74d0435db17 100644 (file)
@@ -26,6 +26,7 @@ Cambridge, MA 02139, USA.  */
 #include <sys/types.h>
 #include <hurd.h>
 #include <hurd/fd.h>
+#include "dirstream.h"
 
 
 /* Read a directory entry from DIRP.  */
index 9f585eba633fae97e6bb888941ab6fd5916a97a2..fa4f1f4f52306475eee8ce3f43c5a86d6bc559ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 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
@@ -21,6 +21,7 @@ Cambridge, MA 02139, USA.  */
 #include <stddef.h>
 #include <dirent.h>
 #include <unistd.h>
+#include "dirstream.h"
 
 /* Seek to position POS in DIRP.  */
 void
index 7ce8d1f061a5284c43a44cdf123e7e27b584e5bd..ccde257a2352c66234b1079d5d364b2b3f3e44f5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 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
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA.  */
 #include <dirent.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "dirstream.h"
 
 /* Return the current position of DIRP.  */
 off_t
index 9a3d5a0f05e09953af215b623c269a6b003dce7e..7d8bb9697f6b9e03b71de27f71c8cc0f7d838da5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 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
@@ -21,10 +21,10 @@ Cambridge, MA 02139, USA.  */
 #define        _DIRSTREAM_H    1
 
 
-/* This file should define a typedef `DIR', the data type of directory
-   stream objects returned by `opendir'.  */
+/* This file should define a type `struct __dirstream', the data type of
+   directory stream objects returned by `opendir'.  */
 
-#error "No system-dependent definition of `DIR'."
+#error "No system-dependent definition of `struct __dirstream'."
 
 
 #endif /* dirstream.h */
index f3bf9ca894d1e59e8df018407e952b0de0a75d5f..d46c59ec585bba3f3e5a57dd5787576a46fc01fe 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 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
@@ -29,7 +29,7 @@ Cambridge, MA 02139, USA.  */
    The BSD directory format is the same as `struct dirent', so `readdir'
    returns a pointer into the buffer we read directory data into.  */
 
-typedef struct
+struct __dirstream
   {
     int __fd;                  /* File descriptor.  */
 
@@ -38,11 +38,6 @@ typedef struct
     size_t __offset;           /* Current offset into the block.  */
     size_t __size;             /* Total valid data in the block.  */
     __off_t __pos;             /* Position in directory of this block.  */
-  } DIR;
-
-#ifdef __USE_BSD
-/* Macro to return the file descriptor used for an open directory.  */
-#define dirfd(DIR)     ((DIR)->__fd)
-#endif
+  };
 
 #endif /* dirstream.h */
index e86a94dd52c3cc365b3a7d995eb68736fa765527..e3d020cd46affb54603247dc64527eaf18928bf0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA.  */
 #include <unistd.h>
 #include <sys/types.h>
 #include "direct.h"
-
+#include "dirstream.h"
 
 /* Read a directory entry from DIRP.  */
 struct dirent *
index 0321f954b8daddf2a495534407b14011f0ceac1d..dbab289a37fbe8fc440d67bdbe9092146535a55e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 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
@@ -23,6 +23,7 @@ Cambridge, MA 02139, USA.  */
 #include <unistd.h>
 #include <sys/types.h>
 #include <stdlib.h>
+#include "dirstream.h"
 
 /* Internal data structure for telldir and seekdir.  */
 struct record
index e01dccb54cc9c7a3bd1324ac565e9ce45ffd3b9d..5f1ac7439a13c9d5b2602686ff93e1f4cd6551ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995 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
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA.  */
 #include <stdlib.h>
 #include <dirent.h>
 #include <unistd.h>
+#include "dirstream.h"
 
 /* Close the directory stream DIRP.
    Return 0 if successful, -1 if not.  */
index d8c23959ad1d4ae3ff1b8196529a5b031c923f6d..72fd67c7229f07facfc064bbd63cba379293be89 100644 (file)
@@ -28,7 +28,7 @@ Cambridge, MA 02139, USA.  */
    The miscellaneous Unix `readdir' implementations read directory data
    into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
 
-typedef struct
+struct __dirstream
   {
     int __fd;                  /* File descriptor.  */
 
@@ -38,7 +38,7 @@ typedef struct
     size_t __size;             /* Total valid data in the block.  */
 
     struct dirent __entry;     /* Returned by `readdir'.  */
-  } DIR;
+  };
 
 #define _DIR_dirfd(dirp)       ((dirp)->__fd)
 
index d03f45e6af7e5812130492e5e373e04adabc53f0..5cd620676ad04f9a7e1e2b907669c1e84c525aa6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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
@@ -29,6 +29,7 @@ Cambridge, MA 02139, USA.  */
 #include <stdio.h>
 
 #include "direct.h"            /* This file defines `struct direct'.  */
+#include "dirstream.h"
 
 /* Open a directory stream on NAME.  */
 DIR *
index 3ffa63e9f61ea646c0b7936ad867af48f287d6e3..1842948a35841933e61abbc0e92b3e6bcfedc327 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 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
@@ -26,6 +26,7 @@ Cambridge, MA 02139, USA.  */
 #include <sys/types.h>
 
 #include "direct.h"            /* This file defines `struct direct'.  */
+#include "dirstream.h"
 
 /* direct.h may have an alternate definition for this.  */
 #ifndef D_RECLEN
index 3b82895e60ce57abdf14512bf9d9badda06f0970..7ad7bc11a3f642f905787e216c183726f810a9f1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995 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
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA.  */
 #include <dirent.h>
 #include <sys/types.h>
 #include <unistd.h>
-
+#include "dirstream.h"
 
 /* Rewind DIRP to the beginning of the directory.  */
 void
index b8d5c3c2ff6dab376bfa6e21b796c16ac9d799b7..b0a6f5e9d77947914311efb2b058f42c5120dd88 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995 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
@@ -21,6 +21,7 @@ Cambridge, MA 02139, USA.  */
 #include <stddef.h>
 #include <dirent.h>
 #include <unistd.h>
+#include "dirstream.h"
 
 /* Seek to position POS in DIRP.  */
 void
index c473bbc29df875cc6333d892d56669d7d8a7f1c0..5dbf1ca3c1d4fde4d80e12b3a18dad7a65b24386 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995 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
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA.  */
 #include <dirent.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "dirstream.h"
 
 /* Return the current position of DIRP.  */
 off_t