bugThe GNU Hurd - Bugs: bug #18216, glibc: `struct stat' et al.

 
 

bug #18216: glibc: `struct stat' et al.

Submitted by:  Thomas Schwinge <tschwinge>
Submitted on:  Mon 06 Nov 2006 04:30:30 PM UTC  
 
Category: glibcSeverity: 5 - Blocker
Priority: 9 - ImmediateItem Group: Standard Compliance
Status: FixedPrivacy: Public
Assigned to: Roland McGrath <roland>Originator Name: 
Open/Closed: ClosedReproducibility: Every Time
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 05 Dec 2006 04:01:48 PM UTC, comment #2:

It's appears to be just a matter of copy and paste that new timestamp stuff, since there is no other use of that st_atim or st_atime inside the sysdeps stuff.

Leonardo Lopes Pereira <llp>
Mon 06 Nov 2006 04:42:08 PM UTC, comment #1:

Thomas Schwinge, le Mon 06 Nov 2006 16:30:31 +0000, a écrit :

> ../sysdeps/posix/getaddrinfo.c: In function 'gaiconf_init':
> ../sysdeps/posix/getaddrinfo.c:1798: error: 'struct stat64' has no member
> named 'st_mtim'


This is generic code, so I guess all stat64 structures need fixed the
linuxish way, hence Hurd's too.

Samuel Thibault <sthibaul>
Project Member
Mon 06 Nov 2006 04:30:30 PM UTC, original submission:

Building trunk versions of glibc fails (apart from other issues) like this:

#v+
i586-pc-gnu-gcc ../sysdeps/posix/getaddrinfo.c [...]
../sysdeps/posix/getaddrinfo.c: In function 'gaiconf_init':
../sysdeps/posix/getaddrinfo.c:1798: error: 'struct stat64' has no member named 'st_mtim'
../sysdeps/posix/getaddrinfo.c: In function 'gaiconf_reload':
../sysdeps/posix/getaddrinfo.c:1819: error: 'struct stat64' has no member named 'st_mtim'
../sysdeps/posix/getaddrinfo.c: In function 'getaddrinfo':
../sysdeps/posix/getaddrinfo.c:2007: error: used struct type value where scalar is required
#v-

I extracted the following relevant (at least for this issue) differences for `struct stat' and `struct stat64':

Hurd:

#v+
__time_t st_atime; /* Access time, seconds */
unsigned long int st_atime_usec; /* and microseconds. */
__time_t st_mtime; /* Modification time, seconds */
unsigned long int st_mtime_usec; /* and microseconds. */
__time_t st_ctime; /* Status change time, seconds */
unsigned long int st_ctime_usec; /* and microseconds. */
#v-

Linux:

#v+
#ifdef __USE_MISC
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
identifier 'timespec' to appear in the <sys/stat.h> header.
Therefore we have to handle the use of this header in strictly
standard-compliant sources special. */
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# define st_atime st_atim.tv_sec /* Backward compatibility. */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
#else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
#endif
[...]
#define _STATBUF_ST_RDEV
/* Nanosecond resolution time values are supported. */
#define _STATBUF_ST_NSEC
#v-

Thomas Schwinge <tschwinge>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tschwinge (Updated the item)
  • -unavailable- added by llp (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 May 2012 04:33:55 AM UTCtschwingeStatusIn Progress=>Fixed
      Assigned totschwinge=>roland
      Open/ClosedOpen=>Closed
    Sun 23 Nov 2008 07:03:15 PM UTCtschwingeStatusFixed=>In Progress
      Open/ClosedClosed=>Open
      Wiki-like text discussion boxIf I remember correctly, I fixed this some time ago already.=>
    Tue 08 Jul 2008 08:56:52 AM UTCtschwingeStatusNone=>Fixed
      Assigned toNone=>tschwinge
      Open/ClosedOpen=>Closed
      Wiki-like text discussion box=>If I remember correctly, I fixed this some time ago already.

    Back to the top


    Powered by Savane 3.1-cleanup1