[erlang-questions] Version-dependent compiling?

Steve Davis <>
Thu Apr 2 20:19:03 CEST 2009


Would one of

erlang:system_info(version). % i.e. the erts version
erlang:system_info(otp_release).

...help?

On Apr 2, 11:03 am, Attila Rajmund Nohl <>
wrote:
> Hello!
>
> Is there a way to test for the OTP version during compile time? For
> example the possible return values of the pwdfun callback in an ssh
> server are true, {true, Handle} or {false, Str} in OTP R11B-5 (even if
> it's not documented) and true or false in OTP R13A. For a while I'd
> like to compile and use the same code with both OTP versions - is it
> possible to do easily? I'd like to avoid modifying the Makefiles, but
> I'm willing to introduce some -ifdefs.
> _______________________________________________
> erlang-questions mailing list
> ://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list