summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-07-04 18:14:46 +0200
committerBruno Haible <bruno@clisp.org>2020-07-04 18:14:46 +0200
commit6aa22a864222eb7199a71dabb85906088ee988cc (patch)
treeb0d2d28ad541b987fce46e6bb523cbdf5b175ad8 /modules
parent36d4b7ed93c3c29505f939de6725b7f68b860fa5 (diff)
downloadgnulib-6aa22a864222eb7199a71dabb85906088ee988cc.tar.gz
getumask: New module.
* lib/sys_stat.in.h (getumask): New declaration. * lib/getumask.c: New file. * m4/getumask.m4: New file. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether getumask is declared. (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_GETUMASK, HAVE_GETUMASK. * modules/sys_stat (Makefile.am): Substitute GNULIB_GETUMASK, HAVE_GETUMASK. * modules/getumask: New file. * tests/test-sys_stat-c++.cc (getumask): Check signature. * doc/glibc-functions/getumask.texi: New file. * doc/gnulib.texi (Glibc sys/stat.h): Include it.
Diffstat (limited to 'modules')
-rw-r--r--modules/getumask32
-rw-r--r--modules/sys_stat2
2 files changed, 34 insertions, 0 deletions
diff --git a/modules/getumask b/modules/getumask
new file mode 100644
index 0000000000..9f19a0e818
--- /dev/null
+++ b/modules/getumask
@@ -0,0 +1,32 @@
+Description:
+getumask() function: retrieve the umask of the process (multithread-safe)
+
+Files:
+lib/getumask.c
+m4/getumask.m4
+
+Depends-on:
+sys_stat
+extensions
+unistd [test $HAVE_GETUMASK = 0]
+clean-temp [test $HAVE_GETUMASK = 0]
+tempname [test $HAVE_GETUMASK = 0]
+
+configure.ac:
+gl_FUNC_GETUMASK
+if test $HAVE_GETUMASK = 0; then
+ AC_LIBOBJ([getumask])
+ gl_PREREQ_GETUMASK
+fi
+gl_SYS_STAT_MODULE_INDICATOR([getumask])
+
+Makefile.am:
+
+Include:
+<sys/stat.h>
+
+License:
+GPL
+
+Maintainer:
+all
diff --git a/modules/sys_stat b/modules/sys_stat
index 4783c7efb8..af276abb85 100644
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -38,6 +38,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+ -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
-e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
@@ -51,6 +52,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+ -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
-e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
-e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \