Bert,
The first part of the problem is that the fourth and fifth formal
parameters to 'getdefaults' are defined as 'int *' but the variables
'plimit' and 'flimit' in 'swish.c' are declared as 'long'.
You can change the declaration and definition of getdefaults to
expect 'long *' for parameters four and five:
void getdefaults _AP ((char *, int *, int *, long *, long *, int))
The function definition is:
void getdefaults(conffile, hasdir, hasindex, plimit, flimit,hasverbose)
char *conffile;
int *hasdir;
int *hasindex;
long *plimit;
long *flimit;
int hasverbose;
Your must be compiling in ANSI mode and hence the mistmatch is being
detected. One option is to compile in K&R mode instead. The gcc
compiler is quite forgiving about ANSI/K&R conformance and hence you
are only receiving warnings anyway. I guess most people must
ignore them.
Rgds,
Kenneth
Bert Hiddink wrote:
>
> Hello,
>
> I tried to compile Swish 1.2. in UNIX FreeBSD 2.1.7.1 with a gcc.
> Compiling goes fine up to the swish.c file. Than it says:
>
> In function 'main
>
> swish.c:252: warning: passing arg 4 of 'getdefaults'from
> incompatible pointer type
>
> swish.c:252: warning: passing arg 5 of 'getdefaults'from
> incompatible pointer type
>
> swish.c:363: warning: passing arg 4 of 'getdefaults' from
> incompatible pointer type
>
> swish.c:363: warning: passing arg 5 of 'getdefaults' from
> incompatible pointer type
>
> swish.c:448: warning: passing arg 4 of 'getdefaults' from
> incompatible pointer type
>
> swish.c:448: warning: passing arg 5 of 'getdefaults'from
> incompatible pointer type
>
> .. and then a lot of other messages:
>
> "Undefined symbol"-messages (_parseconfline, _vsize, _vgetc,
> _indexpath) from the index.c file.
>
> Finally:
> *** Error code 1
>
> Does any of you have any ideas what is going wrong??
>
> Thanks in advance!
> ****************************
>
> Bert Hiddink
> FUNDACION GALILEO
> Correo electronico: hiddink@sipromicro.com
> Sitio: www.sipromicro.com
> Tel. +506 280 8683
> Telefax. +506 280 8886
>
> ****************************
--
========================================================================
Kenneth Green +61 3 9210 5541 Tel. & Voicemail
R&D Project Manager +61 3 9210 5550 FAX
kenneth_green@hp.com
Advanced Networks Division PO Box 221, Blackburn Vic 3130
Hewlett-Packard Australia Ltd AUSTRALIA
========================================================================
Received on Thu Oct 8 18:15:29 1998