HP DCE/9000 Application Development Tools for HP-UX 11i Release Note

16
HP DCE/9000 Version 1.8 Application Development Tools for HP-UX 11i Release Note
Developing DCE Applications with HP DCE/9000
Developing DCE Applications with HP DCE/9000
This chapter provides information about developing, building, and debugging DCE
applications with HP DCE/9000.
NOTE The HP DCE applicationdevelopment software, including the IDL compiler, the
NIDL-to-IDL translator, DCE interface definition files and header files, the
International version of the DCE archive library, and the pthreads archive
library, may not be included in the HP-UX bundle that you installed. If you
intend to developHP DCE applications, you must explicitly install any software
that you require.
Building DCE Programs
NOTE Hewlett-Packard supports only the ANSI C compiler for building HP DCE
applications. Hewlett-Packard cannot provide support for problems with HP
DCE applications not compiled using ANSI C. This restriction also applies to
applications on HP-UX 10.x systems built using the HP-UX user-space threads
library (libcma).
When compiling and linking HP DCE applications, note the following:
In order for the correct header file contents to be used, define _HPUX_SOURCE when
compiling your HP DCE application: -D_HPUX_SOURCE.
In order for the correct header file contents to be used, define _REENTRANT and
_PTHREADS_DRAFT4 when compiling HP DCE programs as -D_REENTRANT and
-D_PTHREADS_DRAFT4 for the following reasons:
To ensure that the threadsafe routines such as putc, putchar, getc, and get char are
used instead of the non-thread-safe macro versions defined in stdio.h.
To get definitions of new structures and to provide ANSI C prototype information for
the new reentrant interfaces.
If you include <pthread.h>, you must do so before other header files in your C source file.
Also note that <pthread.h> defines _REENTRANT.