__TIME_MIN/__TIME_MAX

From: Jacques A. Vidrine (nectar_at_FreeBSD.org)
Date: 11/14/03

  • Next message: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"
    Date: Fri, 14 Nov 2003 13:41:19 -0600
    To: freebsd-arch@freebsd.org
    
    

    In at least one place in libc, it is necessary to range check a time_t
    value. One most platforms, time_t has the same range as `int', but
    on at least amd64, it has a larger range. Any objections to adding
    definitions of __TIME_MIN and __TIME_MAX to sys/${arch}/_limits.h?

    I could just do the usual check for lossage after casting, except that
    in theory time_t could be a floating-point value (but not in reality
    in FreeBSD). It seems cleaner to me to have an explicit range.

    Cheers,

    -- 
    Jacques Vidrine   NTT/Verio SME      FreeBSD UNIX       Heimdal
    nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Bruce Evans: "Re: __TIME_MIN/__TIME_MAX"