HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 179
Library Equivalencies, Signal Calls, Sprintf Return Value
View all HP Rp7410 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 179 highlights
Table 8-4 NOTE Programming Hints Portability Issues Utmp The 4.3 BSD /etc/utmp file format is incompatible with the HP-UX implementation. The HP-UX implementation uses UNIX System V compatible calls. Refer to the utmp(4) man page for details. Library Equivalencies Certain commonly used library calls in 4.3 BSD are not present in HPUX systems, but they do have HP-UX equivalents. To make code porting easier, use the following equivalent library calls. You can do this by putting them in an include file, or by adding the define statements (listed in the following table) to your code. Definition of Library Equivalents Define Statement 4.3 BSD Library HP-UX Library #define #define #define #define #define #define index(a,b) rindex(a,b) bcmp(a,b,c) bcopy(a,b,c) bzero(a,b) getwd(a) strchr(a,b) strrchr(a,b) memcmp(a,b,c) memcpy(b,a,c) memset(a,0,b) getcwd(a,MAXPATHLEN) Include string.h before using strchr and strrchr. Include sys/ param.h before using getcwd. Signal Calls Normal HP-UX signal calls are different from 4.3 BSD signals. See the sigvector(2) man page for information on signal implementation. Sprintf Return Value For 4.3 BSD, sprintf returns a pointer to a string. For HP-UX systems, sprintf returns a count of the number of characters in the buffer. Chapter 8 179