[swift-dev] importer questions
Dmitri Gribenko
gribozavr at gmail.com
Tue Feb 16 02:06:05 CST 2016
On Mon, Feb 15, 2016 at 9:22 PM, Drew Crawford via swift-dev
<swift-dev at swift.org> wrote:
> I'm porting a codebase to Linux. As part of this work, I have a large class
> of problems of the form "Darwin defines this constant to be Int32 but Glibc
> defines it to be Int16".
>
> Are these considered bugs, from Swift POV?
It depends on the API. Could you give some examples?
> If they are bugs, should they be resolved in favor of making Glibc follow
> the Darwin types?
Blanket rules like that don't make sense to me, since the correct
import could be neither Int32, nor Int16, but a plain Int. And there
are other cases that we won't even imagine before we have a list of
problematic APIs in front of us.
> If they are bugs, perhaps someone could link me to the place where I can
> override the header import, so I can fix these directly?
So far, we have been fixing suboptimal API imports in the overlays.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the swift-dev
mailing list