Tue Apr 23 15:56:56 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>

* config.h.in (HAVE_REGEX): New macro.

	* sysdeps/unix/syscalls.list: Add statfs, fstatfs.
	* io/Makefile (headers): Add sys/statfs.h, statfsbuf.h.
	(routines): Add statfs, fstatfs.
	* sysdeps/mach/hurd/statfs.c: New file.
	* sysdeps/mach/hurd/fstatfs.c: New file.
	* sysdeps/stub/fstatfs.c: New file.
	* sysdeps/stub/statfs.c: New file.
	* io/sys/statfs.h: New file.
	* sysdeps/generic/statfsbuf.h: New file.
	* sysdeps/unix/sysv/linux/statfsbuf.h: New file.

Tue Apr 23 00:06:47 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* malloc/Makefile (gmalloc-routines): Add valloc back here.
	(dist-routines): Remove it here.
	* malloc/valloc.c [_MALLOC_INTERNAL && GMALLOC_INHIBIT_VALLOC]
	(ELIDE_VALLOC): Define it.
	[! ELIDE_VALLOC]: Make whole file conditional on this.
	* malloc/malloc.h (valloc): Make decl conditional on
	[!GMALLOC_INHIBIT_VALLOC] instead of [!emacs].

Mon Apr 22 00:02:19 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* MakeTAGS: Include version.mk.
	(po/SYS_libc.pot): Add missing / in sed s cmd.
This commit is contained in:
Roland McGrath 1996-04-24 00:58:47 +00:00
parent b0d20a87b5
commit 9a8c0d4f41
13 changed files with 1042 additions and 459 deletions

View File

@ -1,3 +1,33 @@
Tue Apr 23 15:56:56 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* config.h.in (HAVE_REGEX): New macro.
* sysdeps/unix/syscalls.list: Add statfs, fstatfs.
* io/Makefile (headers): Add sys/statfs.h, statfsbuf.h.
(routines): Add statfs, fstatfs.
* sysdeps/mach/hurd/statfs.c: New file.
* sysdeps/mach/hurd/fstatfs.c: New file.
* sysdeps/stub/fstatfs.c: New file.
* sysdeps/stub/statfs.c: New file.
* io/sys/statfs.h: New file.
* sysdeps/generic/statfsbuf.h: New file.
* sysdeps/unix/sysv/linux/statfsbuf.h: New file.
Tue Apr 23 00:06:47 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* malloc/Makefile (gmalloc-routines): Add valloc back here.
(dist-routines): Remove it here.
* malloc/valloc.c [_MALLOC_INTERNAL && GMALLOC_INHIBIT_VALLOC]
(ELIDE_VALLOC): Define it.
[! ELIDE_VALLOC]: Make whole file conditional on this.
* malloc/malloc.h (valloc): Make decl conditional on
[!GMALLOC_INHIBIT_VALLOC] instead of [!emacs].
Mon Apr 22 00:02:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* MakeTAGS: Include version.mk.
(po/SYS_libc.pot): Add missing / in sed s cmd.
Sat Apr 20 18:13:00 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Makerules (no-whole-archive): Test $(have-no-whole-archive), not

View File

@ -162,10 +162,13 @@ $P/subdirs.pot: $(subdirs:%=$P/%.pot)
do sed "s%^#: %&$$d/%" $P/$$d.pot; done) > $@.new
mv -f $@.new $@
# Get $(version) defined.
include $(common-objpfx)version.mk
# Combine all the messages into the final sorted template translation file.
$P/SYS_libc.pot: $(all-pot)
@rm -f $@.new
sed -e 's/VERSION/$(version)/' -e "s/DATE/`date +'%Y-%m-%d %k:%M'`" \
sed -e 's/VERSION/$(version)/' -e "s/DATE/`date +'%Y-%m-%d %k:%M'`/" \
po/header.pot > $@.new
$(XGETTEXT) -d - -n -s --omit-header $^ >> $@.new
mv -f $@.new $@

View File

@ -71,4 +71,8 @@
#define HAVE_STRERROR 1
/* The locale code needs these definitions. */
#define HAVE_REGEX 1
#endif

View File

@ -21,7 +21,7 @@
#
subdir := io
headers := sys/stat.h statbuf.h \
headers := sys/stat.h statbuf.h sys/statfs.h statfsbuf.h \
fcntl.h sys/fcntl.h fcntlbits.h \
poll.h sys/poll.h \
utime.h ftw.h fts.h
@ -31,6 +31,7 @@ routines := \
mkfifo \
stat fstat lstat mknod \
xstat fxstat lxstat xmknod \
statfs fstatfs \
umask chmod fchmod mkdir \
open close read write lseek access euidaccess \
fcntl flock lockf \

