Marcus Brinkmann <[EMAIL PROTECTED]> writes:

> On Thu, Aug 09, 2001 at 04:26:30PM +0530, Nikunj A. Dadhania wrote:
> > Marcus Brinkmann <[EMAIL PROTECTED]> writes:
> > 
> > 
> > hi
> > > 
> > > stat
> > > some structure/header confusion
> > 
> > can i make changes in /include/bits/types.h to make stat work...
> > if yes then i will send the patch.
> 
> Most certainly not, but sometimes yes.  You need to explain to us which
> changes you want to make and, more important, why.  In other words, what is
> missing in that file, and how is this used in the application?

There is a member of stat structure fsid. its declared as
   typedef __u_quad_t __fsid_t; /* Type of file system IDs.  */

and __u_quad_t is declared as 

   #ifdef __GNUC__
   typedef unsigned long long int __u_quad_t;
   typedef long long int __quad_t;
   #else
   typedef struct
   {
     long __val[2];
   } __quad_t;
   typedef struct
   {
     __u_long __val[2];
   } __u_quad_t;
   #endif
 
Now stat uses fsid.__val[0]. so while compiling stat says that fsid.__val[0] 
not the member of the structure.

I checked the /usr/include/bits/types.h of GNU/Linux and I saw that fsid is 
declared independently as

   typedef struct
   {
     __u_long __val[2];
   } __fsid_t;

so I made a similar change in /include/bits/types.h. 
Is this ok?


Thanks
nikunj


Reply via email to