several more bugs found by coreutils

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Feb 2 10:02:00 GMT 2005


This is newlib schtuff, so I CCd the newlib mailing list.

On Feb  1 20:58, Erik Blake wrote:
> Further coreutils-5.3.0 debugging turned up more POSIX bugs in cygwin:
> 
> <pwd.h> defines struct passwd with the pw_uid and pw_gid members as ints, although POSIX requires uid_t and gid_t.
> http://www.opengroup.org/onlinepubs/009695399/basedefs/dirent.h.html

include/pwd.h is a newlib file.  However, I was pretty happy that pw_uid
and pw_gid were defined as int, when we changed uids and gids from 16 to
32 bits.  It was the one file which wasn't necessary to change.

We could just redefine struct passwd to use uid_t and gid_t, but this
would break (very very very very unlikely) builds of Cygwin using
sources of versions before 1.5.0.  In other words, old Cygwin sources
using 16 bit uids/gids would go down hell.

Personally, I think I can live with that, but I would like to hear if
there's any good reason to build historic versions (say, b20) with a
recent newlib.

> <sys/time.h> defines utimes with non-const second parameter, although POSIX requires it to be const; likewise for utime in <utime.h> (deferred to <sys/utime.h>).  Additionally, both utimes() and utime() are required to touch file ctime on success.
> http://www.opengroup.org/onlinepubs/009695399/functions/utimes.html
> [snip]

That should be easy to change in sys/time.h.
As far as the implementation of utime/utimes is affected, I already
changed it to set st_ctime.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list