From 49f3a758597f7904ba7e779156df8f9b61c06303 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Nov 2000 07:40:13 +0000 Subject: Update. * misc/getusershell.c: Make strings in okshells array const. * misc/regexp.c: Add const to cast to avoid warnings. * sysdeps/unix/sysv/linux/llseek.c: Add prototype for __llseek. * sysdeps/unix/sysv/linux/i386/setresuid.c: Add prototype for __setresuid. * sysdeps/unix/sysv/linux/i386/setresgid.c: Add prototype for setresgid. * misc/error.c: Add prototypes for __error and __error_at_line. * misc/mntent_r.c (__getmntent_r): Add break at end of switch statement to avoid warning. --- misc/regexp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'misc/regexp.c') diff --git a/misc/regexp.c b/misc/regexp.c index fbc32e74d0..3308239876 100644 --- a/misc/regexp.c +++ b/misc/regexp.c @@ -33,6 +33,7 @@ char *locs; found in the buffer starting at EXPBUF. `loc1' will return the first character matched and `loc2' points to the next unmatched character. */ +extern int __step (const char *string, const char *expbuf); int __step (const char *string, const char *expbuf) { @@ -41,7 +42,7 @@ __step (const char *string, const char *expbuf) expbuf += __alignof (regex_t *); expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *); - if (__regexec ((regex_t *) expbuf, string, 1, &match, REG_NOTEOL) + if (__regexec ((const regex_t *) expbuf, string, 1, &match, REG_NOTEOL) == REG_NOMATCH) return 0; @@ -55,6 +56,7 @@ weak_alias (__step, step) /* Match the beginning of STRING with the compiled regular expression in EXPBUF. If the match is successful `loc2' will contain the position of the first unmatched character. */ +extern int __advance (const char *string, const char *expbuf); int __advance (const char *string, const char *expbuf) { @@ -63,7 +65,7 @@ __advance (const char *string, const char *expbuf) expbuf += __alignof__ (regex_t *); expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *); - if (__regexec ((regex_t *) expbuf, string, 1, &match, REG_NOTEOL) + if (__regexec ((const regex_t *) expbuf, string, 1, &match, REG_NOTEOL) == REG_NOMATCH /* We have to check whether the check is at the beginning of the buffer. */ -- cgit 1.4.1