shithub: drawterm

Download patch

ref: 47d5080818787c8614404ee0241a5858a69b8e2e
parent: 0ff7b38794bb308ff745847de05388718131d367
author: cinap_lenrek <[email protected]>
date: Fri Feb 19 03:59:55 EST 2016

libc: rename dysize() to not conflict on unix

--- a/libc/ctime.c
+++ b/libc/ctime.c
@@ -44,9 +44,17 @@
  * 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;
-}