From 6aa22a864222eb7199a71dabb85906088ee988cc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Jul 2020 18:14:46 +0200 Subject: 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. --- modules/getumask | 32 ++++++++++++++++++++++++++++++++ modules/sys_stat | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 modules/getumask (limited to 'modules') 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: + + +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' \ -- cgit v1.2.1