Hi All,
I have lately seen a big effort to make more modules compilable under Visual
C , one of our current problems when building dlls is that our .def files
are mingw/gcc specific not directly compatible with msvc or any other future
compiler we may support. Currently we are using not very elegant solutions
to archive compatibility with msvc like stripping some information from
mingw def files. As Alex suggested I think it's a good idea to move that
information to rbuild files and let rbuild generate full compatible compiler
def files in the intermediate folder. The advantages are obvious.
As I have little experience with mingw def files I would like to request
some help from other developers to evaluate/validate my proposal.
From my research on the ros codebase I have found that
possible variations:
- CcRosInitializeFileCache@8
- FsRtlGetFileSize
- @HalExamineMBR@16
- PsChargeProcessNonPagedPoolQuota@4=PsDereferenceImpersonationToken@4
-
ConvertSecurityDescriptorToAccessNamedA=ConvertSecurityDescriptorToAccessA@2
8
- GetSecurityDescriptorLength(a)4=NTDLL.RtlLengthSecurityDescriptor
- ??1type_info@@UAE@XZ=__thiscall_MSVCRT_type_info_dtor @15
- ChkdskEx=VfatChkdsk@24
My proposed syntax is as following and it should support all of the above
cases:
<exportfunction name="CcRosInitializeFileCache" ordinal="8" />
(required)
(optional)
<exportfunction name="CcRosInitializeFileCache" ordinal="8"
mappedname="PsDereferenceImpersonationToken" mappedordinal="4"/>
(required)
(optional) (optional)
(optional)
<exportfunction name="GetSecurityDescriptorLength" ordinal="4"
mappedname="RtlLengthSecurityDescriptor" mappedordinal="4"
module="ntdll"/>
(required)
(optional) (optional)
(optional) (optional)
With this information rbuild will generate a modulename_gcc.def when you
type "make" and modulename_msvc.def on the intermediate folder when you type
"make msvc".
Opinions, comments?
Regards,
Marc