/* ================================================== */
+int
+LCL_CanSystemLeap(void)
+{
+ return drv_set_leap ? 1 : 0;
+}
+
+/* ================================================== */
+
void
LCL_SetSystemLeap(int leap)
{
to a timezone problem. */
extern int LCL_MakeStep(void);
+/* Check if the system driver supports leap seconds, i.e. LCL_SetSystemLeap
+ does something */
+extern int LCL_CanSystemLeap(void);
+
/* Routine to set the system clock to correct itself for a leap second if
supported. Leap second will be inserted at the end of the day if the
argument is positive, deleted if negative, and zero resets the setting. */
leap_timer_running = 0;
leap_in_progress = 0;
leap_mode = CNF_GetLeapSecMode();
+ /* Switch to step mode if the system driver doesn't support leap */
+ if (leap_mode == REF_LeapModeSystem && !LCL_CanSystemLeap())
+ leap_mode = REF_LeapModeStep;
leap_tzname = CNF_GetLeapSecTimezone();
if (leap_tzname) {