This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-28-g5d2556c
- From: sthibaul at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Feb 2015 20:57:19 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-28-g5d2556c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 5d2556c4fa4629b1c3adf59f29c699f00d4122ea (commit)
from e2049d17a0fe36e07cbd944504fa6c8fe68832bf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d2556c4fa4629b1c3adf59f29c699f00d4122ea
commit 5d2556c4fa4629b1c3adf59f29c699f00d4122ea
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat Feb 7 21:56:15 2015 +0100
hurd: fix f?chflags prototypes, declare them and their flags
diff --git a/ChangeLog b/ChangeLog
index 331b1dc..0474b0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,16 @@
* sysdeps/pthread/aio_misc.c [!AIO_PRIO_DELTA_MAX]: Do not check
priority against unexistent AIO_PRIO_DELTA_MAX.
+ * misc/chflags.c (chflags): Set flags parameter type to unsigned long
+ instead of int.
+ * misc/fchflags.c (fchflags): Likewise.
+ * sysdeps/mach/hurd/chflags.c (chflags): Likewise.
+ * sysdeps/mach/hurd/fchflags.c (fchflags): Likewise.
+ * sysdeps/mach/hurd/bits/stat.h [__USE_MISC] (UF_SETTABLE, UF_NODUMP,
+ UF_IMMUTABLE, UF_APPEND, UF_OPAQUE, UF_NOUNLINK, SF_SETTABLE,
+ SF_ARCHIVED, SF_IMMUTABLE, SF_APPEND, SF_NOUNLINK, SF_SNAPSHOT):
+ Declare macros.
+ [__USE_MISC] (chflags, fchflags): Declare functions.
2015-02-06 Roland McGrath <roland@hack.frob.com>
diff --git a/misc/chflags.c b/misc/chflags.c
index 48a9ce0..241be86 100644
--- a/misc/chflags.c
+++ b/misc/chflags.c
@@ -21,12 +21,12 @@
/* Change the flags of FILE to FLAGS. */
-int chflags (const char *file, int flags) __THROW;
+int chflags (const char *file, unsigned long int flags) __THROW;
int
chflags (file, flags)
const char *file;
- int flags;
+ unsigned long int flags;
{
if (file == NULL)
{
diff --git a/misc/fchflags.c b/misc/fchflags.c
index 3223461..b9f2675 100644
--- a/misc/fchflags.c
+++ b/misc/fchflags.c
@@ -21,12 +21,12 @@
/* Change the flags of the file referenced by FD to FLAGS. */
-int fchflags (int fd, int flags) __THROW;
+int fchflags (int fd, unsigned long int flags) __THROW;
int
fchflags (fd, flags)
int fd;
- int flags;
+ unsigned long int flags;
{
if (fd < 0)
{
diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h
index 6f92457..4d4bae4 100644
--- a/sysdeps/mach/hurd/bits/stat.h
+++ b/sysdeps/mach/hurd/bits/stat.h
@@ -222,9 +222,37 @@ struct stat64
S_IUSEUNK|S_IUNKNOWN|07777))
#endif
-/* Default file creation mask (umask). */
#ifdef __USE_MISC
+/* Default file creation mask (umask). */
# define CMASK 0022
+
+/* Definitions of flags stored in file flags word. */
+
+/* Super-user and owner changeable flags. */
+# define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */
+# define UF_NODUMP 0x00000001 /* do not dump file */
+# define UF_IMMUTABLE 0x00000002 /* file may not be changed */
+# define UF_APPEND 0x00000004 /* writes to file may only append */
+# define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */
+# define UF_NOUNLINK 0x00000010 /* file may not be removed or renamed */
+
+/* Super-user changeable flags. */
+# define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */
+# define SF_ARCHIVED 0x00010000 /* file is archived */
+# define SF_IMMUTABLE 0x00020000 /* file may not be changed */
+# define SF_APPEND 0x00040000 /* writes to file may only append */
+# define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */
+# define SF_SNAPSHOT 0x00200000 /* snapshot inode */
+
+__BEGIN_DECLS
+
+/* Set file flags for FILE to FLAGS. */
+extern int chflags (__const char *__file, unsigned long int __flags) __THROW;
+
+/* Set file flags of the file referred to by FD to FLAGS. */
+extern int fchflags (int __fd, unsigned long int __flags) __THROW;
+
+__END_DECLS
#endif
#endif /* bits/stat.h */
diff --git a/sysdeps/mach/hurd/chflags.c b/sysdeps/mach/hurd/chflags.c
index 07a8b1f..f088f9b 100644
--- a/sysdeps/mach/hurd/chflags.c
+++ b/sysdeps/mach/hurd/chflags.c
@@ -24,7 +24,7 @@
/* XXX shouldn't this be __chflags? */
int
-chflags (const char *file, int flags)
+chflags (const char *file, unsigned long int flags)
{
error_t err;
file_t port = __file_name_lookup (file, 0, 0);
diff --git a/sysdeps/mach/hurd/fchflags.c b/sysdeps/mach/hurd/fchflags.c
index d665e66..841d9df 100644
--- a/sysdeps/mach/hurd/fchflags.c
+++ b/sysdeps/mach/hurd/fchflags.c
@@ -25,7 +25,7 @@
/* XXX should be __fchflags? */
int
-fchflags (int fd, int flags)
+fchflags (int fd, unsigned long int flags)
{
error_t err;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
misc/chflags.c | 4 ++--
misc/fchflags.c | 4 ++--
sysdeps/mach/hurd/bits/stat.h | 30 +++++++++++++++++++++++++++++-
sysdeps/mach/hurd/chflags.c | 2 +-
sysdeps/mach/hurd/fchflags.c | 2 +-
6 files changed, 45 insertions(+), 7 deletions(-)
hooks/post-receive
--
GNU C Library master sources