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 utmp changes


Steven Munroe Wrote on 09/24/02 09:48 AM:

> Roland McGrath writes:
>
> > As Jakub pointed out, `struct timeval32' is a name space problem.  I
would
> > really like to avoid adding new published types with kludge names (even
> > when prefixed by __ to avoid standard name space issues).  Is there any
> > other place that might use struct timeval32?  Would it work to just
make it
> > an anonymous struct inside struct utmp/utmpx?
>
> Only utmp/utmpx so far in glibc. However other packages may have a
similar
> problem and will look to glibc for how to solve it.
>
> For the known problem (utmp/utmpx) an anonymous struct should work.

Roland any more thoughts on this topic. I need to get this resolved soon.

I would prefer to define __timeval32 (or __timeval_32t) since there are at
least two places (structs utmp and utmpx) that need it.

But it also seems to work with the following in utmp/utmpx:

#if __WORDSIZE == 64
  struct
  {
    __int32_t tv_sec;         /* Seconds.  */
    __int32_t tv_usec;  /* Microseconds.  */
  } ut_tv; /* Time entry was made.  */
#else
  struct timeval ut_tv;     /* Time entry was made.  */
#endif

Please let me know which you would prefer.



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