Hi,,
In src/lib/mountpoint.c:53 the following had to be commented out:
// point_r->type = p_strdup(pool, buf.f_fstypename);
because f_fstypename is undeclared on this OS.
Also the following errors occur with the DEC C compiler (which
compiles the other files just fine):
source='file-cache.c' object='file-cache.o' libtool=no
DEPDIR=.deps
depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H
-I. -I. -I../.. -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include -
I/usr/pkg/include -c file-cache.c
cc: Error: file-cache.c, line 70: In this statement, "cache-
>mmap_base" and "(-1)" may not be compared for equality or
inequality.
if (cache->mmap_base == MAP_FAILED) {
--------------------^
cc: Error: file-cache.c, line 79: In this statement, "cache-
>mmap_base" and "(-1)" may not be compared for equality or
inequality.
if (cache->mmap_base == MAP_FAILED) {
--------------------^
*** Exit 1
Stop.
And:
source='istream-mmap.c' object='istream-mmap.o' libtool=no
DEPDIR=.deps depmode=none /usr/bin/posix/sh ../../depcomp cc -std -
DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/pkg/include -ieee -O2 -I/
usr/pkg/include -I/usr/pkg/include -c istream-mmap.c
cc: Error: istream-mmap.c, line 121: In this statement, "mstream-
>mmap_base" and "(-1)" may not be compared for equality or
inequality.
if (mstream->mmap_base == MAP_FAILED) {
--------------------^
And:
source='mmap-anon.c' object='mmap-anon.o' libtool=no
DEPDIR=.deps
depmode=none /usr/
bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H -I. -I. -
I../.. -I/usr/pkg/inc
lude -ieee -O2 -I/usr/pkg/include -I/usr/pkg/include -c mmap-anon.c
cc: Error: mmap-anon.c, line 67: In this statement, "base" and
"(-1)"
may not be comp
ared for equality or inequality.
if (base == MAP_FAILED)
------------^
cc: Warning: mmap-anon.c, line 68: In this statement, "(-1)" of type
"long", is being
converted to "pointer to void".
return MAP_FAILED;
-----------------------^
cc: Error: mmap-anon.c, line 85: In this statement, "new_base" and
"(-1)" may not be compared for equality or inequality.
if (new_base == MAP_FAILED)
------------^
cc: Warning: mmap-anon.c, line 86: In this statement, "(-1)" of type
"long", is being converted to "pointer to void".
return MAP_FAILED;
-----------------------^
cc: Error: mmap-anon.c, line 116: In this statement, "old_address"
and "(-1)" may not be compared for equality or inequality.
if (old_address == NULL || old_address == MAP_FAILED) {
-----------------------------------^
cc: Warning: mmap-anon.c, line 118: In this statement, "(-1)" of type
"long", is being converted to "pointer to void".
return MAP_FAILED;
-----------------------^
cc: Warning: mmap-anon.c, line 131: In this statement, "(-1)" of type
"long", is being converted to "pointer to void".
return MAP_FAILED;
-------------------------------^
cc: Error: mmap-anon.c, line 152: In this statement, "start" and
"(-1)" may not be compared for equality or inequality.
if (start == NULL || start == MAP_FAILED) {
-----------------------------^
*** Exit 1
Stop.
And:
Making all in lib-index
source='mail-cache.c' object='mail-cache.o' libtool=no
DEPDIR=.deps
depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H
-I. -I. -I../.. -I../../src/lib -I../../src/lib-mail -I/usr/pkg/
include -ieee -O2 -I/usr/pkg/include -I/usr/pkg/include -c mail-
cache.c
cc: Error: mail-index-private.h, line 177: Invalid declarator.
unsigned int readonly:1;
---------------------^
*** Exit 1
Stop.
source='mail-cache-compress.c' object='mail-cache-compress.o'
libtool=no DEPDIR=.deps depmode=none /usr/bin/posix/sh ../../
depcomp cc -std -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/lib -
I../../src/lib-mail -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include
-I/usr/pkg/include -c mail-cache-compress.c
cc: Error: mail-index-private.h, line 177: Invalid declarator.
unsigned int readonly:1;
---------------------^
*** Exit 1
Stop.
source='mail-cache-decisions.c' object='mail-cache-decisions.o'
libtool=no DEPDIR=.deps depmode=none /usr/bin/posix/sh ../../
depcomp cc -std -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/lib -
I../../src/lib-mail -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include
-I/usr/pkg/include -c mail-cache-decisions.c
cc: Error: mail-index-private.h, line 177: Invalid declarator.
unsigned int readonly:1;
---------------------^
*** Exit 1
Stop.
... etc, more of this error in other files...
--
G?bor B?rczi
On Thu, 2006-08-17 at 12:38 +0200, =?ISO-8859-1?Q? G=E1bor_B=E9rczi_=28Gabucino=29 ?= wrote:> Hi,, > > In src/lib/mountpoint.c:53 the following had to be commented out: > > // point_r->type = p_strdup(pool, buf.f_fstypename); > > because f_fstypename is undeclared on this OS.Is there something else with the same information? (could you show me the whole struct?)> Also the following errors occur with the DEC C compiler (which > compiles the other files just fine): > > source='file-cache.c' object='file-cache.o' libtool=no DEPDIR=.deps > depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H > -I. -I. -I../.. -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include - > I/usr/pkg/include -c file-cache.c > cc: Error: file-cache.c, line 70: In this statement, "cache- > >mmap_base" and "(-1)" may not be compared for equality or inequality. > if (cache->mmap_base == MAP_FAILED) { > --------------------^ > cc: Error: file-cache.c, line 79: In this statement, "cache- > >mmap_base" and "(-1)" may not be compared for equality or inequality. > if (cache->mmap_base == MAP_FAILED) { > --------------------^Well, I'd say that's a bug in OSF's header files. MAP_FAILED should be defined to (void *)-1, not -1. Maybe if you put this to lib/compat.h: #undef MAP_FAILED #define MAP_FAILED (void *)-1> Making all in lib-index > source='mail-cache.c' object='mail-cache.o' libtool=no DEPDIR=.deps > depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H > -I. -I. -I../.. -I../../src/lib -I../../src/lib-mail -I/usr/pkg/ > include -ieee -O2 -I/usr/pkg/include -I/usr/pkg/include -c mail- > cache.c > cc: Error: mail-index-private.h, line 177: Invalid declarator. > unsigned int readonly:1;Hmm.. Maybe I could change it to read_only. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060817/819ee8e7/attachment.bin>
Hi,
The struct looks like this:
struct statfs {
short f_type; /* type of filesystem (see
below) */
short f_flags; /* copy of mount flags */
int f_fsize; /* fundamental filesystem
block size */
int f_bsize; /* optimal transfer block
size */
int f_blocks; /* total data blocks in file
system, */
/* note: may not represent
fs size. */
int f_bfree; /* free blocks in fs */
int f_bavail; /* free blocks avail to non-
su */
int f_files; /* total file nodes in file
system */
int f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
int f_spare[9]; /* spare for later */
char f_mntonname[MNAMELEN]; /* directory on which
mounted */
char f_mntfromname[MNAMELEN];/* mounted filesystem */
union mount_info mount_info; /* mount options */
};
MAP_FAILED is:
/usr/include/sys/mman.h:
#define MAP_FAILED (-1L) /* unsuccessful return from mmap() */
> Well, I'd say that's a bug in OSF's header files. MAP_FAILED
should be
> defined to (void *)-1, not -1. Maybe if you put this to lib/compat.h:
>
> #undef MAP_FAILED
> #define MAP_FAILED (void *)-1
This didn't help.
source='file-cache.c' object='file-cache.o' libtool=no
DEPDIR=.deps
depmode=none /usr/bin/posix/sh ../../depcomp cc -std -DHAVE_CONFIG_H
-I. -I. -I../.. -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include -
I/usr/pkg/include -c file-cache.c
cc: Warning: /usr/include/sys/mman.h, line 172: The redefinition of
the macro "MAP_FAILED" conflicts with a current definition because
the replacement lists differ. The redefinition is now in effect.
#define MAP_FAILED (-1L) /* unsuccessful return from mmap() */
-------------------------^
cc: Error: file-cache.c, line 70: In this statement, "cache-
>mmap_base" and "(-1)" may not be compared for equality or
inequality.
if (cache->mmap_base == MAP_FAILED) {
--------------------^
cc: Error: file-cache.c, line 79: In this statement, "cache-
>mmap_base" and "(-1)" may not be compared for equality or
inequality.
if (cache->mmap_base == MAP_FAILED) {
--------------------^
*** Exit 1
Stop.