--- ./parsetime.orig.y
+++ ./parsetime.y
@@ -24,6 +24,11 @@
 extern int yylex();
 
 int add_date(int number, int period);
+
+#ifndef __isleap
+#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
+#endif
+
 %}
 
 %union {