HP3000-L Archives

May 2011, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
cathlene mcrae <[log in to unmask]>
Reply To:
cathlene mcrae <[log in to unmask]>
Date:
Tue, 3 May 2011 11:06:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
putenv() is a posix function. 

  The POSIX function putenv() will create or update a POSIX environment variable. 

There is currently no man page for this function on MPE/iX, but the function 
works the same way on MPE/iX as it does on other platforms.  Here is some 
information from the HP-UX man page for putenv(): 


 NAME 
      putenv() - change or add value to environment 

 SYNOPSIS 
      #include <stdlib.h>  

      int putenv(const char *string); 

 DESCRIPTION 
      string points to a string of the form name=value.  putenv() makes the 
      value of the environment variable name equal to value by altering an 
      existing variable or creating a new one.  In either case, the string 
      pointed to by string becomes part of the environment, so altering the 
      string changes the environment.  The space used by string is no longer 
      used once a new string-defining name is passed to putenv(). 


The following is a list of posix functions: 

FUNCTIONS - MPE vs. POSIX

MPE Intrinsic                      POSIX Function 
ACTIVATE                           exec 
CATREAD                            strerror 
CLOCK                                 time 
CREATE, CREATEPROCESS   fork 
FATHER                                getppid 
FCLOSE                                 close 
FFILEINFO                             fstat 
FLOCK                                    fcntl 
FOPEN                                    open 
FPOINT                                     lseek 
FREAD                                      read 
FUNLOCK                                  fcntl 
FWRITE                                     write 
HPACDPUT                                chmod, fchmod 
HPCICOMMAND, COMMAND      system 
HPCIGETVAR                              getenv 
HPCIPUTVAR                              putenv 
HPERRMSG                                strerror 
HPFOPEN                                  open 
HPPIPE                                     pipe 
KILL                                          kill 
PAUSE                                      sleep 
PRINT                                       printf 
PROCINFO                                getpid 
PROCTIME                                 times 
QUIT                                          exit, abort 
WHO                                         getlogin 


MPE and Posix call mixing has had it problems, however if you use the setvar ccopts "-Aa +e ". The linker should include the correct library.

Note: 
The POSIX/iX library consists of three relocatable library files:
The file /lib/libc.a is a relocatable library file that includes C
library functions defined by ANSI C, the POSIX.1 standard, and IEEE
P1003.2/D11.2.
The file /lib/libm.a is a relocatable library file containing all ANSI C math
library functions.
The file /lib/libM.a is a relocatable library file containing all common
usage math library functions.

The POSIX/iX library file, /lib/libc.a, contains four classes of C library
functions:
functions defined by ANSI C
functions defined by the POSIX.1 standard
functions defined by IEEE P1003.2/D11.2
functions provided to increase portability between MPE/iX and HP-UX

see MPE/iX Developer's Kit Reference Manual Volume I http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01712554/c01712554.pdf

and MPE/iX Developer's Kit Reference Manual Volume II
http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01691693/c01691693.pdf

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2