Re: __TIME_MIN/__TIME_MAX

From: Terry Lambert (tlambert2_at_mindspring.com)
Date: 11/15/03

  • Next message: Doug White: "Re: 64-bit time_t on sparc64, epilogue(?)"
    Date: Sat, 15 Nov 2003 14:37:03 -0800
    To: "Jacques A. Vidrine" <nectar@FreeBSD.org>
    
    

    "Jacques A. Vidrine" wrote:
    > 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.

    XSI: time_t and clock_t shall be integer or real-floating types.

    The range should be derived from th type. Defining separate values
    outside the implementation namespace might be OK, but keeping those
    values synchronized with the size_t is likely to be painful for
    years to come.

    -- Terry
    _______________________________________________
    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: Doug White: "Re: 64-bit time_t on sparc64, epilogue(?)"

    Relevant Pages

    • Re: HEADS UP: libkse -> libpthread switch
      ... On Fri, Jan 30, 2004, Scott Long wrote: ... > Jacques A. Vidrine wrote: ... > We certainly are not going to ship 5.3 like this. ...
      (freebsd-current)
    • Re: FreeBSD Security Advisory FreeBSD-SA-03:08.realpath
      ... But OpenSSH as bundled with FreeBSD uses realpathfrom libc, ... Jacques Vidrine. ... FreeBSD UNIX ...
      (FreeBSD-Security)
    • Re: latest openssl vulnerability
      ... > Jacques A. Vidrine wrote: ... the bug is in libssl. ... > Lev Walkin ...
      (FreeBSD-Security)
    • RE: 40% slowdown with dynamic /bin/sh
      ... Jacques A. Vidrine wrote: ... We can also expend our efforts ... > to improve dynamic linking performance, ...
      (freebsd-current)
    • Re: Renesis Project
      ... I didn't see that, nice catch Jacques;) ... So I guess this means that it will only be available as a DLL for us, Delphi ... Platforms, Unix Platforms and mobile platforms like ... > EvolGrafiX is intend to use Anti-Grain ...
      (borland.public.delphi.non-technical)