[Aldor-l] patch: obsolete POSIX name for CLOCKS_PER_SEC
Stephen Watt
watt at scl.csd.uwo.ca
Fri Aug 24 05:29:09 EDT 2007
Thank you Bill.
Do you believe that we should use CLOCKS_PER_SEC pervasively instead?
-- Stephen
On Fri, Aug 24, 2007 at 02:02:06AM -0400, Bill Page wrote:
> Laurentiu,
>
> Here is perhaps the first user contributed patch for the
> soon-to-be-released version of Open Source Aldor:
>
> On openSuSE Linux 10.2 apparently the old POSIX name for the clock
> ticks per second constant is no longer supported in the standard
> system header files. As a result the build of the compiler fails early
> in the process with the name HZ undefined.
>
> The following patch defines the necessary constant in terms of another
> header file.
>
> cvs diff: Diffing aldor/src
> Index: aldor/src/os_unix.c
> ===================================================================
> RCS file: /local/cvsroot/aldor/aldor/src/os_unix.c,v
> retrieving revision 1.3
> diff -r1.3 os_unix.c
> 175a176,182
> > /* This defines CLOCKS_PER_SEC, which is the number of processor clock
> > ticks per second. */
> > /* This is the obsolete POSIX.1-1988 name for the same constant. */
> > #ifndef CLK_TCK
> > # include <bits/time.h>
> > # define CLK_TCK CLOCKS_PER_SEC
> > #endif
>
> --------
>
> I have successfully built Aldor with this change on openSuSE 10.2. I
> think this patch should not cause problems on other systems where the
> old name is still used but I have not tested it on any other systems.
> If you agree the patch is ok, I can check it in to CVS.
>
> Note: I have just updated 'README.developers' in CVS to mention
> Berkeley Yacc as a dependency as agreed during the workshop on
> Thursday.
>
> Regards,
> Bill Page.
> _______________________________________________
> Aldor-l mailing list
> Aldor-l at aldor.org
> http://www.aldor.org/mailman/listinfo/aldor-l
More information about the Aldor-l
mailing list