arla on NeXTSTEP3.3/Intel

Assar Weterlund assar at stacken.kth.se
Sat Jun 19 23:21:40 CEST 1999


Helmut Heller <Helmut.Heller at lrz-muenchen.de> writes:
> YES, that should be sufficient.

Ok, that should be added to configure.in

> return malloc(size, M_TEMP, M_WAITOK); /* What kind? */
> 
> gives:
> 
> xfs_common.c: In function `xfs_alloc':
> xfs_common.c:63: `M_TEMP' undeclared (first use this function)
> xfs_common.c:63: (Each undeclared identifier is reported only once
> xfs_common.c:63: for each function it appears in.)
> xfs_common.c:63: `M_WAITOK' undeclared (first use this function)
> xfs_common.c:63: too many arguments to function `malloc'
> xfs_common.c: In function `xfs_free':
> xfs_common.c:76: `M_TEMP' undeclared (first use this function)
> xfs_common.c:76: too many arguments to function `free'
> gmake: *** [xfs_common.o] Error 1
> 
> The syntax for my malloc() is different. Besides malloc() I also have
> kalloc() to allocate wired-down kernel memory . But do I need this
> here?? What are M_TEMP and M_WAITOK?
> Ok, for now I use malloc(size)/free(*ptr).

This is the kernel malloc and you need to look for it in your kernel
header files to figure out how it should be called.

> Next problem:
> cc -c -DHAVE_CONFIG_H -I. -I. -I/usr/src/sys/arch -I/usr/src/sys
> -I../../include -I./../../include -I./../include -I/usr/athena/include
> -DDIAGNOSTIC -DUSE_SELECT -DKERNEL -D_KERNEL -DMACH_USER_API
> -DKERNEL_SERVER_INSTANCE=xfs_instance -D_POSIX_SOURCE -DINET -DMACH
> -DPOSIX_KERN -g -Wall -fno-common -Wno-format -pipe -finline
> -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -static
> xfs_dev.c
> In file included from ./xfs/xfs_fs.h:47,
>                  from xfs_dev.c:44:
> ./xfs/xfs_node.h:61: field `attr' has incomplete type

It doesn't have the type for `struct vattr'.  You need to look in your
header file <sys/vnode.h> or any other to see where that type is being
defined.

> In file included from xfs_dev.c:44:
> ./xfs/xfs_fs.h:93: warning: `struct componentname' declared inside
> parameter list

same with this one.

> ./xfs/xfs_fs.h:93: warning: its scope is only this definition or
> declaration,
> ./xfs/xfs_fs.h:93: warning: which is probably not what you want.
> xfs_dev.c: In function `xfs_devclose':
> xfs_dev.c:150: warning: implicit declaration of function `panic'
> xfs_dev.c:170: warning: implicit declaration of function `wakeup'
> xfs_dev.c:188: warning: implicit declaration of function `vfs_busy'

It might be the case that there are no prototypes for these, or that
you need to include some other header file or that they don't exist.

> xfs_dev.c:192: `FORCECLOSE' undeclared (first use this function)

You need to find the prototype for vflush and see what flags it likes.

> xfs_dev.c: In function `xfs_devwrite':
> xfs_dev.c:282: structure has no member named `uio_procp'

Start by looking at `struct uio' and see if it has a member of type
process.

> xfs_dev.c: In function `xfs_message_send':
> xfs_dev.c:382: warning: implicit declaration of function `bcopy'
> xfs_dev.c:392: structure has no member named `p_wchan'
> xfs_dev.c:393: storage size of `selinfo' isn't known
> xfs_dev.c:402: warning: implicit declaration of function `selwakeup'
> xfs_dev.c:403: warning: implicit declaration of function
> `selthreadclear'
> xfs_dev.c:393: warning: unused variable `selinfo'
> xfs_dev.c: In function `xfs_message_rpc':
> xfs_dev.c:428: warning: implicit declaration of function `printf'
> xfs_dev.c:449: structure has no member named `p_wchan'
> xfs_dev.c:450: storage size of `selinfo' isn't known

You need to find the type for this, as well.

/assar





More information about the Arla-drinkers mailing list