fix msvc build
							parent
							
								
									87ed442d9e
								
							
						
					
					
						commit
						3c5087902d
					
				|  | @ -14,6 +14,7 @@ CommonCHeaders = ' | ||||||
| #ifndef _WIN32 | #ifndef _WIN32 | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
| #include <locale.h> // tolower | #include <locale.h> // tolower | ||||||
|  | #include <sys/time.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifdef __APPLE__ | #ifdef __APPLE__ | ||||||
|  |  | ||||||
|  | @ -14,7 +14,6 @@ const ( | ||||||
| 
 | 
 | ||||||
| $if !windows { | $if !windows { | ||||||
| #include <unistd.h> // sleep	 | #include <unistd.h> // sleep	 | ||||||
| #include <sys/time.h> |  | ||||||
| //#include <sys/wait.h>
 | //#include <sys/wait.h>
 | ||||||
| /// ^^^^ including this makes the windows build fail.
 | /// ^^^^ including this makes the windows build fail.
 | ||||||
| } | } | ||||||
|  | @ -367,10 +366,10 @@ pub fn (t Time) relative() string { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| pub fn day_of_week(y, m, d int) int { | pub fn day_of_week(y, m, d int) int { | ||||||
| 	// Sakomotho's algorithm is explained here: 
 | 	// Sakomotho's algorithm is explained here:
 | ||||||
| 	// https://stackoverflow.com/a/6385934
 | 	// https://stackoverflow.com/a/6385934
 | ||||||
| 	t := [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4] | 	t := [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4] | ||||||
| 	mut sy := y  | 	mut sy := y | ||||||
| 	if (m < 3) { | 	if (m < 3) { | ||||||
| 		sy = sy - 1 | 		sy = sy - 1 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue