]> sourceware.org Git - glibc.git/commitdiff
Add x32 support to x86_64/bits/shm.h
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 16 May 2012 18:48:54 +0000 (11:48 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 May 2012 18:48:54 +0000 (11:48 -0700)
ChangeLog
sysdeps/unix/sysv/linux/x86_64/bits/shm.h

index efdbdd59e169d4dc74f3c51d6f647a8afaff28a8..28ca2d1c5ce27a0efbcf98d87ee83aeb96f36d48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/bits/shm.h (shmatt_t): Use
+       __syscall_ulong_t.
+       (shmid_ds): Add __unused1 and __unused2 only if __x86_64__ isn't
+       defined.  Use __syscall_ulong_t.
+       (shminfo): Use __syscall_ulong_t.
+       (shm_info): Likewise.
+
 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/unix/sysv/linux/x86_64/bits/sem.h (semid_ds): Use
index d95d544bd5f607e394ab69d835857f81bfc8e5fc..cba25ed25f1b8f1afab68548152e38ba9721eadb 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004, 2009
-   Free Software Foundation, Inc.
+/* Copyright (C) 1995-2012 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
@@ -44,7 +43,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
 
 
 /* Type to count number of attaches.  */
-typedef unsigned long int shmatt_t;
+typedef __syscall_ulong_t shmatt_t;
 
 /* Data structure describing a shared memory segment.  */
 struct shmid_ds
@@ -52,22 +51,22 @@ struct shmid_ds
     struct ipc_perm shm_perm;          /* operation permission struct */
     size_t shm_segsz;                  /* size of segment in bytes */
     __time_t shm_atime;                        /* time of last shmat() */
-#if __WORDSIZE == 32
+#ifndef __x86_64__
     unsigned long int __unused1;
 #endif
     __time_t shm_dtime;                        /* time of last shmdt() */
-#if __WORDSIZE == 32
+#ifndef __x86_64__
     unsigned long int __unused2;
 #endif
     __time_t shm_ctime;                        /* time of last change by shmctl() */
-#if __WORDSIZE == 32
+#ifndef __x86_64__
     unsigned long int __unused3;
 #endif
     __pid_t shm_cpid;                  /* pid of creator */
     __pid_t shm_lpid;                  /* pid of last shmop */
     shmatt_t shm_nattch;               /* number of current attaches */
-    unsigned long int __unused4;
-    unsigned long int __unused5;
+    __syscall_ulong_t __unused4;
+    __syscall_ulong_t __unused5;
   };
 
 #ifdef __USE_MISC
@@ -84,25 +83,25 @@ struct shmid_ds
 
 struct shminfo
   {
-    unsigned long int shmmax;
-    unsigned long int shmmin;
-    unsigned long int shmmni;
-    unsigned long int shmseg;
-    unsigned long int shmall;
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-    unsigned long int __unused3;
-    unsigned long int __unused4;
+    __syscall_ulong_t shmmax;
+    __syscall_ulong_t shmmin;
+    __syscall_ulong_t shmmni;
+    __syscall_ulong_t shmseg;
+    __syscall_ulong_t shmall;
+    __syscall_ulong_t __unused1;
+    __syscall_ulong_t __unused2;
+    __syscall_ulong_t __unused3;
+    __syscall_ulong_t __unused4;
   };
 
 struct shm_info
   {
     int used_ids;
-    unsigned long int shm_tot; /* total allocated shm */
-    unsigned long int shm_rss; /* total resident shm */
-    unsigned long int shm_swp; /* total swapped shm */
-    unsigned long int swap_attempts;
-    unsigned long int swap_successes;
+    __syscall_ulong_t shm_tot; /* total allocated shm */
+    __syscall_ulong_t shm_rss; /* total resident shm */
+    __syscall_ulong_t shm_swp; /* total swapped shm */
+    __syscall_ulong_t swap_attempts;
+    __syscall_ulong_t swap_successes;
   };
 
 #endif /* __USE_MISC */
This page took 0.116828 seconds and 5 git commands to generate.