RE: [cvsacl-users] new acl.c
Brought to you by:
sbaris
From: Alex H. <ah...@ke...> - 2004-06-23 15:48:20
|
It looks the same but one character is different. Check out the spelling: sepErate vs sepArate. Open acl.c with vi and then execute this command: :% s/use_separate_acl_file_for_each_dir/use_seperate_acl_file_for_each_dir/g It should then compile ok. After doing some trivial tests it appears that the new patch is working ok. Alex On Wed, 23 Jun 2004, Mortensen, Mark wrote: > Alex, > > You reference changing instances of "use_separate_acl_file_for_each_dir" in > acl.c to "use_seperate_acl_file_for_each_dir". Uhmmm, this is the same > thing isn't it. Was this a typo? I am by no means a C programmer so pardon > any newbie issue I'm missing here. > > -Mark > > -----Original Message----- > From: cvs...@li... > [mailto:cvs...@li...]On Behalf Of Alex Hill > Sent: Wednesday, June 23, 2004 9:10 AM > To: cvs...@li... > Subject: Re: [cvsacl-users] new acl.c > > > I thought it might have been a bad character or soemthing before int x so > I tried deleting that first. Its not that. > > I am running Redhat Linux 7.2 (kernel 2.4.7-10) with gcc version 2.96. I > think the issue is a compiler issue. The file ends with the .c extension > so variables must be declared after a new block {} and before any > operations. For example: > > If I tried to compile: > int main(void) > { > int y; > y++; > int x; > } > > It would fail. This would work: > int main(void) > { > int y; > int x; > y++; > } > > So if I modify acl.c so that the declaration of int x comes after the > while block and before the if statement it will compile fine: > > while (getline (&line, &line_allocated, accessfp) >= 0) > { > int x; > if (line[0] == '#' || line[0] == '\0' || line[0] == '\n') > continue; > > I tried compiling in the new acl.c you supplied and got the following > error: > > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../diff -I../zlib > -I/usr/kerberos/include -g -O2 -MT acl.o -MD -MP -MF ".deps/acl.Tpo" \ > -c -o acl.o `test -f 'acl.c' || echo './'`acl.c; \ > then mv -f ".deps/acl.Tpo" ".deps/acl.Po"; \ > else rm -f ".deps/acl.Tpo"; exit 1; \ > fi > gcc -g -O2 -o cvs acl.o add.o admin.o annotate.o buffer.o checkin.o > checkout.o classify.o client.o commit.o create_adm.o cvsrc.o diff.o edit.o > entries.o error.o expand_path.o fileattr.o filesubr.o find_names.o > hardlink.o hash.o history.o ignore.o import.o lock.o log.o login.o > logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o parseinfo.o > patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o root.o run.o > scramble.o server.o stack.o status.o subr.o tag.o update.o version.o > vers_ts.o watch.o wrapper.o zlib.o ../diff/libdiff.a ../lib/libcvs.a > ../zlib/libz.a -lcrypt -lgssapi_krb5 -lkrb5 -lk5crypto -lcrypt -lresolv > -lcom_err -L/usr/kerberos/lib -lnsl > parseinfo.o: In function `parse_aclconfig': > /usr/src/cvs-1.11.17-cvsacl-1.2.0-patched/src/parseinfo.c:543: undefined > reference to `use_seperate_acl_file_for_each_dir' > /usr/src/cvs-1.11.17-cvsacl-1.2.0-patched/src/parseinfo.c:545: undefined > reference to `use_seperate_acl_file_for_each_dir' > collect2: ld returned 1 exit status > make: *** [cvs] Error 1 > > It appears that the new acl.c has changed the global variable > use_seperate_acl_file_for_each_dir to use_separate_acl_file_for_each_dir > but the parseinfo.c file is referencing > use_seperate_acl_file_for_each_dir. > > I changed every instance of use_separate_acl_file_for_each_dir in acl.c to > use_seperate_acl_file_for_each_dir and it compiled. > > Alex > > On Wed, 23 Jun 2004 sb...@us... wrote: > > > > > Hi, > > > > I attached acl.c file to this email, > > can you try this? (should solve Mark's problem and compile error) > > > > I did not understand why there is a compile error in line 269? > > Variable x is only used inside that while block in line 267, and > > i didnt get any compile error about it. > > May be newline character problem (i edit acl.c on windows).? > > Regards, > > sb...@us... > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > cvsacl-users mailing list > cvs...@li... > https://lists.sourceforge.net/lists/listinfo/cvsacl-users > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > cvsacl-users mailing list > cvs...@li... > https://lists.sourceforge.net/lists/listinfo/cvsacl-users > |