This is the mail archive of the libc-alpha@sourceware.org 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: Add x86_64/bits/statfs.h


On Wed, May 16, 2012 at 1:09 PM, Roland McGrath <roland@hack.frob.com> wrote:
> Why can't you just change the existing file to use __syscall_slong_t?
> Isn't that the point of that typedef?

The diff is

--- sysdeps/unix/sysv/linux/bits/statfs.h	2012-05-16 12:41:35.480985769 -0700
+++ sysdeps/unix/sysv/linux/x86_64/bits/statfs.h	2012-05-16
12:41:57.094888609 -0700
@@ -23,8 +23,8 @@

 struct statfs
   {
-    __SWORD_TYPE f_type;
-    __SWORD_TYPE f_bsize;
+    __syscall_slong_t f_type;
+    __syscall_slong_t f_bsize;
 #ifndef __USE_FILE_OFFSET64
     __fsblkcnt_t f_blocks;
     __fsblkcnt_t f_bfree;
@@ -39,27 +39,27 @@ struct statfs
     __fsfilcnt64_t f_ffree;
 #endif
     __fsid_t f_fsid;
-    __SWORD_TYPE f_namelen;
-    __SWORD_TYPE f_frsize;
-    __SWORD_TYPE f_flags;
-    __SWORD_TYPE f_spare[4];
+    __syscall_slong_t f_namelen;
+    __syscall_slong_t f_frsize;
+    __syscall_slong_t f_flags;
+    __syscall_slong_t f_spare[4];
   };

 #ifdef __USE_LARGEFILE64
 struct statfs64
   {
-    __SWORD_TYPE f_type;
-    __SWORD_TYPE f_bsize;
+    __syscall_slong_t f_type;
+    __syscall_slong_t f_bsize;
     __fsblkcnt64_t f_blocks;
     __fsblkcnt64_t f_bfree;
     __fsblkcnt64_t f_bavail;
     __fsfilcnt64_t f_files;
     __fsfilcnt64_t f_ffree;
     __fsid_t f_fsid;
-    __SWORD_TYPE f_namelen;
-    __SWORD_TYPE f_frsize;
-    __SWORD_TYPE f_flags;
-    __SWORD_TYPE f_spare[4];
+    __syscall_slong_t f_namelen;
+    __syscall_slong_t f_frsize;
+    __syscall_slong_t f_flags;
+    __syscall_slong_t f_spare[4];
   };
 #endif

It is __SWORD_TYPE, not __SLONGWORD_TYPE.  It doesn't
make a difference for x86/x32/x86-64.  But I don't know if it is
true for all archs.



-- 
H.J.


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