From 3bbceb1287e3df7eb75e7a9852278d4eb9d33a00 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Oct 1995 06:54:40 +0000 Subject: Tue Oct 31 00:07:29 1995 Roland McGrath * sysdeps/mach/hurd/group_member.c: New file. * sysdeps/generic/group_member.c: New file. * Makerules (lib-noranlib): Don't depend on $(install-lib). (others): Do. * extra-lib.mk: Fix test of $(lib)-no-lib-dep. Mon Oct 30 12:33:10 1995 Roland McGrath * Rules (others): Depend on $(extra-objs). * posix/unistd.h [__USE_GNU]: Declare group_member, __group_member. * posix/Makefile (routines): Add group_member. * sysdeps/posix/euidaccess.c: New file, adapted from fileutils. * sysdeps/unix/sysv/linux/i386/sigaction.c: Tighten constraint for SIG operand in asm so it must be a register. Add dead return to quiet gcc warning. * Makerules (sysd-rules): Write a defn for sysd-rules-done. [! sysd-rules-done]: Inhibit deps. --- posix/Makefile | 2 +- posix/regex.c | 8 ++++---- posix/unistd.h | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'posix') diff --git a/posix/Makefile b/posix/Makefile index 5c3d9a0fb2..937dc04880 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -36,7 +36,7 @@ routines := \ fork vfork _exit \ execve fexecve execv execle execl execvp execlp \ getpid getppid \ - getuid geteuid getgid getegid getgroups setuid setgid \ + getuid geteuid getgid getegid getgroups setuid setgid group_member \ getpgid setpgid getpgrp setsid \ getlogin setlogin \ pathconf sysconf fpathconf \ diff --git a/posix/regex.c b/posix/regex.c index 13c70faa4c..f1db89adf6 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -1159,7 +1159,7 @@ typedef struct /* Push the info, starting with the registers. */ \ DEBUG_PRINT1 ("\n"); \ \ - if (!(RE_NO_POSIX_BACKTRACKING & bufp->syntax)) \ + if (1) \ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ this_reg++) \ { \ @@ -1220,7 +1220,7 @@ typedef struct /* We actually push this many items. */ #define NUM_FAILURE_ITEMS \ - (((RE_NO_POSIX_BACKTRACKING & bufp->syntax \ + (((0 \ ? 0 : highest_active_reg - lowest_active_reg + 1) \ * NUM_REG_ITEMS) \ + NUM_NONREG_ITEMS) @@ -1281,7 +1281,7 @@ typedef struct low_reg = (unsigned) POP_FAILURE_INT (); \ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ \ - if (!(RE_NO_POSIX_BACKTRACKING & bufp->syntax)) \ + if (1) \ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ { \ DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ @@ -1299,7 +1299,7 @@ typedef struct { \ for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \ { \ - reg_info[this_reg].word = 0; \ + reg_info[this_reg].word.integer = 0; \ regend[this_reg] = 0; \ regstart[this_reg] = 0; \ } \ diff --git a/posix/unistd.h b/posix/unistd.h index ffd83b2b1e..62c25fc09b 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -366,6 +366,12 @@ extern __gid_t getegid __P ((void)); extern int __getgroups __P ((int __size, __gid_t __list[])); extern int getgroups __P ((int __size, __gid_t __list[])); +#ifdef __USE_GNU +/* Return nonzero iff the calling process is in group GID. */ +extern int __group_member __P ((__gid_t __gid)); +extern int group_member __P ((__gid_t __gid)); +#endif + /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; -- cgit 1.4.1