HPlogo STREAMS/UX for the HP 9000 Reference Manual > Chapter 5 How to Compile and Link STREAMS/UX Drivers, Modules, and Applications

Compiling and Linking STREAMS/UX Applications

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Follow these steps for compiling and linking STREAMS/UX applications:

  1. Include the appropriate header files. The following header files may be found in /usr/include or /usr/include/sys. Those found in /usr/include are pointers to the files found in /usr/include/sys. POSIX compliance required the files to be moved to the sys directory so pointer files were established for source backward compatibility.

    Table 5-2 STREAMS/UX Include Files

    Include File

    Use

    <stropts.h> or <sys/stropts.h>

    Needed by all STREAMS/UX applications.

    <poll.h> or <sys/poll.h>

    Needed by programs that use poll.

    <sad.h> or <sys/sad.h>

    Needed by programs that open the sad driver.

    <strlog.h> or <sys/strlog.h>

    Needed by programs that open the strlog driver. Note that log.h and syslog.h are not needed. STREAMS/UX does not support priority and facility codes.

     

  2. Compile the source files. There are no required compiler or linker options for STREAMS/UX. See the appropriate compiler man page for which options to choose.

    NOTE: The STREAMS/UX system calls have been made thread-safe and are part of libc. If you link the application with the threads library, libcma, then you may make use of the threads utilities. No special considerations are needed for STREAMS-based applications, though it is recommended that the developer have a thorough understanding of threads principles before coding such an application using the STREAMS/UX system calls. Please read the following section for additional caveats for coding threaded applications.
© 1995 Hewlett-Packard Development Company, L.P.