mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] drop lchmod
@ 2017-01-04 21:23 Julien Ramseier
  2017-01-04 21:35 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Ramseier @ 2017-01-04 21:23 UTC (permalink / raw)
  To: musl

lchmod is not POSIX and not supported on Linux.
Keeping it would probably do more harm than good: software checking 
for its presence (i.e. libarchive) will use it and always fail.


diff --git a/include/sys/stat.h b/include/sys/stat.h
index 9d09662..0058338 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -92,7 +92,6 @@ int futimens(int, const struct timespec [2]);
 int utimensat(int, const char *, const struct timespec [2], int);

 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-int lchmod(const char *, mode_t);
 #define S_IREAD S_IRUSR
 #define S_IWRITE S_IWUSR
 #define S_IEXEC S_IXUSR
diff --git a/src/stat/lchmod.c b/src/stat/lchmod.c
deleted file mode 100644
index f324ba7..0000000
--- a/src/stat/lchmod.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define _GNU_SOURCE
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int lchmod(const char *path, mode_t mode)
-{
-   return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW);
-}



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-05 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-04 21:23 [PATCH] drop lchmod Julien Ramseier
2017-01-04 21:35 ` Rich Felker
2017-01-05  0:39   ` A. Wilcox
2017-01-05 11:23     ` Julien Ramseier

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).