Scripsit "Paul D. Smith" <[EMAIL PROTECTED]> > %% [EMAIL PROTECTED] (Paul Jarc) writes: > pj> "Paul D. Smith" <[EMAIL PROTECTED]> wrote:
> >> Hm. However, I can't think of any way to write a configure test on > >> whether or not time_t is signed or unsigned. > pj> if ((time_t)-1<(time_t)0) signed(); else unsigned(); > Not bad but this requires being able to run a program. This is a no-no > if you want your app to be cross-compilable. How about trying to just compile this source file: #include <time.h> #define IS_SIGNED ((time_t)-1 < (time_t)0) int foo [ 1 - 2*IS_SIGNED ] = { 42 }; If time_t is signed, the C compiler ought to refuse to compile it because the array bound will be negative. Of course it won't help in environments where the compiler returns no useful success/failure state to the configure scripts. But in such an environment even the vanilla autoconf tests will have trouble. -- Henning Makholm "First chapter, the plot advances, second chapter, Ayla makes a discovery that significantly enhances Palaeolithic technology, third chapter, Ayla has sex with someone, and repeat ad infinitum." _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make