[ovs-dev] [RFC 1/4] compiler: Add OVS_CONSTRUCTOR to mark functions as init functions

Helmut Schaa helmut.schaa at googlemail.com
Wed Dec 11 07:53:32 UTC 2013


On Wed, Dec 11, 2013 at 12:10 AM, Gurucharan Shetty <shettyg at nicira.com> wrote:
> On Tue, Dec 10, 2013 at 5:49 AM, Helmut Schaa
> <helmut.schaa at googlemail.com> wrote:
>> Functions marked with OVS_CONSTRUCTOR are called unconditionally
>> before main.
>>
>> Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
>> ---
>>
>> This works with gcc (tested), should work with clang (untested)
>> but does not work with MSVS.
>>
>> Could anyone using MSVC try if the solution described at
>> http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc
>> is suitable?
>>
>> Is MSVC even supported in OVS?
>
> There is work going on to port OVS to windows and MSVC is the compiler
> for that work.
> I did try out the solution given in the stackoverflow link given. It
> does compile and the initialize() function gets called before main().

Great, I'll update the patch accordingly after some more comments ...



More information about the dev mailing list