[ofw] Re: [ofa-general] [PATCH 1/3 v2] libibmad. 2nd revision for WinOF portablity.

Smith, Stan stan.smith at intel.com
Tue Jan 20 11:04:59 PST 2009


Sasha Khapyorsky wrote:
> On 09:52 Tue 20 Jan     , Sean Hefty wrote:
>>>> [PATCH 1/3] libibmad: add os dependent definitions.
>>>> [PATCH 2/3] field.c remove c99 definitions, better portability
>>>> with WinOF.
>>>
>>> Is it possible to preserve c99 stuff? It improves code
>>> maintainability a lot and as far as I remember it is what was
>>> considered in previous discussions (about infiniband-diags porting
>>> to WinOF).
>>
>> It is not possible to keep this unless OFA changes their Windows
>> build environment or process.
>
> What about to use c99_to_whatever preprocessor
> (sed -e 's/\[.*\] *= *//')?

Why are '#ifdef _WIN32' such, as you stated, crap? Portability has a price.
Cosmetically they are not pretty, although useful if used sparingly.

What about placing the offending definitions in mad_osd.h as you had proposed?

>
> Sasha
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw




More information about the ofw mailing list