[ofa-general] porting IB management code to Windows
Sasha Khapyorsky
sashak at voltaire.com
Sat Dec 13 12:34:23 PST 2008
Hi Jason,
On 18:34 Fri 12 Dec , Jason Gunthorpe wrote:
> On Fri, Dec 12, 2008 at 04:38:11PM -0800, Sean Hefty wrote:
>
> > I installed the Intel compiler (version 11.0.066) and tried using that within
> > the WDK build environment to build just sminfo. The good news is that sminfo
> > did build within the WDK environment and run. The bad news is that every change
> > to sminfo.c that was posted was still needed by the Intel compiler, plus it
> > required a couple of other changes as well. :(
>
> Well, I'm not sure what is up with the const thing since thats bog
> standard C89 even, but the structure initializers and the Intel
> compiler are a matter of using the GCC extension vs C99:
>
> - [SMINFO_MASTER] "SMINFO_MASTER",
> + [SMINFO_MASTER] = "SMINFO_MASTER",
>
> And similarly anything using the 'field: value' should be '.field =
> value' for C99. (make sure C99 support is turned on too!)
>
> Compiling with -std=c99 on Linux will catch several of these issues,
> and purging them agressively is generally a good idea.
I agree, it would be a reasonable requirement.
> Actually -std=c99 -D_XOPEN_SOURCE=600 is good option set for portable
> code written to modern standards (ie SUSv3 and C99) as it purges some
> of the uncommon and BSD calls from the library headers and tends to
> keep things cleaner. (Though sometimes you need to use _GNU_SOURCE on
> some files to access some special functions :()
>
> But it is all kind of moot if you are attempting to compile without
> some POSIX API emulation layer for Windows (SFU, cygwin, etc).
> That makes things extra hard, and I'm not sure it is worthwhile for
> this particular application. :)
>
> Ie if you are willing to use MS's SFU you get gcc and a POSIX
> compatibility library as part of the SDK install and alot of
> problems go away.
This could be an interesting option too. In particular I remember a lot
of compatibility issues with using pthread library in OpenSM. Thanks for
a good ideas.
Sasha
More information about the general
mailing list