forked from coolstar/if_re-win
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename if_re_bsd.h and rtlhw.cpp to match BSD driver
To make it easier to relate the BSD driver sources to the Windows driver sources, restore the original BSD driver filenames: - `rtlhw.cpp` -> `if_re.c` - `if_re_bsd.h` -> `if_rereg.h` Also, compile the BSD sources using C rules instead of C++ rules, which hopefully make it easier to keep the BSD and Windows code aligned. Compiling as C code requires a few fixes: - Functions shared between C and C++ code need to be compiled as `extern "C"`. - To use `bool` in C code, you have to include the `stdbool.h` header. - During the build, the compiler can't use the same .pch for both C and C++ code, so only "precompile" the header for the C++ code (compile the C code without precompiled header acceleration).
- Loading branch information
Showing
6 changed files
with
164 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,137 +1,140 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Source Files"> | ||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> | ||
<UniqueIdentifier>{E10CB9FB-4852-4353-85F5-667D4D2A13DD}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Header Files"> | ||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
<UniqueIdentifier>{EC8940D8-5E2B-49AB-AB85-7CABCAE698D1}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Resource Files"> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> | ||
<UniqueIdentifier>{42A1FDF4-6DB4-41B2-9423-8002A20D1B0D}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Driver Files"> | ||
<Extensions>inf;inv;inx;mof;mc;</Extensions> | ||
<UniqueIdentifier>{FD9F921C-D1EF-421B-A692-F23423B32E64}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Header Files\BSD"> | ||
<UniqueIdentifier>{6e28619c-acdf-4fd4-b4b4-2ffcb2d448ed}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Source Files\BSD"> | ||
<UniqueIdentifier>{88ff9f33-c59c-4c16-89a5-751652249ab0}</UniqueIdentifier> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Inf Include="if_re.inx"> | ||
<Filter>Driver Files</Filter> | ||
</Inf> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ResourceCompile Include="if_re.rc"> | ||
<Filter>Resource Files</Filter> | ||
</ResourceCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="*.txt;*.htm;*.html" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="adapter.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="device.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="driver.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="power.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="rxqueue.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="txqueue.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="rtlhw.cpp"> | ||
<Filter>Source Files\BSD</Filter> | ||
</ClCompile> | ||
<ClCompile Include="pciconfig.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="interrupt.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="link.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="configuration.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="mcast.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="adapter.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="device.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="forward.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="power.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="precomp.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="rxqueue.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="trace.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="txqueue.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="bsd.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="if_re_bsd.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="mii.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="ethernet.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="bsdexport.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="interrupt.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="link.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="netringiterator.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="configuration.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="if.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="mbuf.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
</ItemGroup> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Source Files"> | ||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> | ||
<UniqueIdentifier>{E10CB9FB-4852-4353-85F5-667D4D2A13DD}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Header Files"> | ||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
<UniqueIdentifier>{EC8940D8-5E2B-49AB-AB85-7CABCAE698D1}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Resource Files"> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> | ||
<UniqueIdentifier>{42A1FDF4-6DB4-41B2-9423-8002A20D1B0D}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Driver Files"> | ||
<Extensions>inf;inv;inx;mof;mc;</Extensions> | ||
<UniqueIdentifier>{FD9F921C-D1EF-421B-A692-F23423B32E64}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Header Files\BSD"> | ||
<UniqueIdentifier>{6e28619c-acdf-4fd4-b4b4-2ffcb2d448ed}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Source Files\BSD"> | ||
<UniqueIdentifier>{88ff9f33-c59c-4c16-89a5-751652249ab0}</UniqueIdentifier> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Inf Include="if_re.inx"> | ||
<Filter>Driver Files</Filter> | ||
</Inf> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ResourceCompile Include="if_re.rc"> | ||
<Filter>Resource Files</Filter> | ||
</ResourceCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="*.txt;*.htm;*.html" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="adapter.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="device.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="driver.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="power.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="rxqueue.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="txqueue.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="if_re.c"> | ||
<Filter>Source Files\BSD</Filter> | ||
</ClCompile> | ||
<ClCompile Include="pciconfig.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="interrupt.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="link.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="configuration.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="mcast.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="precomp.cpp"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="adapter.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="device.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="forward.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="power.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="precomp.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="rxqueue.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="trace.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="txqueue.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="bsd.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="if_rereg.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="mii.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="ethernet.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="bsdexport.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="interrupt.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="link.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="netringiterator.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="configuration.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="if.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
<ClInclude Include="mbuf.h"> | ||
<Filter>Header Files\BSD</Filter> | ||
</ClInclude> | ||
</ItemGroup> | ||
</Project> |
File renamed without changes.