Thread View: news.software.nntp
4 messages
4 total messages
Started by bowler
Wed, 15 Jul 1998 00:00
INN 2.0, can't build on OSF/1 V3.0
Author: bowler
Date: Wed, 15 Jul 1998 00:00
Date: Wed, 15 Jul 1998 00:00
62 lines
2523 bytes
2523 bytes
I'm trying to build Inn-2.0 on a DEC Alpha running V3.0 of OSF/1 (I know it's
old but I'm stuck there...)
I've got at least 2 problems, 1 of which I've "solved" the other that I
haven't figured out yet...
First, configure thinks the free returns int
>checking for return type of qsort... (cached) void
>checking for return type of free... (cached) int
>checking for return type of exit... (cached) void
while it really returns void
From /usr/include/stdlib.h
>extern void *calloc __((size_t , size_t ));
>extern void free __((void *));
>extern void *malloc __((size_t ));
by simply editting config/config.data I can correct that problem locally (I'm
not "configure-aware" or I'd try and fix the configure script itself...)
The second problem is that after I fix the "free" problem, the compiler pukes
when it tries to compile hash.
>cd config ; make all ; cd ..
>chmod u+w `grep -v '^;' <files.list`
>./subst -f config.data `grep -v '^;' <files.list`
>../include/clibrary.h: updated
>
>cd lib ; make install ; cd ..
>cc -I../include -g -c checkart.c
>
> snip...
>
>cc -I../include -g -c hash.c
>/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: redeclaration of 'Hash';
>previous declaration at line 190 in file '../include/libinn.h'
> HASH Hash(const void *value, const size_t len) {
> -----^
>/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: Incompatible type for the
>function parameter
> HASH Hash(const void *value, const size_t len) {
> ------------------------------------------^
>/usr/lib/cmplrs/cc/cfe: Warning: hash.c, line 52: & before array or function:
>ignored
> &context.digest,
> ---^
>
>Stop.
>
>*** Exit 1
>
I realize that OSF/1 is not one of the supported platforms, but I'm hoping
that someone might have seen this before and have a pointer for where to
look to fix the problem.
TIA,
Bruce
Re: INN 2.0, can't build on OSF/1 V3.0
Author: Matt Dillon
Date: Thu, 16 Jul 1998 00:00
Date: Thu, 16 Jul 1998 00:00
54 lines
3010 bytes
3010 bytes
:In article <1998Jul16.090320.1@eisner>, <BBOWLER@BIGELOW.ORG> wrote:
:>In article <1r67gyepds.fsf@haey.ifi.uio.no>, Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> writes:
:>> [bowler@eisner.decus.org]
:>>
:>>> I'm trying to build Inn-2.0 on a DEC Alpha running V3.0 of OSF/1
:>>> (I know it's old but I'm stuck there...)
:....
:>>> > HASH Hash(const void *value, const size_t len) {
:>>> > -----^
:>>> >/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: Incompatible type for the
:>>> >function parameter
:>>....
:>> HASH Hash(const void *value, size_t len);
:>>
:>> Note the missing "const"... Add that, and it should compile fine.
:>
:>Fixed... Thanks!
:>
:>Now for the next problem...
:>
:>There is a similar problem (mismatch between prototypes in the .h and actual
:>declarations in the source) with both cnfs and timehash in the storage
:>directory tree. Which is the "correct" definition, the prototype or the call
:>(I'm assuming the call is correct, but it would be nice to know for sure...)
:>
:>TIA (again)
:>Bruce
The way I handle this with all my source code is to have a 'Prototype'
line for function and variable exports in each source module. The
"defs.h" does a '#define Prototype extern'. The makefile then generates
a protos.h file by grep'ing out all the Prototype lines from the source
files, which defs.h includes at the end.
This way prototypes can be placed in the same source file as the function,
making the source code more modular. It also means I don't really have
to use 'static', which clutters things up and imposes code ordering
requirements that are backwards, yet still be able to tell which
functions are local to a module and which are not.
You can see this in action if you look at how the Diablo source is
structures (at http://www.backplane.com/diablo/ ). I started doing this
in my old Amiga programming days and never looked back. It allows me
to compile everything "-Wall -Wstrict-prototypes" and gives me a reasonable
assurance that everything is being compiled properly.
-Matt
--
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications
<dillon@best.net> (Please include original email in any response)
Re: INN 2.0, can't build on OSF/1 V3.0
Author: bowler
Date: Thu, 16 Jul 1998 00:00
Date: Thu, 16 Jul 1998 00:00
36 lines
1990 bytes
1990 bytes
In article <1r67gyepds.fsf@haey.ifi.uio.no>, Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> writes:
> [bowler@eisner.decus.org]
>
>> I'm trying to build Inn-2.0 on a DEC Alpha running V3.0 of OSF/1
>> (I know it's old but I'm stuck there...)
>
>> The second problem is that after I fix the "free" problem, the
>> compiler pukes when it tries to compile hash.
>> [...]
>> >cc -I../include -g -c hash.c
>> >/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: redeclaration of 'Hash';
>> >previous declaration at line 190 in file '../include/libinn.h'
>> > HASH Hash(const void *value, const size_t len) {
>> > -----^
>> >/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: Incompatible type for the
>> >function parameter
>
> If you look in libinn.h, you'll find
>
> HASH Hash(const void *value, size_t len);
>
> Note the missing "const"... Add that, and it should compile fine.
Fixed... Thanks!
Now for the next problem...
There is a similar problem (mismatch between prototypes in the .h and actual
declarations in the source) with both cnfs and timehash in the storage
directory tree. Which is the "correct" definition, the prototype or the call
(I'm assuming the call is correct, but it would be nice to know for sure...)
TIA (again)
Bruce
Re: INN 2.0, can't build on OSF/1 V3.0
Author: Kjetil Torgrim Homme
Date: Thu, 16 Jul 1998 00:00
Date: Thu, 16 Jul 1998 00:00
39 lines
1924 bytes
1924 bytes
[bowler@eisner.decus.org]
> I'm trying to build Inn-2.0 on a DEC Alpha running V3.0 of OSF/1
> (I know it's old but I'm stuck there...)
> First, configure thinks the free returns int [...]
> while it really returns void
I don't know how to fix configure, sorry.
> The second problem is that after I fix the "free" problem, the
> compiler pukes when it tries to compile hash.
> [...]
> >cc -I../include -g -c hash.c
> >/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: redeclaration of 'Hash';
> >previous declaration at line 190 in file '../include/libinn.h'
> > HASH Hash(const void *value, const size_t len) {
> > -----^
> >/usr/lib/cmplrs/cc/cfe: Error: hash.c, line 44: Incompatible type for the
> >function parameter
If you look in libinn.h, you'll find
HASH Hash(const void *value, size_t len);
Note the missing "const"... Add that, and it should compile fine.
> I realize that OSF/1 is not one of the supported platforms, but
> I'm hoping that someone might have seen this before and have a
> pointer for where to look to fix the problem.
There shouldn't be that great differences between OSF/1 v3 and DU v4,
and I have read about people running it on the latter. They have
probably used gcc, which will mask your last problem, at least.
Kjetil T.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads