DCE Application Programming Guide

Sample Application Listings
HP NonStop DCE Application Programming Guide429551-003
A-20
The Make File
The Make File
The make file is shown in Figure A-12 on page A-21. The make file shown is for TNS
systems. Following the figure are modifications for TNS/E systems.
if (uname (info_p) < 0)
{
return ((error_status_t)errno); /* (c) */
}
else
{
system_info_p->sysname_p = (idl_char *) &info_p->sysname;
system_info_p->nodename_p = (idl_char *) &info_p->nodename;
system_info_p->release_p = (idl_char *) &info_p->release;
system_info_p->version_p = (idl_char *) &info_p->version;
system_info_p->machine_p = (idl_char *) &info_p->machine;
return (rpc_s_ok);
}
}
/*************** Serviceability Initialization ***********************/
void init_serviceability( char *program_name ) /* (B8) */
{
unsigned_char_t *default_route = (unsigned_char_t *)"*:STDERR:";
error_status_t status;
dce_svc_set_progname(program_name, &status);
if (status != svc_s_ok)
{
fprintf(stderr, "dce_svc_set_progname failed\n");
exit(1);
}
dce_svc_routing(default_route, &status);
if (status != svc_s_ok)
{
fprintf(stderr, "dce_svc_routing failed\n");
exit(1);
}
inf_svc_handle = dce_svc_register( inf_svc_table,
(idl_char*)"inf",
&status);
if (status != svc_s_ok)
{
fprintf(stderr, "dce_svc_register failed\n");
exit(1);
}
dce_msg_define_msg_table( inf_msg_table,
sizeof(inf_msg_table)/sizeof(inf_msg_table[0]),
&status );
WRN_CHK(status, "Could not define in-memory message table.");
}
Figure A-11. The Server File in a Release 1.1 Port (page3of3)