https://issues.dlang.org/show_bug.cgi?id=24389
--- Comment #10 from Jonathan M Davis <[email protected]> --- (In reply to Iain Buclaw from comment #9) > Alternatively, there's reverting the change that introduced using DMD to > build zlib. Yeah, I was talking about what would be required for zlib to build with importC. Either way, ultimately, if we can't get dmd to work with importC and the way that FreeBSD is using __asm__ in stdlib.h, then we can't build zlib in Phobos with importC. > If not resorting back to using $CC for FreeBSD, maybe the zlib sources could > be altered to filter out the bad code in the header? > > https://reviews.freebsd.org/source/src/browse/main/include/stdlib.h$347 > > #undef __generic? Maybe? If it were done carefully, then we could probably make it work, but it also could cause problems down the line as the headers change with different OS versions, and depending on what the changes were, we might end up with silent breakage. Personally, I'd be more inclined to just not use importC for zlib, since we clearly don't need to. Of course, it would be nice if dmd could just handle the __asm__ stuff properly, but I guess that that would require that dmd be able to handle another kind of assembly language. --
