|
|
For UnixWare 2.x, there is no exact source-level compatibility option. This is because
That being said, it is sometimes possible to use the UDK CC -Xo option on UnixWare 2.x-built code. For instance, the unmodified src.C example above will compile on UnixWare 2.x with default options, and can thus be built on the UDK using CC -Xo.
But for a counter-example, consider this code (that uses the so-called "keyword operators" added by ANSI/ISO):
int j(int i1, int i2) { return (i1 and i2) xor i2; }
This code will not compile under UnixWare 2.0 C++ but will compile under UnixWare 2.1 and UDK C++. However if it is part of a larger code base for which you need the UDK CC -Xo option, it will be rejected, because the keyword operators were not part of the Cfront definition of the language.
So to get existing UnixWare 2.x C++ code to compile under UDK C++, the best approach is to just bite the bullet and change it. The good news is that many of the minor language interpretation issues will already be resolved (since UnixWare 2.x and UDK C++ share the same front end technology).