gcc/fixincludes/tests/base/time.h
Olivier Hainque 943fad6702 Add VxWorks fixincludes hack, #include sysLib.h in time.h
Make sure there is a visible prototype of sysClkRateGet() when
CLOCKS_PER_SEC is #defined to that in time.h for VxWorks.  This
would typically be provided by sysLib.h.

2021-01-10  Olivier Hainque  <hainque@adacore.com>

	* inclhack.def (vxworks_time_h_syslib): New hack.
	* tests/base/time.h: Update.
	* fixincl.x: Regenerate.
2022-01-16 09:22:14 +00:00

43 lines
933 B
C

/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/time.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( VXWORKS_NEEDS_VXTYPES_CHECK )
unsigned int _clocks_per_sec;
#endif /* VXWORKS_NEEDS_VXTYPES_CHECK */
#if defined( VXWORKS_TIME_CHECK )
#ifndef __gcc_VOIDFUNCPTR_defined
#ifdef __cplusplus
typedef void (*__gcc_VOIDFUNCPTR) (...);
#else
typedef void (*__gcc_VOIDFUNCPTR) ();
#endif
#define __gcc_VOIDFUNCPTR_defined
#endif
#define VOIDFUNCPTR __gcc_VOIDFUNCPTR
#endif /* VXWORKS_TIME_CHECK */
#if defined( VXWORKS_TIME_H_SYSLIB_CHECK )
/* kernel header pattern: */
#include <vxWorks.h>
#include <sysLib.h>
/* rtp header pattern: */
#ifndef _YVALS
#include <yvals.h>
#endif /* _YVALS */
#include <sysLib.h>
#define CLOCKS_PER_SEC sysClkRateGet()
#endif /* VXWORKS_TIME_H_SYSLIB_CHECK */