<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Something similar had to happen in mochiweb for R15 (where a bug in gen_tcp caused issues), it ended up looking similar<div><br></div><div><a href="https://github.com/mochi/mochiweb/commit/92b8f5bd10ce69d40005c8e78e52db9003f0189d">https://github.com/mochi/mochiweb/commit/92b8f5bd10ce69d40005c8e78e52db9003f0189d</a></div><div><br></div><div>So I think you came up with the best solution. Luckily after a few years you'll be able to remove the special</div><div>cases :)</div><div><br></div><div>-Anthony</div><div><br><div><div>On Jun 22, 2013, at 5:18 AM, Benoit Chesneau <<a href="mailto:bchesneau@gmail.com">bchesneau@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I see a lot of deprecation warnings in the crypto module with the<br>latest release of Erlang. (crypto:sha_mac/2 -> crypto:hmac/3,<br>crypto_md5_* -> crypto:hash/2 ...) .<br><br>Is there a way to handle this changes at compile time to use latest<br>functions when possible and old functions in legacy releases?<br><br><br>With the help of rebar I did such change:<br><br><a href="https://github.com/refuge/erlang-oauth/commit/2ab4a24c3f7db95b9ab43099ba1fa876a072e955">https://github.com/refuge/erlang-oauth/commit/2ab4a24c3f7db95b9ab43099ba1fa876a072e955</a><br><br>But I'm wondering if there is a better solution. Also able to handle<br>more legacy versions.<br><br>Any idea?<br><br>- benoit<br>_______________________________________________<br>erlang-questions mailing list<br>erlang-questions@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></div></body></html>