From: Tanaka Akira Date: 2009-01-28T16:44:25+09:00 Subject: [ruby-core:21630] Re: UID Too Big, A Bug? In article <21700802.post@talk.nabble.com>, Brent Roman writes: > It's not just OSx that does this. > I've seen it with Linux 2.6 as well. > > These kernels allow *signed* 32-bit UIDs and GIDs. GNU/Linux userland defines uid_t as unsigned int. /usr/include/bits/types.h: __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ /usr/include/bits/typesizes.h: #define __UID_T_TYPE __U32_TYPE /usr/include/bits/types.h: #define __U32_TYPE unsigned int > This looks like a bug in Ruby to me. Maybe. POSIX defines them as integer types. + nlink_t, uid_t, gid_t, and id_t shall be integer types. It doesn't specify signedness. It may be signed, may be unsigned. When POSIX spcifies signedness, it specifies explicitly. + blkcnt_t and off_t shall be signed integer types. + size_t shall be an unsigned integer type. -- Tanaka Akira