FreeBSD/contrib/ntp/ntpd/ntp_leapsec.c
/* ---------------------------------------------------------------------
 * GCC is rather sticky with its 'const' attribute. We have to do it more
 * explicit than with a cast if we want to get rid of a CONST qualifier.
 * Greetings from the PASCAL world, where casting was only possible via
 * untagged unions...
 */
GCC is rather sticky with its 'const' attribute. We have to do it more
explicit than with a cast if we want to get rid of a CONST qualifier.
Greetings from the PASCAL world, where casting was only possible via
untagged unions
GCC is rather sticky with its ' const ' attribute . We have to do it more explicit than with a cast if we want to get rid of a CONST qualifier . Greetings from the PASCAL world where casting was only possible via untagged unions
static inline void*
noconst(
	const void* ptr
	)
{
	union {
		const void * cp;
		void *       vp;
	} tmp;
	tmp.cp = ptr;
	return tmp.vp;
}
static inline void * noconst ( const void * ptr ) { union { const void * cp ; void * vp ; } tmp ; tmp . cp = ptr ; return tmp . vp ; }
GCC is rather sticky with its 'const' attribute.
GCC is rather sticky with its ' const ' attribute .