Fossil SCM
Fix more compilation issues with MSVC.
Commit
0039d32b88de5a68b5071404790852ca3ca03a77
Parent
e36ad719cf308a1…
2 files changed
+4
-4
+1
-1
+4
-4
| --- src/jim-win32compat.h | ||
| +++ src/jim-win32compat.h | ||
| @@ -36,21 +36,21 @@ | ||
| 36 | 36 | #define JIM_WIDE_MODIFIER "I64d" |
| 37 | 37 | |
| 38 | 38 | #include <io.h> |
| 39 | 39 | |
| 40 | 40 | #define HAVE_GETTIMEOFDAY |
| 41 | -#ifndef TIMEVAL_H | |
| 41 | +#ifndef NO_TIMEVAL | |
| 42 | 42 | struct timeval { |
| 43 | 43 | long tv_sec; |
| 44 | 44 | long tv_usec; |
| 45 | 45 | }; |
| 46 | -#endif /* TIMEVAL_H */ | |
| 46 | +#endif /* NO_TIMEVAL */ | |
| 47 | 47 | |
| 48 | 48 | int gettimeofday(struct timeval *tv, void *unused); |
| 49 | 49 | |
| 50 | 50 | #define HAVE_OPENDIR |
| 51 | -#ifndef DIRENT_H | |
| 51 | +#ifndef NO_DIRENT | |
| 52 | 52 | struct dirent { |
| 53 | 53 | char *d_name; |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | 56 | typedef struct DIR { |
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | } DIR; |
| 62 | 62 | |
| 63 | 63 | DIR *opendir(const char *name); |
| 64 | 64 | int closedir(DIR *dir); |
| 65 | 65 | struct dirent *readdir(DIR *dir); |
| 66 | -#endif /* DIRENT_H */ | |
| 66 | +#endif /* NO_DIRENT */ | |
| 67 | 67 | #endif /* _MSC_VER */ |
| 68 | 68 | |
| 69 | 69 | #endif /* WIN32 */ |
| 70 | 70 | |
| 71 | 71 | #endif |
| 72 | 72 |
| --- src/jim-win32compat.h | |
| +++ src/jim-win32compat.h | |
| @@ -36,21 +36,21 @@ | |
| 36 | #define JIM_WIDE_MODIFIER "I64d" |
| 37 | |
| 38 | #include <io.h> |
| 39 | |
| 40 | #define HAVE_GETTIMEOFDAY |
| 41 | #ifndef TIMEVAL_H |
| 42 | struct timeval { |
| 43 | long tv_sec; |
| 44 | long tv_usec; |
| 45 | }; |
| 46 | #endif /* TIMEVAL_H */ |
| 47 | |
| 48 | int gettimeofday(struct timeval *tv, void *unused); |
| 49 | |
| 50 | #define HAVE_OPENDIR |
| 51 | #ifndef DIRENT_H |
| 52 | struct dirent { |
| 53 | char *d_name; |
| 54 | }; |
| 55 | |
| 56 | typedef struct DIR { |
| @@ -61,11 +61,11 @@ | |
| 61 | } DIR; |
| 62 | |
| 63 | DIR *opendir(const char *name); |
| 64 | int closedir(DIR *dir); |
| 65 | struct dirent *readdir(DIR *dir); |
| 66 | #endif /* DIRENT_H */ |
| 67 | #endif /* _MSC_VER */ |
| 68 | |
| 69 | #endif /* WIN32 */ |
| 70 | |
| 71 | #endif |
| 72 |
| --- src/jim-win32compat.h | |
| +++ src/jim-win32compat.h | |
| @@ -36,21 +36,21 @@ | |
| 36 | #define JIM_WIDE_MODIFIER "I64d" |
| 37 | |
| 38 | #include <io.h> |
| 39 | |
| 40 | #define HAVE_GETTIMEOFDAY |
| 41 | #ifndef NO_TIMEVAL |
| 42 | struct timeval { |
| 43 | long tv_sec; |
| 44 | long tv_usec; |
| 45 | }; |
| 46 | #endif /* NO_TIMEVAL */ |
| 47 | |
| 48 | int gettimeofday(struct timeval *tv, void *unused); |
| 49 | |
| 50 | #define HAVE_OPENDIR |
| 51 | #ifndef NO_DIRENT |
| 52 | struct dirent { |
| 53 | char *d_name; |
| 54 | }; |
| 55 | |
| 56 | typedef struct DIR { |
| @@ -61,11 +61,11 @@ | |
| 61 | } DIR; |
| 62 | |
| 63 | DIR *opendir(const char *name); |
| 64 | int closedir(DIR *dir); |
| 65 | struct dirent *readdir(DIR *dir); |
| 66 | #endif /* NO_DIRENT */ |
| 67 | #endif /* _MSC_VER */ |
| 68 | |
| 69 | #endif /* WIN32 */ |
| 70 | |
| 71 | #endif |
| 72 |
+1
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -25,11 +25,11 @@ | ||
| 25 | 25 | ZLIBDIR = $(SRCDIR)\..\zlib-1.2.5 |
| 26 | 26 | ZLIB = zlib.lib |
| 27 | 27 | |
| 28 | 28 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR) |
| 29 | 29 | |
| 30 | -CFLAGS = -nologo -MT -O2 -DTIMEVAL_H -DDIRENT_H | |
| 30 | +CFLAGS = -nologo -MT -O2 -DNO_TIMEVAL -DNO_DIRENT | |
| 31 | 31 | BCC = $(CC) $(CFLAGS) |
| 32 | 32 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 33 | 33 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 34 | 34 | LIBDIR = -LIBPATH:$(ZLIBDIR) |
| 35 | 35 | |
| 36 | 36 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -25,11 +25,11 @@ | |
| 25 | ZLIBDIR = $(SRCDIR)\..\zlib-1.2.5 |
| 26 | ZLIB = zlib.lib |
| 27 | |
| 28 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR) |
| 29 | |
| 30 | CFLAGS = -nologo -MT -O2 -DTIMEVAL_H -DDIRENT_H |
| 31 | BCC = $(CC) $(CFLAGS) |
| 32 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 33 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 34 | LIBDIR = -LIBPATH:$(ZLIBDIR) |
| 35 | |
| 36 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -25,11 +25,11 @@ | |
| 25 | ZLIBDIR = $(SRCDIR)\..\zlib-1.2.5 |
| 26 | ZLIB = zlib.lib |
| 27 | |
| 28 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR) |
| 29 | |
| 30 | CFLAGS = -nologo -MT -O2 -DNO_TIMEVAL -DNO_DIRENT |
| 31 | BCC = $(CC) $(CFLAGS) |
| 32 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 33 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 34 | LIBDIR = -LIBPATH:$(ZLIBDIR) |
| 35 | |
| 36 |