Bugs item #1163104, was opened at 2005-03-14 17:15
Message generated for change (Settings changed) made by broeker
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=1163104&group_id=4664
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Hans-Bernhard Broeker (broeker)
>Summary: [FreeBSD 5.3] collision on memset fallback implementation
Initial Comment:
#cd /usr/ports/devel/cscope
#make install
>> cscope-15.5.tar.gz doesn't seem to exist in
/usr/ports/distfiles/.
>> Attempting to fetch from
http://us.dl.sourceforge.net/cscope/.
cscope-15.5.tar.gz 100% of
238 kB 83 kBps
===> Extracting for cscope-15.5
>> Checksum OK for cscope-15.5.tar.gz.
===> Patching for cscope-15.5
===> Applying FreeBSD patches for cscope-15.5
===> Configuring for cscope-15.5
configure: WARNING: you should use --build, --host,
--target
checking for a BSD-compatible install...
/usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
[... stuff deleted...]
===> Building for cscope-15.5
make all-recursive
Making all in doc
Making all in src
/bin/sh ../ylwrap `test -f 'fscanner.l' || echo
'./'`fscanner.l lex.yy.c fscanner.c -- flex
if cc -DHAVE_CONFIG_H -I. -I. -I.. -O -pipe -MT
fscanner.o -MD -MP -MF ".deps/fscanner.Tpo" -c -o
fscanner.o `test -f 'fscanner.c' || echo
'./'`fscanner.c; then mv ".deps/fscanner.Tpo"
".deps/fscanner.Po"; else rm -f ".deps/fscanner.Tpo";
exit 1; fi
byacc -d `test -f 'egrep.y' || echo './'`egrep.y
byacc: 2 shift/reduce conflicts
sed '/^#/ s|y\.tab\.c|egrep.c|' y.tab.c >egrep.c
rm -f y.tab.c
if test -f y.tab.h; then to=`echo "egrep_H" | sed -e
'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; sed "/^#/
s/Y_TAB_H/$to/g" y.tab.h >egrep.ht; rm -f y.tab.h; if
cmp -s egrep.ht egrep.h; then rm -f egrep.ht ; else
mv egrep.ht egrep.h; fi; fi
if test -f y.output; then mv y.output egrep.output; fi
if cc -DHAVE_CONFIG_H -I. -I. -I.. -O -pipe -MT
egrep.o -MD -MP -MF ".deps/egrep.Tpo" -c -o egrep.o
`test -f 'egrep.c' || echo './'`egrep.c; then mv
".deps/egrep.Tpo" ".deps/egrep.Po"; else rm -f
".deps/egrep.Tpo"; exit 1; fi
egrep.y:616: error: conflicting types for 'memset'
egrep.y:616: error: conflicting types for 'memset'
*** Error code 1
The problem is the definition of 'memset' in egrep.y:
/* FIXME HBB: should export this to a separate file and use
* AC_REPLACE_FUNCS() */
#if BSD
/*LINTLIBRARY*/
/*
* Set an array of n chars starting at sp to the
character c.
* Return sp.
*/
char *
memset(char *sp, char c, int n)
{
char *sp0 = sp;
while (--n >= 0)
*sp++ = c;
return (sp0);
}
#endif
which conflicts with the one in /usr/include/string.h:
void *memset(void *, int, size_t);
Everything compiled fine after I removed the definition
in egrep.y.
----------------------------------------------------------------------
Comment By: Hans-Bernhard Broeker (broeker)
Date: 2005-03-14 18:14
Message:
Logged In: YES
user_id=27517
Simply ripping that fallback definition out of the source
code is not an acceptable solution, though. The real
problem is not so much that this definition exists in the
source, but a) the place it's being kept, and b) the #if
condition surrounding it. That conditional should really be
#ifndef HAVE_MEMSET. I'll change that accordingly.
----------------------------------------------------------------------
Comment By: Hans-Bernhard Broeker (broeker)
Date: 2005-03-14 18:03
Message:
Logged In: YES
user_id=27517
Simply ripping that fallback definition out of the source
code is not an acceptable solution, though. The real
problem is not so much that this definition exists in the
source, but a) the place it's being kept, and b) the #if
condition surrounding it. That conditional should really be
#ifndef HAVE_MEMSET. I'll change that accordingly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104664&aid=1163104&group_id=4664
|