This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: make existing mips files multi-ABI
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: libc-alpha at sources dot redhat dot com
- Date: 03 Apr 2003 17:36:38 -0300
- Subject: Re: make existing mips files multi-ABI
- Organization: GCC Team, Red Hat
- References: <orof4eb7xj.fsf@free.redhat.lsd.ic.unicamp.br><u8llzi45t5.fsf@gromit.moeb><or1y0wdur2.fsf@free.redhat.lsd.ic.unicamp.br><u8adfkf1cv.fsf@gromit.moeb><orwuioasd8.fsf@free.redhat.lsd.ic.unicamp.br>
On Mar 25, 2003, Alexandre Oliva <aoliva at redhat dot com> wrote:
>> Alexandre Oliva <aoliva at redhat dot com> writes:
>>> I'm yet to revisit the need for the fcntl.h changes.
> Turns out there are still some kernel issues to be sorted out for
> us to be able to define struct flock and flock64 properly. Currently,
> the data structures used by the 32-bit mips kernel seem to be
> different from those of the mips64 kernel, breaking o32 programs.
After the kernel issues were sorted out, I came up with this patch for
glibc. Ok to install?
Index: ChangeLog
from Alexandre Oliva <aoliva at redhat dot com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (struct flock): Adjust
for n64 abi.
Index: sysdeps/unix/sysv/linux/mips/bits/fcntl.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/bits/fcntl.h,v
retrieving revision 1.16
diff -u -p -r1.16 fcntl.h
--- sysdeps/unix/sysv/linux/mips/bits/fcntl.h 6 Jul 2001 04:56:18 -0000 1.16
+++ sysdeps/unix/sysv/linux/mips/bits/fcntl.h 3 Apr 2003 20:29:28 -0000
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -142,14 +143,20 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
- long int l_sysid; /* XXX */
+#if ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ fcntls in o32 and n32, never has this field. */
+ long int l_sysid;
+#endif
#else
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
-#ifndef __USE_FILE_OFFSET64
- long int pad[4]; /* XXX */
+#if ! defined __USE_FILE_OFFSET64 && ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ flock in o32 and n32, never has this field. */
+ long int pad[4];
#endif
} flock_t;
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer