[klibc] [klibc 28/43] mips support for klibc

H. Peter Anvin hpa at zytor.com
Tue Jun 27 08:32:11 PDT 2006


Ralf Baechle wrote:
> On Sun, Jun 25, 2006 at 05:58:05PM -0700, H. Peter Anvin wrote:
> 
>> +typedef struct flock {
>> +	short	l_type;
>> +	short	l_whence;
>> +	loff_t	l_start;
>> +	loff_t	l_len;
>> +	pid_t	l_pid;
>> +} flock_t;
> 
> 32-bit MIPS uses this:
> 
> struct flock {
>         short   l_type;
>         short   l_whence;
>         off_t   l_start;
>         off_t   l_len;
>         long    l_sysid;
>         __kernel_pid_t l_pid;
>         long    pad[4];
> };

Does it use that for F_GETLK64 and friends?  klibc overrides the 
definitions so that F_GETLK is really F_GETLK64 etc; thus, "struct 
flock" in klibc userspace is really "struct flock64".  (To put it 
differently, klibc is always large-file compliant.)

As far as I can tell, MIPS uses the generic definition for struct 
flock64, which is the one I have above, so it should be correct.

	-hpa



More information about the klibc mailing list