autoconf
[Top][All Lists]
Advanced

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

Re: determine base type of a typedef


From: Paul Eggert
Subject: Re: determine base type of a typedef
Date: Fri, 23 Oct 2020 10:16:53 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 10/22/20 6:09 PM, Russell Shaw wrote:
else if(sizeof(time_t) == sizeof(long int)) {

This is not the right kind of test. You want to test whether time_t and int are the same types, not whether they're the same size. To do that, you should use code like this:

extern time_t foo;
extern long int foo;

Of course this means you'll need to compile N programs rather than one, but that's life in the big Autoconf city.



reply via email to

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