lkml.org 
[lkml]   [2008]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 32/56] microblaze_v2: definitions of types
Date
On Sunday 04 May 2008, monstr@seznam.cz wrote:
> include/asm-microblaze/posix_types.h

It would be good to have this as asm-generic/posix_types_32.h.
Unfortunately, __kernel_size_t and friends need to match the
compiler and are sometimes defined as 'unsigned int' and
sometimes as 'unsigned long', otherwise we could even use
the same header for 32 and 64 bit.

> +typedef unsigned short __kernel_mode_t;
> +typedef unsigned short __kernel_nlink_t;
> +typedef unsigned short __kernel_ipc_pid_t;

Some architectures define these as 'unsigned int', which
seems reasonable, though there is no real requirement behind it,
afaict.

> +typedef long __kernel_off_t;

I suppose this should become 'typedef long long __kernel_off_t;'
It won't work on pre-C99 compilers, but I don't think we need
to care about those for a new architecture.

> +typedef unsigned short __kernel_uid_t;
> +typedef unsigned short __kernel_gid_t;

this should certainly be unsigned int.

> +typedef unsigned short __kernel_uid16_t;
> +typedef unsigned short __kernel_gid16_t;
> +typedef unsigned int __kernel_uid32_t;
> +typedef unsigned int __kernel_gid32_t;
> +
> +typedef unsigned short __kernel_old_uid_t;
> +typedef unsigned short __kernel_old_gid_t;
> +typedef unsigned short __kernel_old_dev_t;

try not defining these at all and see if something breaks.
If it does, that's probably a bug.

Arnd <><


\
 
 \ /
  Last update: 2008-05-04 23:31    [W:0.455 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site