2013/8/26 dw <[email protected]>: > >>> Is this intentional? Or a bug? >> I'll leave this for Kai to decide whether to put in dllimport. > > Actually, it may not be as simple as it appears. > > Looking back at when stdio.h was first added to the project, everything > WAS marked with _CRTIMP. The attribute was removed as part of 127 & 129 > "Removed _CRTIMP from POSIX API." > > I'm no posix expert, but wouldn't creating a define using #ifdef _POSIX_ > be a better solution? In addition to allowing these functions to work > optimally with ms crt, it would also implicitly mark which functions are > posix. > > dw
No, actual it is true that this API is POSIX-compatible (mostly). Nevertheless the cause for removing CRTIMP (actual it is dllimport) is more an optimization issue. In general we support - on by default - pseudoe-relocation-v2, by which we are capable to handle dll-imports without the proper decoration of the symbol. If a symbol is marked as dllimport, it means it becomes part of the DECL itself. So we get conflicts with people simply doing prototypes without. By this reason - and some issues about builtin-optimization for such symbols - we decided to remove by those symbols the CRTIMP decoration. And I kindly ask not to touch the default behavior here as it might cause breakages at pretty unexpected places. Regards, Kai ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
