shithub: drawterm

Download patch

ref: 47d5080818787c8614404ee0241a5858a69b8e2e
parent: 0ff7b38794bb308ff745847de05388718131d367
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 19 02:59:55 EST 2016

libc: rename dysize() to not conflict on unix

--- a/libc/ctime.c	Fri Feb 19 02:54:43 2016
+++ b/libc/ctime.c	Fri Feb 19 02:59:55 2016
@@ -44,8 +44,16 @@
  * change.
  */
 
-static	int	dysize(int);
+#define dysize _dysize	/* conflicts on unix */
 
+static int
+dysize(int y)
+{
+
+	if(y%4 == 0 && (y%100 != 0 || y%400 == 0))
+		return 366;
+	return 365;
+}
 
 Tm*
 gmtime(long tim)
@@ -108,11 +116,3 @@
 	return &xtime;
 }
 
-static int
-dysize(int y)
-{
-
-	if(y%4 == 0 && (y%100 != 0 || y%400 == 0))
-		return 366;
-	return 365;
-}