Andy Ross a écrit :

Scream really loudly if something breaks and you want this patch reverted.


I don't really want to see this patch reverted, but here is my first experience with MSVC.

1. empty struct member ( ;; ) seems to be disallowed. So I changed :

--- data.h    18 Apr 2005 19:48:47 -0000    1.3
+++ data.h    18 Apr 2005 21:20:58 -0000
@@ -33,7 +33,7 @@
// implementing objects to pack in 16 bits worth of data "for free".
#define GC_HEADER \
    unsigned char mark; \
-    unsigned char type; \
+    unsigned char type

struct naObj {
    GC_HEADER;

to avoid that.

2. MSVC use file extensions to choose the right language to compile. So in misc.c the syntax of C not C++ apply. This file should definitively be named misc.cxx, like lib.c should be lib.cxx. In C, MSVC doesn't seems to like union assignment, but I may be wrong. It's ok in C++, but there is a lot of subsequent problems induced by this change of language. See below :

3. the word 'namespace' is used as a name of a struct member in naFunc in data.h. 'namespace' is definitively reserved keyword in C++.

4. I have a warning on a non standard extension used on
 naRef array[];

( empty array in struct )

5. 'delete' is a reserved keyword in C++ ( in lib.c that needs to be compiled with the C++ language )

6. can't convert void * to char * without a cast.

--- lib.c    18 Apr 2005 19:48:47 -0000    1.6
+++ lib.c    18 Apr 2005 21:42:18 -0000
@@ -219,7 +219,7 @@
    va_list va;
    int len = 16;
    while(1) {
-        buf = naAlloc(len);
+        buf = (char *)naAlloc(len);
        va_start(va, f);
        if(vsnprintf(buf, len, f, va) < len) {
            va_end(va);


and it's late here so I can't continue but there is a lot of other messages ( I have the french version of MSVC so the error messages are in french )


-Fred



_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to