DCE for the HP e3000 (B3821-90003)

Chapter 4 41
DCE 1.2.1 Features and Programming Notes
Security Delegation
Security Delegation
Intermediary servers can operate on behalf of the initiating client while
preserving identities and ACLs.
Compiling Multithreaded Application
There are some new preprocessing directives that has been introduced
to compile with latest Pthread implementation.
_POSIX_SOURCE: This needs to be used when compiling any DCE
application. It is not necessary when compiling threads only
application.
_MPE_THREADS: This is used when compiling any DCE or
multithreaded application. This directive is used set the thread specific
errno.
Applications should ensure that they link /lib/libpthread.sl before
/lib/libc.sl to ensure that they invoke the thread-safe versions of
these C runtime. Applications should not use the c89 linking feature
directly since it bind the C routines to /lib/libc.a before
/lib/libpthread.sl. Also since we are binding to /lib/libc.sl, we
need to explicitly link the program object file(s) with the loader “start”
routine.
The following makefile will provide an example of the linking process.
DEBUG = -g
INCENV = -I. -I/usr/include
ANSI_FLAGS = -D_POSIX_SOURCE -D_POSIX_D10_THREADS
MPE_FLAGS = -D_MPEXL_SOURCE -D_MPE_THREADS -DMPEXL
CFLAGS = ${ANSI_FLAGS} ${DEBUG} ${MPE_FLAGS} ${INCENV}
#LIBS = -lsocket -lsvipc -lm
XL = /lib/libdce.sl, /lib/libpthread.sl, /lib/libc.sl
PROGRAMS = server client
server_OFILES = manager.o server.o sleeper_sstub.o
client_OFILES = sleeper_cstub.o client.o
IDLFLAGS = -keep c_source ${INCENV}
IDLFILES = sleeper.idl
IDLGEN = sleeper.h sleeper_*stub.c
IDL = /SYS/HPBIN/SH /usr/bin/idl
#IDL = /SYS/PUB/IDL
all: objects ${PROGRAMS}