mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* 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.
This commit is contained in:
21
ChangeLog
21
ChangeLog
@ -1,5 +1,26 @@
|
|||||||
Fri Aug 25 12:12:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
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.
|
* sysdeps/mach/hurd/mmap.c: Fix inverted test of MAP_FIXED.
|
||||||
|
|
||||||
* stdio/vfscanf.c (number): Allow field width to inhibit first
|
* stdio/vfscanf.c (number): Allow field width to inhibit first
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
#
|
#
|
||||||
subdir := dirent
|
subdir := dirent
|
||||||
|
|
||||||
headers := dirent.h dirstream.h
|
headers := dirent.h
|
||||||
routines := opendir closedir readdir rewinddir \
|
routines := opendir closedir readdir rewinddir \
|
||||||
seekdir telldir scandir alphasort \
|
seekdir telldir scandir alphasort \
|
||||||
getdents dirfd
|
getdents dirfd
|
||||||
distribute := direct.h
|
distribute := direct.h dirstream.h
|
||||||
|
|
||||||
tests := list tst-seekdir
|
tests := list tst-seekdir
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
#include <hurd/fd.h>
|
#include <hurd/fd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Close the directory stream DIRP.
|
/* Close the directory stream DIRP.
|
||||||
Return 0 if successful, -1 if not. */
|
Return 0 if successful, -1 if not. */
|
||||||
|
@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
The Hurd directory format is the same as `struct dirent', so `readdir'
|
The Hurd directory format is the same as `struct dirent', so `readdir'
|
||||||
returns a pointer into the buffer we read directory data into. */
|
returns a pointer into the buffer we read directory data into. */
|
||||||
|
|
||||||
typedef struct
|
struct __dirstream
|
||||||
{
|
{
|
||||||
void *__fd; /* `struct hurd_fd' pointer for descriptor. */
|
void *__fd; /* `struct hurd_fd' pointer for descriptor. */
|
||||||
char *__data; /* Directory block. */
|
char *__data; /* Directory block. */
|
||||||
@ -34,6 +34,6 @@ typedef struct
|
|||||||
int __entry_ptr; /* Entry number `__ptr' corresponds to. */
|
int __entry_ptr; /* Entry number `__ptr' corresponds to. */
|
||||||
unsigned long int __allocation; /* Space allocated for the block. */
|
unsigned long int __allocation; /* Space allocated for the block. */
|
||||||
unsigned long int __size; /* Total valid data in the block. */
|
unsigned long int __size; /* Total valid data in the block. */
|
||||||
} DIR;
|
};
|
||||||
|
|
||||||
#endif /* dirstream.h */
|
#endif /* dirstream.h */
|
||||||
|
@ -29,6 +29,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
#include <hurd/fd.h>
|
#include <hurd/fd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
|
|
||||||
/* Open a directory stream on NAME. */
|
/* Open a directory stream on NAME. */
|
||||||
|
@ -26,6 +26,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <hurd.h>
|
#include <hurd.h>
|
||||||
#include <hurd/fd.h>
|
#include <hurd/fd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
|
|
||||||
/* Read a directory entry from DIRP. */
|
/* Read a directory entry from DIRP. */
|
||||||
|
@ -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.
|
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
|
||||||
@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Seek to position POS in DIRP. */
|
/* Seek to position POS in DIRP. */
|
||||||
void
|
void
|
||||||
|
@ -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.
|
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
|
||||||
@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Return the current position of DIRP. */
|
/* Return the current position of DIRP. */
|
||||||
off_t
|
off_t
|
||||||
|
@ -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.
|
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
|
||||||
@ -21,10 +21,10 @@ Cambridge, MA 02139, USA. */
|
|||||||
#define _DIRSTREAM_H 1
|
#define _DIRSTREAM_H 1
|
||||||
|
|
||||||
|
|
||||||
/* This file should define a typedef `DIR', the data type of directory
|
/* This file should define a type `struct __dirstream', the data type of
|
||||||
stream objects returned by `opendir'. */
|
directory stream objects returned by `opendir'. */
|
||||||
|
|
||||||
#error "No system-dependent definition of `DIR'."
|
#error "No system-dependent definition of `struct __dirstream'."
|
||||||
|
|
||||||
|
|
||||||
#endif /* dirstream.h */
|
#endif /* dirstream.h */
|
||||||
|
@ -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.
|
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
|
||||||
@ -29,7 +29,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
The BSD directory format is the same as `struct dirent', so `readdir'
|
The BSD directory format is the same as `struct dirent', so `readdir'
|
||||||
returns a pointer into the buffer we read directory data into. */
|
returns a pointer into the buffer we read directory data into. */
|
||||||
|
|
||||||
typedef struct
|
struct __dirstream
|
||||||
{
|
{
|
||||||
int __fd; /* File descriptor. */
|
int __fd; /* File descriptor. */
|
||||||
|
|
||||||
@ -38,11 +38,6 @@ typedef struct
|
|||||||
size_t __offset; /* Current offset into the block. */
|
size_t __offset; /* Current offset into the block. */
|
||||||
size_t __size; /* Total valid data in the block. */
|
size_t __size; /* Total valid data in the block. */
|
||||||
__off_t __pos; /* Position in directory of this 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 */
|
#endif /* dirstream.h */
|
||||||
|
@ -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.
|
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
|
||||||
@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "direct.h"
|
#include "direct.h"
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Read a directory entry from DIRP. */
|
/* Read a directory entry from DIRP. */
|
||||||
struct dirent *
|
struct dirent *
|
||||||
|
@ -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.
|
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
|
||||||
@ -23,6 +23,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Internal data structure for telldir and seekdir. */
|
/* Internal data structure for telldir and seekdir. */
|
||||||
struct record
|
struct record
|
||||||
|
@ -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.
|
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
|
||||||
@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Close the directory stream DIRP.
|
/* Close the directory stream DIRP.
|
||||||
Return 0 if successful, -1 if not. */
|
Return 0 if successful, -1 if not. */
|
||||||
|
@ -28,7 +28,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
The miscellaneous Unix `readdir' implementations read directory data
|
The miscellaneous Unix `readdir' implementations read directory data
|
||||||
into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
|
into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
|
||||||
|
|
||||||
typedef struct
|
struct __dirstream
|
||||||
{
|
{
|
||||||
int __fd; /* File descriptor. */
|
int __fd; /* File descriptor. */
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ typedef struct
|
|||||||
size_t __size; /* Total valid data in the block. */
|
size_t __size; /* Total valid data in the block. */
|
||||||
|
|
||||||
struct dirent __entry; /* Returned by `readdir'. */
|
struct dirent __entry; /* Returned by `readdir'. */
|
||||||
} DIR;
|
};
|
||||||
|
|
||||||
#define _DIR_dirfd(dirp) ((dirp)->__fd)
|
#define _DIR_dirfd(dirp) ((dirp)->__fd)
|
||||||
|
|
||||||
|
@ -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.
|
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
|
||||||
@ -29,6 +29,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "direct.h" /* This file defines `struct direct'. */
|
#include "direct.h" /* This file defines `struct direct'. */
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Open a directory stream on NAME. */
|
/* Open a directory stream on NAME. */
|
||||||
DIR *
|
DIR *
|
||||||
|
@ -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.
|
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
|
||||||
@ -26,6 +26,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "direct.h" /* This file defines `struct direct'. */
|
#include "direct.h" /* This file defines `struct direct'. */
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* direct.h may have an alternate definition for this. */
|
/* direct.h may have an alternate definition for this. */
|
||||||
#ifndef D_RECLEN
|
#ifndef D_RECLEN
|
||||||
|
@ -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.
|
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
|
||||||
@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Rewind DIRP to the beginning of the directory. */
|
/* Rewind DIRP to the beginning of the directory. */
|
||||||
void
|
void
|
||||||
|
@ -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.
|
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
|
||||||
@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Seek to position POS in DIRP. */
|
/* Seek to position POS in DIRP. */
|
||||||
void
|
void
|
||||||
|
@ -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.
|
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
|
||||||
@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include "dirstream.h"
|
||||||
|
|
||||||
/* Return the current position of DIRP. */
|
/* Return the current position of DIRP. */
|
||||||
off_t
|
off_t
|
||||||
|
Reference in New Issue
Block a user