Define CLOCKS_PER_SEC.

Define CLK_TCK only if _ANSI_SOURCE is not defined.

Don't include <machine/limits.h> to get the definition of CLK_TCK.
CLK_TCK should never have been defined there, and the inclusion
polluted the namespace.
This commit is contained in:
Bruce Evans 1995-02-03 21:47:48 +00:00
parent 125bd0c85c
commit 339b0f68f2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6164

View File

@ -43,6 +43,17 @@
#include <machine/ansi.h>
#ifndef _ANSI_SOURCE
/*
* Frequency of the clock ticks reported by times(). Deprecated - use
* sysconf(_SC_CLK_TCK) instead.
*/
#define CLK_TCK _BSD_CLOCKS_PER_SEC_
#endif
/* Frequency of the clock ticks reported by clock(). */
#define CLOCKS_PER_SEC _BSD_CLOCKS_PER_SEC_
#ifndef NULL
#define NULL 0
#endif
@ -76,8 +87,6 @@ struct tm {
char *tm_zone; /* timezone abbreviation */
};
#include <machine/limits.h> /* Include file containing CLK_TCK. */
#include <sys/cdefs.h>
__BEGIN_DECLS