info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-mtools] mtools-pre-4.0.20.tar.gz


From: Alain Knaff
Subject: Re: [Info-mtools] mtools-pre-4.0.20.tar.gz
Date: Sun, 18 Nov 2018 22:37:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0


On 18/11/2018 21:53, Chris Lamb wrote:
> Alain Knaff wrote:
> 
>> #if (SIZEOF_TIME_T > SIZEOF_LONG) && defined (HAVE_STRTOLL)
>> # define STRTOTIME strtoll
>> #else
>> # define STRTOTIME strtol
>> #endif
> 
> Could you explain why the conditional here?

if time_t doesn't fit into long and if we have strtoll, use strtoll,
otherwise use strtol.

Reason:
 - the first part translates need. We want to use the more "exotic"
strtoll only if there is actual need.
 - the second part translates availability. We can only use strtoll if
it is available (although admittedly, a platform with 8 byte time_t
would likely also have strtoll. This is just a way of being "extra" careful)

I'm not really sure whether this is the explanation you are looking for,
or if you are after something else...


> 
> Although actually… I was wondering if you could do so on the mtools
> list itself?  I am sure there are others who would be interested in
> the answer and, of course, others that might be able to provide
> other advice.

Cc'ed to the list.

> 
> 
> Best wishes,
> 

Regards,

Alain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]