This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ppc64 changes common powerpc/bits headers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Munroe wrote:
ARM standalone systems
> diff -rupPN libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h
> --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h	Thu Jul  5 23:56:19 2001
> +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h	Tue Sep 24 09:52:42 2002
> @@ -48,10 +48,17 @@ struct ipc_perm
>      __uid_t cuid;		/* Creator's user ID.  */
>      __gid_t cgid;		/* Creator's group ID.  */
>      __mode_t mode;		/* Read/write permission.  */
> +#if __WORDSIZE == 32
>      unsigned long int __seq;	/* Sequence number.  */
>      unsigned int __pad1;
>      unsigned long long int __unused1;
>      unsigned long long int __unused2;
> +#else
> +    unsigned int __seq;		/* Sequence number.  */
> +    unsigned int __pad1;
> +    unsigned long int __unused1;
> +    unsigned long int __unused2;
> +#endif
>    };

No need for the #ifdef.  The fields have the same size so use __uintXX_t.


>  
>  
> diff -rupPN libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/msq.h libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
> --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/msq.h	Thu Jul  5 23:56:19 2001
> +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/msq.h	Fri Sep 27 10:44:30 2002
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
> +/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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
> @@ -38,11 +38,17 @@ typedef unsigned long int msglen_t;
>  struct msqid_ds
>  {
>    struct ipc_perm msg_perm;    /* structure describing operation permission */
> +#if __WORDSIZE == 32
>    unsigned int __unused1;
> +#endif
>    __time_t msg_stime;          /* time of last msgsnd command */
> +#if __WORDSIZE == 32
>    unsigned int __unused2;
> +#endif
>    __time_t msg_rtime;          /* time of last msgrcv command */
> +#if __WORDSIZE == 32
>    unsigned int __unused3;
> +#endif

That's stupid.  The unused field is meant to be used for sub-second
information.  There is (fortunately) again discussion about adding
support to the kernel.  You'd shut out ppc64 of this, doomed to live
with full second numbers.



> diff -rupPN libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/sem.h libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/sem.h
> --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/sem.h	Thu Jul  5 23:56:19 2001
> +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/sem.h	Fri Sep 27 10:45:18 2002
> @@ -1,4 +1,5 @@
> -/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
> +/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002 
> +   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
> @@ -39,9 +40,13 @@
>  struct semid_ds
>  {
>    struct ipc_perm sem_perm;            /* operation permission struct */
> +#if __WORDSIZE == 32
>    unsigned int __unused1;
> +#endif
>    __time_t sem_otime;                  /* last semop() time */
> +#if __WORDSIZE == 32
>    unsigned int __unused2;
> +#endif

Ditto.


> diff -rupPN libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/shm.h libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
> --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/bits/shm.h	Fri Aug 23 17:26:25 2002
> +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/bits/shm.h	Tue Sep 24 10:21:15 2002
> @@ -47,13 +47,21 @@ typedef unsigned long int shmatt_t;
>  struct shmid_ds
>    {
>      struct ipc_perm shm_perm;          /* operation permission struct */
> +#if __WORDSIZE == 32
>      unsigned int __unused1;
> +#endif
>      __time_t shm_atime;                        /* time of last shmat() */
> +#if __WORDSIZE == 32
>      unsigned int __unused2;
> +#endif
>      __time_t shm_dtime;                        /* time of last shmdt() */
> +#if __WORDSIZE == 32
>      unsigned int __unused3;
> -    __time_t shm_ctime;                        /* time of last change by shmctl() */
> +#endif
> +    __time_t shm_ctime;			/* time of last change by shmctl() */
> +#if __WORDSIZE == 32
>      unsigned int __unused4;
> +#endif

And again.



> +#if __WORDSIZE == 32
> +#define _STATVFSBUF_F_UNUSED
> +#endif

Wrong indentation of the second line.


> diff -rupPN libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat.c libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat.c
> --- libc23-cvstip-20020923/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat.c	Wed Dec 31 18:00:00 1969
> +++ libc23-ppc64-stat/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat.c	Thu Sep 26 14:34:43 2002
> @@ -0,0 +1,45 @@
> +/* fxstat using old-style Unix fstat system call.
> +   Copyright (C) 1991,95,96,97,98,2000,2002 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
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, write to the Free
> +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> +   02111-1307 USA.  */
> +
> +/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
> +   will complain since they don't strictly match.  */
> +#define __fxstat64 __fxstat64_disable
> +
> +#include <errno.h>
> +#include <stddef.h>
> +#include <sys/stat.h>
> +
> +#include <sysdep.h>
> +#include <sys/syscall.h>
> +#include <bp-checks.h>
> +
> +extern int __syscall_fstat (int, struct stat *__unbounded);
> +
> +/* Get information about the file FD in BUF.  */
> +int
> +__fxstat (int vers, int fd, struct stat *buf)
> +{
> +  return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 (buf));
> +}

This is wrong.  Use the standard Linux versions.  The vers attribute
must be honored.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9lKY22ijCOnn/RHQRAllmAJ9Kg5nfMbaZjbdlaJafpheS1g7AzACdH8sP
3qp1Uw0OJgti/gtBgonnDUs=
=PFXm
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]