Fossil SCM
For strtoll() with Visual Studio prior to MSVS 2013, fallback to _strtoi64().
Commit
d626ddb55490c5a560c7c55682b0892c22bcabe713c33075fb968ce2a2406432
Parent
0cb6e03443f9698…
1 file changed
+4
+4
| --- src/mkversion.c | ||
| +++ src/mkversion.c | ||
| @@ -38,10 +38,14 @@ | ||
| 38 | 38 | #include <stdio.h> |
| 39 | 39 | #include <string.h> |
| 40 | 40 | #include <stdlib.h> |
| 41 | 41 | #include <ctype.h> |
| 42 | 42 | #include <time.h> |
| 43 | + | |
| 44 | +#if defined(_MSC_VER) && (_MSC_VER < 1800) /* MSVS 2013 */ | |
| 45 | +# define strtoll _strtoi64 | |
| 46 | +#endif | |
| 43 | 47 | |
| 44 | 48 | static FILE *open_for_reading(const char *zFilename){ |
| 45 | 49 | FILE *f = fopen(zFilename, "r"); |
| 46 | 50 | if( f==0 ){ |
| 47 | 51 | fprintf(stderr, "cannot open \"%s\" for reading\n", zFilename); |
| 48 | 52 |
| --- src/mkversion.c | |
| +++ src/mkversion.c | |
| @@ -38,10 +38,14 @@ | |
| 38 | #include <stdio.h> |
| 39 | #include <string.h> |
| 40 | #include <stdlib.h> |
| 41 | #include <ctype.h> |
| 42 | #include <time.h> |
| 43 | |
| 44 | static FILE *open_for_reading(const char *zFilename){ |
| 45 | FILE *f = fopen(zFilename, "r"); |
| 46 | if( f==0 ){ |
| 47 | fprintf(stderr, "cannot open \"%s\" for reading\n", zFilename); |
| 48 |
| --- src/mkversion.c | |
| +++ src/mkversion.c | |
| @@ -38,10 +38,14 @@ | |
| 38 | #include <stdio.h> |
| 39 | #include <string.h> |
| 40 | #include <stdlib.h> |
| 41 | #include <ctype.h> |
| 42 | #include <time.h> |
| 43 | |
| 44 | #if defined(_MSC_VER) && (_MSC_VER < 1800) /* MSVS 2013 */ |
| 45 | # define strtoll _strtoi64 |
| 46 | #endif |
| 47 | |
| 48 | static FILE *open_for_reading(const char *zFilename){ |
| 49 | FILE *f = fopen(zFilename, "r"); |
| 50 | if( f==0 ){ |
| 51 | fprintf(stderr, "cannot open \"%s\" for reading\n", zFilename); |
| 52 |