41
io/sys/statfs.h Normal file
View File

@ -0,0 +1,41 @@
/* Definitions for getting information about a filesystem.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SYS_STATFS_H
#define _SYS_STATFS_H 1
#include <features.h>
/* Get the system-specific definition of `struct statfs'. */
#include <statfsbuf.h>
__BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */
extern int __statfs __P ((__const char *__file, struct statfs *__buf));
extern int statfs __P ((__const char *__file, struct statfs *__buf));
/* Return information about the filesystem containing the file FILDES
refers to. */
extern int __fstatfs __P ((int __fildes, struct statfs *__buf));
extern int fstatfs __P ((int __fildes, struct statfs *__buf));
__END_DECLS
#endif /* sys/statfs.h */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
/* Definition of `struct statfs', information about a filesystem.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _STATFSBUF_H
#define _STATFSBUF_H 1
#include <gnu/types.h>
/* GNU Hurd NOTE: The size of this structure (16 ints) is known in
<hurd/hurd_types.defs>, since it is used in the `file_statfs' RPC. MiG
does not cope at all well with the passed C structure not being of the
expected size. There are some filler words at the end to allow for
future expansion. To increase the size of the structure used in the RPC
and retain binary compatibility, we would need to assign a new message
number. */
struct statfs
{
unsigned int f_type;
unsigned int f_bsize;
unsigned int f_blocks;
unsigned int f_bfree;
unsigned int f_bavail;
unsigned int f_files;
unsigned int f_ffree;
__fsid_t f_fsid;
unsigned int f_namelen;
unsigned int f_spare[6];
};
#endif /* statfsbuf.h */

View File

@ -0,0 +1,38 @@
/* fstatfs -- Return information about the filesystem on which FD resides.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <hurd.h>
#include <hurd/fd.h>
#include <sys/statfs.h>
#include <stddef.h>
/* Return information about the filesystem on which FD resides. */
int
__fstatfs (int fd, struct statfs *buf)
{
error_t err;
if (err = HURD_DPORT_USE (fd, __file_statfs (port, buf)))
return __hurd_dfail (fd, err);
return 0;
}
weak_alias (__fstatfs, fstatfs)

View File

@ -0,0 +1,42 @@
/* statfs -- Return information about the filesystem on which FILE resides.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <hurd.h>
#include <sys/statfs.h>
#include <stddef.h>
/* Return information about the filesystem on which FILE resides. */
int
__statfs (const char *file, struct statfs *buf)
{
error_t err;
file_t port;
port = __file_name_lookup (file, 0, 0);
if (port == MACH_PORT_NULL)
return -1;
err = __file_statfs (port, buf);
__mach_port_deallocate (__mach_task_self (), port);
if (err)
return __hurd_fail (err);
return 0;
}
weak_alias (__statfs, statfs)

34
sysdeps/stub/fstatfs.c Normal file
View File

@ -0,0 +1,34 @@
/* fstatfs -- Return information about the filesystem on which FD resides.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <errno.h>
#include <sys/statfs.h>
#include <stddef.h>
/* Return information about the filesystem on which FD resides. */
int
__fstatfs (int fd, struct statfs *buf)
{
errno = ENOSYS;
return -1;
}
stub_warning (statfs)
weak_alias (__fstatfs, fstatfs)

34
sysdeps/stub/statfs.c Normal file
View File

@ -0,0 +1,34 @@
/* statfs -- Return information about the filesystem on which FILE resides.
Copyright (C) 1996 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <errno.h>
#include <sys/statfs.h>
#include <stddef.h>
/* Return information about the filesystem on which FILE resides. */
int
__statfs (const char *file, struct statfs *buf)
{
errno = ENOSYS;
return -1;
}
stub_warning (statfs)
weak_alias (__statfs, statfs)

View File

@ -54,6 +54,8 @@ sync - sync 0 sync
sys_fstat fxstat fstat 2 __syscall_fstat
sys_mknod xmknod mknod 3 __syscall_mknod
sys_stat xstat stat 2 __syscall_stat
statfs - statfs 2 __statfs statfs
fstatfs - fstatfs 2 __fstatfs fstatfs
umask - umask 1 __umask umask
uname - uname 1 uname
unlink - unlink 1 __unlink unlink

View File

@ -0,0 +1 @@
#include <asm/statfs.h>