<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 2017-05-25, at 12:32 AM, Mojca Miklavec wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>I don't know what the cleanest approach would be, but I like the idea.<br>I can imagine a PortGroup, something in the spirit of:<br><br>    PortGroup legacy 1.0<br>    legacy.support darwin 10<br>    # legacy.support {darwin < 11}<br><br>which would add a dependency and append the necessary flags for darwin10.<br><br>(The library could be built statically.)<br><br>Mojca<br></div></blockquote></div><br><div>It works quite well, and it's easy to control. The only thing I can think of that would be better and even more transparent would be to link it in with clang when needed, as Apple has done with some other library functions, like this bit from the clang patches in ToolChains.cpp:</div><div><br></div><div><div>+    if (isMacosxVersionLT(10, 5))</div><div>       AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.10.4.a");</div><div>-    } else {</div><div>-      if (getTriple().getArch() == llvm::Triple::x86)</div><div>-        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.eprintf.a");</div><div>+    else</div><div>       AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.osx.a");</div><div>-    }</div></div><div><br></div><div>This actually would be a pretty sweet way to go with this issue. </div><div><br></div><div>You'd have to put that together with an #include_next for a copy of string.h and perhaps a few other headers that define the missing functions.</div><div><br></div><div>Of course, it's better for authors to test for all the missing functions, but as these are all common functions for the past 10+ years, that might be a bit too much to ask. </div><div><br></div><div>Or I could just give up on 10.6.8 and get in the modern era :> </div><div><br></div><div>Ken</div></body></html>