#167 MSVC 6.0 compatibility

open
nobody
None
5
2010-01-24
2010-01-24
Alexander Ilyin
No

nasm-2.06rc10, nasm-2.08rc7 do compile under MSVC 6.0, but it just needs few slight remakes, to be able to do that.
2 code modifications, and a project files offers are below.

1)
in "nasmlib.c"
0x8000000000000000ULL
0xFF00000000000000ULL
Shouldn't they be :
UINT64_C(0x8000000000000000)
UINT64_C(0xFF00000000000000)
I don't see anywhere in Nasm source an 'ULL' anymore; everywhere those 64bit numbers goes through 'UINT64_C()' define.

2)
One more place remains, so it could be possible to compile on MSVC 6.0.
Look applied files, there "nasm_patch.txt", it offers a bit dirty way to solve the problem;
possibly you could do some cleaner solution.

3)
MSVC 6.0 .dsw,.dsp projects files are applied (hmmm, can't apply a second file; later then)
(for those who don't know : MSVC 2003 and 2005 can automatically convert them to their formats;
so if you will even not do the patches above - a user, who is using higher than 6.0 version, can use them anyway).
Works from the root folder.

P.S.
No, I am not insisting that you would support MSVC 6.0; and no, am not insisting that you support MSVC; those are closed source stuff.
Just take these patches/project, if you will like any of it.

Attachment : Nasm and Ndisasm projects, plus description file, in noncompressed zip.
Since you do not wish to officially support, I've added some explaining it information in the included description file.
If you do not want to add any files at all, you can link at the place where it is published on my site
http://alex.freeftp.eu/files/_side_/nasm/msvc/

Discussion

  • patch for MSVC 6.0 compatibility

     
    Attachments
  • > in "nasmlib.c"
    > 0x8000000000000000ULL
    > 0xFF00000000000000ULL
    > Shouldn't they be :
    > UINT64_C(0x8000000000000000)
    > UINT64_C(0xFF00000000000000)
    > I don't see anywhere in Nasm source an 'ULL' anymore; everywhere those
    > 64bit numbers goes through 'UINT64_C()' define.

    Good catch! I think it is better to use UINT64_C there. I'll take a look. Thanks!