Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 2 Feb 2005 13:42:30 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com, newlib@sources.redhat.com
Subject: Re: several more bugs found by coreutils
Message-ID: <20050202184230.GD18260@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com, newlib@sources.redhat.com
References: <020120052058.2301.41FFED5A000D5EEC000008FD22007614380A050E040D0C079D0A@comcast.net> <20050202100718.GA7767@cygbert.vinschen.de> <4200DE19.70504@byu.net> <20050202142001.GI31117@cygbert.vinschen.de> <20050202172040.GL16117@trixie.casa.cgf.cx> <20050202174942.GO31117@cygbert.vinschen.de> <20050202181358.GA18260@trixie.casa.cgf.cx> <20050202183043.GR31117@cygbert.vinschen.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050202183043.GR31117@cygbert.vinschen.de>
User-Agent: Mutt/1.4.1i

On Wed, Feb 02, 2005 at 07:30:43PM +0100, Corinna Vinschen wrote:
>On Feb  2 13:13, Christopher Faylor wrote:
>> On Wed, Feb 02, 2005 at 06:49:42PM +0100, Corinna Vinschen wrote:
>> >On Feb  2 12:20, Christopher Faylor wrote:
>> >> On Wed, Feb 02, 2005 at 03:20:01PM +0100, Corinna Vinschen wrote:
>> >> >  #if defined (__CYGWIN__) && !defined (__CYGWIN_USE_BIG_TYPES__)
>> >> >  #define __pw_uid_t int
>> >> >  #endif
>> >> >  #ifndef __pw_uid_t
>> >> >  #define __pw_uid_t uid_t;
>> >> >  #endif
>> >> >
>> >> >  struct passwd {
>> >> >    char *pw_name;
>> >> >    char *pw_passwd;
>> >> >    __pw_uid_t pw_uid;
>> >> >    __pw_gid_t pw_gid;
>> >> >    [etc].
>> >> >
>> >> >Would that be ok, Jeff?
>> >> 
>> >> Why not just make __pw_uid_t a typedef?
>> >
>> >Defined where?
>> 
>> In pwd.h:
>> 
>>   #ifndef __CYGWIN__ || !defined(__CYGWIN_USE_BIG_TYPES__)
>>   typedef int __pw_uid_t;
>>   #else
>>   typedef uid_t __pw_uid_t;
>>   endif
>
>Fine with me.  I don't see a difference, though.  What's the advantage
>of having another type?

It's a preference.  I don't like using defines for types. OTOH, you could
use a #undef after #define'ing the __pwd_uid_t and then there would be
no subsequent namespace bloat.

So, actually, nevermind.  I think I'd prefer a #define followed by a #undef
for that reason.

cgf

--
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/

