Fossil SCM

Fix more compilation issues with MSVC.

mistachkin 2011-11-05 01:59 jimtcl
Commit 0039d32b88de5a68b5071404790852ca3ca03a77
--- src/jim-win32compat.h
+++ src/jim-win32compat.h
@@ -36,21 +36,21 @@
3636
#define JIM_WIDE_MODIFIER "I64d"
3737
3838
#include <io.h>
3939
4040
#define HAVE_GETTIMEOFDAY
41
-#ifndef TIMEVAL_H
41
+#ifndef NO_TIMEVAL
4242
struct timeval {
4343
long tv_sec;
4444
long tv_usec;
4545
};
46
-#endif /* TIMEVAL_H */
46
+#endif /* NO_TIMEVAL */
4747
4848
int gettimeofday(struct timeval *tv, void *unused);
4949
5050
#define HAVE_OPENDIR
51
-#ifndef DIRENT_H
51
+#ifndef NO_DIRENT
5252
struct dirent {
5353
char *d_name;
5454
};
5555
5656
typedef struct DIR {
@@ -61,11 +61,11 @@
6161
} DIR;
6262
6363
DIR *opendir(const char *name);
6464
int closedir(DIR *dir);
6565
struct dirent *readdir(DIR *dir);
66
-#endif /* DIRENT_H */
66
+#endif /* NO_DIRENT */
6767
#endif /* _MSC_VER */
6868
6969
#endif /* WIN32 */
7070
7171
#endif
7272
--- 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
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -25,11 +25,11 @@
2525
ZLIBDIR = $(SRCDIR)\..\zlib-1.2.5
2626
ZLIB = zlib.lib
2727
2828
INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)
2929
30
-CFLAGS = -nologo -MT -O2 -DTIMEVAL_H -DDIRENT_H
30
+CFLAGS = -nologo -MT -O2 -DNO_TIMEVAL -DNO_DIRENT
3131
BCC = $(CC) $(CFLAGS)
3232
TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
3333
LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
3434
LIBDIR = -LIBPATH:$(ZLIBDIR)
3535
3636
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button