Header Files |
 |
In addition to the standard POSIX libraries and HP C/XL functions, you
may have to include the DCE header files, which can be found in the /usr/include/dce directory. If your C applications use Try/Catch for
exception handling, you should include the following statement in the
C programs:
#include <dce/pthread_exc.h> |
There are no MPE/iX equivalent libraries for /usr/lib/libbb.a or /usr/lib/libc_r.a. The reentrant functions that are defined in MPE/iX
and the thread-safe wrapper functions are in /usr/lib/libdce.a.
MPE/iX does not have the file strings.h. The HP-UX strings.h includes string.h, sys/stdsyms.h and some definitions that are strictly for C++ and HP-UX.
Compiler Flags |
 |
When compiling DCE applications using ANSI C under the MPE
CI, set the following compiler switches:
-D_POSIX_SOURCE -D_MPEXL_SOURCE -D_SOCKET_SOURCE -D_REENTRANT -Aa |
When compiling under the MPE POSIX shell, you need the above
flags except for the -Aa option. If -Aa is set, /bin/c89 displays a large amount of error messages (by definition,
the POSIX environment always uses the ANSI C compiler).
Unresolved Externals |
 |
When porting applications from a UNIX environment to MPE/iX,
you may receive unresolved external errors during a compile, link,
or run phase. It is likely that the unresolved externals are not
part of the POSIX.1 standard. To find out if a function is defined
in the POSIX environment, look at the manpage for that function
on a UNIX system. At the bottom of the manpage, there is a section
titled STANDARD CONFORMANCE, which lists
the function name and the standard it conforms to. If the manpage
does not have POSIX.1 listed as one of the standards then that function
is not part of the MPE/iX POSIX Environment. To get around this
porting issue, you may have to write a routine to emulate the functionality
for the unresolved external.