| 
 | 
  | 
 
  
  Compiling
  Some MPE/iX include files expect certain variables to be defined. For example,
  <types.h.sys> expects SOCKET_SOURCE to be defined.
  Defines are declared in a C program by using #define; however,
  instead of modifying source code, a define can be declared at runtime.
    
  The following example shows how to compile the program:
  
  :ccxl sourcepg,obj,listing;info="-Aa &
    -D_SOCKET_SOURCE -D_POSIX_SOURCE"
  
  Linking
  The following example shows how to link the program:
  
  :link from=obj;rl=^rllist;to=prog
   
  The following RLLIST file was used in linking the above program:
  
  socketrl.net.sys
  libcinit.lib.sys
   
  Note: Ensure that you link with the POSIX library (/lib/libc.a)
  instead of libcinit.lib.sys for POSIX programs. If you are using
  fork(), you need to link with PH capabilities.
  Output
  When the above program was run, it had the following output:
  
   Connect failed with error 245
   Accept succeeded
   
  Note that the connect failed with error 245. This corresponds to
  EINPROGRESS, indicating that the connect could not complete
  immediately because an accept had not yet been issued. If the
  connection was not using the nonblocking mode, then the connect
  would have blocked.
    
  [3kRanger Test]
  Download inetexam.c
  
 Fox 9:ccxl inetexam.c;info="-Aa -D_SOCKET_SOURCE -D_POSIX_SOURCE"
 SAT NOV 16 2024  7:32 AM  Copyright Hewlett-Packard Co. 1984. PAGE 1
 HP C/iX HP31506 A.05.19                                   "INETEXAM"
    1  0   # 1 "INETEXAM.C.KEVENM"
    1  0   
    2  0   #pragma list off
 END OF PROGRAM
 Fox 9:link from=$oldpass;rl=socketrl.net.sys,libcinit.lib.sys; &
 Fox 9:to=inetexam.pub
 HP Link Editor/iX (HP30315A.06.17) Copyright Hewlett-Packard Co 1986
 LinkEd> link from=$oldpass;rl=socketrl.net.sys,libcinit.lib.sys;
 to=inetexam.pub
 
 Fox 9:inetexam.pub
 Connect err 245 Operation now in progress
 Accept succeeded
 Sending "Test Message"
 Recieved: [Test Message]
 Fox 9:
  
  
 
 |