porting dash (the shell)

Eitan Adler eitanadlerlist at gmail.com
Sun Jun 7 04:29:01 UTC 2009


Boris Kochergin wrote:
> Eitan Adler wrote:
>> if gcc -DBSD=1 -DSMALL -DSHELL -DGLOB_BROKEN -DFNMATCH_BROKEN
>> -DIFS_BROKEN -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)= -I.
>> -I. -I..  -include ../config.h   -g -O2 -Wall -MT exec.o -MD -MP -MF
>> ".deps/exec.Tpo" \
>>           -c -o exec.o `test -f 'exec.c' || echo './'`exec.c; \
>>         then mv -f ".deps/exec.Tpo" ".deps/exec.Po"; \
>>         else rm -f ".deps/exec.Tpo"; exit 1; \
>>         fi
>> exec.c: In function 'find_command':
>> exec.c:317: error: storage size of 'statb' isn't known
>> exec.c:326: warning: implicit declaration of function 'stat64'
>> exec.c:317: warning: unused eitan 'statb'
>> gmake[3]: *** [exec.o] Error 1
>> gmake[3]: Leaving directory `/home/eitan/dash-0.5.1/src'
>> gmake[2]: *** [all] Error 2
>> gmake[2]: Leaving directory `/home/eitan/dash-0.5.1/src'
>> gmake[1]: *** [all-recursive] Error 1
>> gmake[1]: Leaving directory `/home/eitan/dash-0.5.1'
>> gmake: *** [all] Error 2
>>
>>   
> stat64() and the statb structure appear to be some kind of Linuxisms.
> FreeBSD's stat() doesn't have any trouble with file sizes of over 2 GiB,
> so try replacing the stat64() call with stat() and the statb structure
> with a stat structure.
> 
> -Boris
> 

After doing a global search and replace of stat64 to stat I get:

mystring.c: In function 'single_quote':
mystring.c:164: warning: implicit declaration of function 'strchrnul'
mystring.c:164: error: invalid operands to binary -
mystring.c:169: warning: implicit declaration of function 'mempcpy'
mystring.c:169: warning: incompatible implicit declaration of built-in
function 'mempcpy'


-- 
Eitan Adler
"Security is increased by designing for the way humans actually behave."
-Jakob Nielsen


More information about the freebsd-ports mailing list