about summary refs log tree commit diff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/Makefile2
-rw-r--r--io/Versions4
-rw-r--r--io/sys/stat.h13
3 files changed, 15 insertions, 4 deletions
diff --git a/io/Makefile b/io/Makefile
index f1a619d0f7..97bff3606c 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -33,7 +33,7 @@ routines :=							      \
 	xstat fxstat lxstat xmknod xstat64 fxstat64 lxstat64	      \
 	statfs fstatfs statfs64 fstatfs64			      \
 	statvfs fstatvfs statvfs64 fstatvfs64			      \
-	umask chmod fchmod mkdir				      \
+	umask chmod fchmod lchmod mkdir				      \
 	open open64 close read write lseek lseek64 access euidaccess  \
 	fcntl flock lockf lockf64				      \
 	dup dup2 pipe						      \
diff --git a/io/Versions b/io/Versions
index b5626f3599..88f3a9ac04 100644
--- a/io/Versions
+++ b/io/Versions
@@ -89,6 +89,10 @@ libc {
     # s*
     sendfile64;
   }
+  GLIBC_2.3.2 {
+    # l*
+    lchmod;
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # cancelable.
diff --git a/io/sys/stat.h b/io/sys/stat.h
index a2a6692774..32a3889da2 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-1999,2000,2001,2002
+   	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
@@ -244,10 +245,16 @@ extern int lstat64 (__const char *__restrict __file,
 #endif
 
 /* Set file access permissions for FILE to MODE.
-   This takes an `int' MODE argument because that
-   is what `mode_t's get widened to.  */
+   If FILE is a symbolic link, this affects its target instead.  */
 extern int chmod (__const char *__file, __mode_t __mode) __THROW;
 
+#ifdef __USE_BSD
+/* Set file access permissions for FILE to MODE.
+   If FILE is a symbolic link, this affects the link itself
+   rather than its target.  */
+extern int lchmod (__const char *__file, __mode_t __mode) __THROW;
+#endif
+
 /* Set file access permissions of the file FD is open on to MODE.  */
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
 extern int fchmod (int __fd, __mode_t __mode) __THROW;