[Previous] [Contents] [Next]

Appendix: QNX 4 Functions & QNX 6 Equivalents

The following table lists the QNX 4 C library functions along with their QNX 6 equivalents. For functions that have no direct replacement, you'll find either a cover function or a suggested workaround.

Use these links to find a function quickly:

A B C D E F G H I K L
M N O P Q R S T U V W Y

A

QNX 4 function QNX 6 equivalent In migration library? Comments
abstimer() timer_settime(CLOCK_REALTIME, TIMER_ABSTIME, ...) No
_asctime() extern char *asctime_r( const struct tm *__timeptr, char *__buff ); No This call is a drop-in replacement.

B

QNX 4 function QNX 6 equivalent In migration library? Comments
_bcalloc() calloc() No QNX 6 doesn't support segment-based functions.
_beginthread() pthread_create() No Note that a thread in QNX 4 is really just a separate process that shares the data segment of its parent, whereas a thread in chapter in QNX 6 is really within the same process as its parent and shares a great deal more.
_bexpand() realloc() No QNX 6 doesn't support segment-based functions. You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _bexpand() will fail rather than move your memory block to a new address.
_bfree() free() No QNX 6 doesn't support segment-based functions.
_bfreeseg() free() No QNX 6 doesn't support segment-based functions.
_bgetcmd() Parse the argument vector passed to main() instead. No QNX 6 doesn't support segment-based functions.
_bheapchk() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_bheapmin() NO LONGER SUPPORTED No
_bheapseg() NO LONGER SUPPORTED No
_bheapset() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_bheapshrink() NO LONGER SUPPORTED No
_bheapwalk() NO LONGER SUPPORTED No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
block_read() readblock() as follows:
readblock(filedes, 512, block - 1, nblocks, buf)
Yes Note that the block number has been changed from 1-based to 0-based.
block_write() writeblock() as follows:
writeblock(filedes, 512, block - 1, nblocks, buf)
Yes Note that the block number has been changed from 1-based to 0-based. When applied to a regular file, the QNX 4 block_write() would never grow the file; the writeblock() function may cause a regular file to be extended if writing occurs beyond the end-of-file. Note that the cover function in the migration library calls writeblock().
_bmalloc() malloc() No QNX 6 doesn't support segment-based functions.
_bmsize() _msize(), _musize(), and DH_ULEN() No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_bprintf() snprintf() No
_brealloc() realloc() No QNX 6 doesn't support segment-based functions.

C

QNX 4 function QNX 6 equivalent In migration library? Comments
_CA_PCI_BIOS_Present() pci_present() No
_CA_PCI_Find_Class() pci_find_class() No
_CA_PCI_Find_Device() pci_find_device() No
_CA_PCI_Generate_Special_Cycle() NO LONGER SUPPORTED No
_CA_PCI_Read_Config_Byte() pci_read_config8() No
_CA_PCI_Read_Config_DWord() pci_read_config32() No
_CA_PCI_Read_Config_Word() pci_read_confg16() No
_CA_PCI_Write_Config_Byte() pci_write_config8() No
_CA_PCI_Write_Config_DWord() pci_write_config32() No
_CA_PCI_Write_Config_Word() pci_write_config16() No
cgets() Set /dev/tty as standard output and call gets(). No
_clear87() NO LONGER SUPPORTED No
clock_setres() ClockPeriod() No
console_active() NO LONGER SUPPORTED No
console_arm() NO LONGER SUPPORTED No
console_close() NO LONGER SUPPORTED No
console_ctrl() NO LONGER SUPPORTED No
console_info() tcgetsize() for the number of rows and columns -- the remainder is NO LONGER SUPPORTED. No
console_open() NO LONGER SUPPORTED No
console_protocol() NO LONGER SUPPORTED No
console_read() NO LONGER SUPPORTED No
console_size() tcgetsize() for the number of rows and columns -- you can't set the size. No
console_state() NO LONGER SUPPORTED No
console_write() NO LONGER SUPPORTED No
_control87() See <fpstatus.h> No
cprintf() Set /dev/tty as standard output and call printf(). No
cputs() Do fputs() to /dev/tty instead. No
Creceive() MsgReceive() preceeded immediately by:
event.sigev_notify = SIGEV_UNBLOCK;
TimerTimeout(CLOCK_REALTIME, _NTO_TIMEOUT_RECEIVE,
&event, NULL, NULL );
No
Creceivemx() MsgReceivev() preceeded immediately by:
event.sigev_notify = SIGEV_UNBLOCK;
TimerTimeout(CLOCK_REALTIME, _NTO_TIMEOUT_RECEIVE,
&event, NULL, NULL );
No
crypt() crypt() No The QNX 6 version is Unix-compatible. For the QNX 4 version, qnx_crypt().
cscanf() Set /dev/tty as standard input and call scanf(). No
_ctime() ctime_r() No
cuserid() geteuid() for the user ID number followed by getpwent() to find the user name. No

D

QNX 4 function QNX 6 equivalent In migration library? Comments
dev_arm() See ionotify(). Yes -- covers _DEV_EVENT_INPUT, _DEV_EVENT_OUTPUT, _DEV_EVENT_EXRDY, and _DEV_EVENT_DRAIN. Not all event types are supported. For _DEV_EVENT_HANGUP, consider setting up a controlling terminal and handle SIGHUP. For _DEV_EVENT_WINCH, consider using SIGWINCH.
dev_fdinfo() NO LONGER SUPPORTED No You can't get all the information, but bits and pieces can be gotten from elsewhere.
dev_info() NO LONGER SUPPORTED Yes You can't get all the information, but bits and pieces can be gotten from elsewhere.
dev_insert_chars() tcinject() Yes
dev_ischars() tcischars() Yes
dev_mode() tcgetattr() and tcsetattr() Yes
dev_osize() NO LONGER SUPPORTED No
dev_read() readcond() and ionotify() Yes Some of this can be implemented using readcond() and ionotify(). The readcond() can handle the cases where proxy == 0. The ionotify() in conjunction with pulses (signals are even easier) can handle the cases where proxy != 0 and min, time, and timeout are all 0.
For equivalent functionality to min, time, and timeout combined with a pulse or signal for notification, create a separate thread that requests pulse notification using ionotify(). Set up another pulse notification for the timeout. Then go into a MsgReceive() loop with with a TimerTimeout() call before the MsgReceive() call for the interbyte time. Deliver a pulse or set a signal when the min, time or timeout condition is satisfied.
Note that the cover function doesn't handle the proxy and armed parameters.
dev_readex() devctl() with DCMD_CHR_GETOBAND Yes The devctl() with DCMD_CHR_GETOBAND can be used in place of this for getting out-of-band data from resource managers that support it. Currently, only devc-* resource managers support this.
dev_size() tcgetsize() and tcsetsize() Yes
dev_state() N/A Yes There's no equivalent way of directly setting these states. For _DEV_EVENT_INPUT, use devctl() with DCMD_CHR_ISCHARS. For _DEV_EVENT_DRAIN, use devctl() with DCMD_CHR_OSCHARS. For _DEV_EVENT_OUTPUT, there's currently no way to determine this (because there's no way to determine the size of the output buffer). For _DEV_EVENT_EXRDY, use devctl() with DCMD_CHR_GETOBAND -- note that doing so will clear the out-of-band data in the case of devc-* drivers.
_disable() InterruptLock() No
disk_get_entry() devctl() with the DCMD_CAM_DEVINFO command. Yes, but... See <sys/dcmd_cam.h> and <sys/cam_device.h>. Althoguh a cover function is provided in the migration library, you might want to use the direct devctl()s that build this -- they're more useful and have better field definitions (e.g. "cylinders" in QNX 6 is 32-bit, but only 16-bit in QNX 4, and large EIDE disks have already wrapped this due to geometry translation).
disk_space() statvfs() Yes, but... Although a cover function is provided in the migration library, you might want to switch directly to statvfs() because it has additional fields that may be useful (block size, mount flags, etc.).

E

QNX 4 function QNX 6 equivalent In migration library? Comments
ecvt() sprintf() No
_ecvt() sprintf() No
_enable() InterruptUnlock() No
_endthread() pthread_exit() No
_expand() realloc() No You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _expand() will fail rather than move your memory block to a new address.

F

QNX 4 function QNX 6 equivalent In migration library? Comments
_fcalloc() calloc() No
fcvt() sprintf() No
_fcvt() sprintf() No
_fexpand() realloc() No You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _expand() will fail rather than move your memory block to a new address.
_ffree() free() No
_fheapchk() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_fheapgrow() NO LONGER SUPPORTED No
_fheapmin() NO LONGER SUPPORTED No
_fheapset() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_fheapshrink() NO LONGER SUPPORTED No
_fheapwalk() NO LONGER SUPPORTED No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
filelength() fstat() No This could be done with:
fstat(fd, &st); followed by:
return(S_ISBLK(st.st_mode) ? st.st_nblocks *
st.st_blocksize : st.st_size);.

A little more may be needed for 64-bit support.
_fmalloc() malloc() No
_fmemccpy() memccpy() No
_fmemchr() memchr() No
_fmemcmp() memcmp() No
_fmemcpy() memcpy() No
_fmemicmp() memicmp() No
_fmemmove() memmove() No
_fmemset() memset() No
_fmsize() _msize(), _musize(), and DH_ULEN() No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
FP_OFF() NO LONGER SUPPORTED No
_fpreset() NO LONGER SUPPORTED No
_frealloc() realloc() No
_freect() NO LONGER SUPPORTED No
FP_SEG() NO LONGER SUPPORTED No
_fsopen() sopen(), fdopen() No Use sopen(), which returns a file descriptor, then use fdopen() to associate a stream with it.
_fstrcat() strcat() No
_fstrchr() strchr() No
_fstrcmp() strcmp() No
_fstrcpy() strcpy() No
_fstrcspn() strcspn() No
_fstrdup() strdup() No
_fstricmp() strcmp() No
_fstrlen() strlen() No
_fstrlwr() strlwr() No
_fstrncat() strncat() No
_fstrncmp() strncmp() No
_fstrncpy() strncpy() No
_fstrnicmp() strnicmp() No
_fstrnset() strnset() No
_fstrpbrk() strpbrk() No
_fstrrchr() strrchr() No
_fstrrev() strrev() No
_fstrset() strset() No
_fstrspn() strspn() No
_fstrstr() strstr() No
_fstrtok() strtok() No
_fstrupr() strupr() No
fsys_fdinfo() NO LONGER SUPPORTED No
fsys_fstat() NO LONGER SUPPORTED No Information isn't provided from the filesystem (because the QNX 6 io-blk doesn't give preferential treatment to any particular disk format.
fsys_get_mount_dev() devctl() Yes You can use the devctl() command DCMD_FSYS_MOUNTED_ON to get this information, but it must be sent as part of a combine message. See the source for fsys_get_mount_dev() in the migration library for code for doing this.
fsys_get_mount_pt() devctl() Yes You can use the devctl() command DCMD_FSYS_MOUNTED_BY to get this information, but it must be sent as part of a combine message. See the source for fsys_get_mount_pt() in the migration library for code for doing this.
fsys_stat() NO LONGER SUPPORTED No Information isn't provided from the filesystem (because Neutrino io-blk doesn't give preferential treatment to any particular disk format.

G

QNX 4 function QNX 6 equivalent In migration library? Comments
gcvt() Consdier sprintf() No
_gcvt() Consider sprintf() No
getch() read() in raw mode. No
getche() getchar() or getc() combined with putchar() or putc(). No
getcmd() Parse the argument vector passed to main() instead. No
getnid() netmgr_ndtostr() Yes Unlike QNX 4, QNX 6 doesn't use network ids (nids). Instead, nodes on a network have names. To get the name of the caller's node, use netmgr_ndtostr() with the nd parameter set to ND_LOCAL_NODE.
The migration library has a getnid() function that returns whatever was passed to mig4nto-procmgr via the -n option.
gettimer() timer_gettime() No
getwd() getcwd() No The getwd() function requires a preallocated buffer, whereas getcwd() will allocate one if it's passed NULL for the buffer. The getcwd() function also has a size parameter. For portability, use getcwd() instead of getwd().
_gmtime() gmtime_r() No

H

QNX 4 function QNX 6 equivalent In migration library? Comments
halloc() calloc() No
_heapchk() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_heapenable() NO LONGER SUPPORTED No
_heapgrow() NO LONGER SUPPORTED No
_heapmin() NO LONGER SUPPORTED No
_heapset() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_heapshrink() NO LONGER SUPPORTED No
_heapwalk() NO LONGER SUPPORTED No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
hfree() free() No

I

QNX 4 function QNX 6 equivalent In migration library? Comments
ioctl() devctl() No For the dcmds to use with QSSL-supplied resource managers, see <sys/dcmd_*.h>.
inp() in8() No Note that mmap_device_io() should be called before calling the port I/O functions.
inpd() in32() No Note that mmap_device_io() should be called before calling the port I/O functions.
inpw() in16() No Note that mmap_device_io() should be called before calling the port I/O functions.
__isascii() isascii() No
__iscsym() isalpha(), isdigit() No Replace with an expression using isalpha(), isdigit() and testing for the underscore character.
__iscsymf() isalpha() No Replace with an expression using isalpha() and testing for the underscore character.
_itoa() itoa() No

K

QNX 4 function QNX 6 equivalent In migration library? Comments
kbhit() tcischars() No

L

QNX 4 function QNX 6 equivalent In migration library? Comments
lfind() NO LONGER SUPPORTED No
_localtime() localtime_r() No
lock() fcntl() with F_SETLK No
locking() tell() and fcntl() with F_SETLK No
_locking() tell() and fcntl() with F_SETLK No
log2() NO LONGER SUPPORTED No
_lrotl() NO LONGER SUPPORTED No
_lrotr() NO LONGER SUPPORTED No
lsearch() NO LONGER SUPPORTED No
_ltoa() ltoa() No

M

QNX 4 function QNX 6 equivalent In migration library? Comments
_makepath() NO LONGER SUPPORTED No
__max() NO LONGER SUPPORTED No
_memavl() NO LONGER SUPPORTED No
_memicmp() memicmp() No
_memmax() NO LONGER SUPPORTED No
__min() NO LONGER SUPPORTED No
MK_FP() NO LONGER SUPPORTED No
mktimer() timer_create() No
mount() mount() No This is supported, but its parameters have changed.
mouse_close() NO LONGER SUPPORTED No
mouse_flush() NO LONGER SUPPORTED No
mouse_open() NO LONGER SUPPORTED No
mouse_param() NO LONGER SUPPORTED No
mouse_read() NO LONGER SUPPORTED No
movedata() memcpy() No
_msize() _msize(), _musize(), and DH_ULEN() No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.

N

QNX 4 function QNX 6 equivalent In migration library? Comments
_ncalloc() calloc() No
_nexpand() realloc() No You can use realloc() in place of this, but beware that realloc() will move your memory block to a new address if needed, and _nexpand() will fail rather than move your memory block to a new address.
_nfree() free() No
_nheapchk() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_nheapgrow() NO LONGER SUPPORTED No
_nheapmin() NO LONGER SUPPORTED No
_nheapset() mallopt() with MALLOC_VERIFY No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_nheapshrink() NO LONGER SUPPORTED No
_nheapwalk() NO LONGER SUPPORTED No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
_nmalloc() malloc() No
_nmsize() _msize(), _musize(), and DH_ULEN() No See the malloc_g library described in the "Heap Analysis" chapter in Programmer's Guide.
nosound() NO LONGER SUPPORTED No
_nrealloc() realloc() No

O

QNX 4 function QNX 6 equivalent In migration library? Comments
onexit() atexit() No
outp() out8() No Note that mmap_device_io() should be called before calling the port I/O functions.
outpd() out32() No Note that mmap_device_io() should be called before calling the port I/O functions.
outpw() out16() No Note that mmap_device_io() should be called before calling the port I/O functions.

P

QNX 4 function QNX 6 equivalent In migration library? Comments
print_usage() NO LONGER SUPPORTED No
putch() Set /dev/tty as standard output and call putchar(). No Alternate method: simply open /dev/tty and use putc().

Q

QNX 4 function QNX 6 equivalent In migration library? Comments
qnx_adj_time() ClockAdjust() No
qnx_device_attach() rsrcdbmgr_devno_attach() No
qnx_device_detach() rsrcdbmgr_devno_detach() No
qnx_display_hex() NO LONGER SUPPORTED No
qnx_display_msg() NO LONGER SUPPORTED No
qnx_fd_attach() NO LONGER SUPPORTED No The resource manager library removes the need for this.
qnx_fd_detach() NO LONGER SUPPORTED No The resource manager library removes the need for this.
qnx_fd_query() None currently No There may be something later.
qnx_fullpath() realpath() No Use realpath() followed by a call to netmgr_ndtostr() to get the node name.
qnx_getclock() None currently for remote nodes. No Currently, there's no way of getting the time from another node in a native QNX network. Use clock_gettime() to get the time on the local node.
qnx_getids() NO LONGER SUPPORTED No See the section on "Getting process information" in the Programming Issues chapter in this guide.
qnx_hint_attach() InterruptAttach() or InterruptAttachEvent() No
qnx_hint_detach() InterruptDetach() No
qnx_hint_mask() InterruptMask() and InterruptUnmask() No
qnx_hint_query() NO LONGER SUPPORTED No
qnx_ioctl() devctl() No For the dcmds to use with QSSL-supplied resource managers, see <sys/dcmd_*.h>.
qnx_ioctlmx() devctl() No For the dcmds to use with QSSL-supplied resource managers, see <sys/dcmd_*.h>.
qnx_name_attach() name_attach() or write a resource manager Yes If you're not using the migration library and you're using QNX 6, then use name_attach() or write resource managers.
For some other methods that the sender can use to find the receiver, see the section on "How does the sender find the receiver?" in the Programming Issues chapter in this guide.
qnx_name_detach() Yes If you're not using the migration library and you're replacing qnx_name_attach() with name_attach(), then use name_detach().
qnx_name_locate() name_open() or write a resource manager Yes If you're not using the migration library and you're using QNX 6, then use name_attach() or write resource managers.
For some other methods that the sender can use to find the receiver, see the section on "How does the sender find the receiver?" in the Programming Issues chapter in this guide.
qnx_name_locators() NO LONGER SUPPORTED No
qnx_name_nodes() NO LONGER SUPPORTED No
qnx_name_query() Yes Names registered via name_attach() (QNX 6) appear in /dev/name/local and /dev/name/global.
The migration library has a qnx_name_query() function for querying the names registered using the qnx_name_attach() migration library function.
qnx_net_alive() netmgr_ndtostr() with ND_LOCAL_NODE, readdir() No Find out the name of your network directory by calling netmgr_ndtostr() with ND_LOCAL_NODE for the nd parameter. Then walk through the network directory using readdir(). The nodes listed are those that are up.
qnx_nidtostr() netmgr_ndtostr() No
qnx_osinfo() NO LONGER SUPPORTED Yes See the section on "Getting system information" in the Programming Issues chapter in this guide.
qnx_osstat() sysconf() No QNX 6 doesn't have as many hard limits as QNX 4, but instead keeps allocating memory until it runs out. Some limits can be found out by calling sysconf().
qnx_pflags() NO LONGER SUPPORTED No See the section on "Process flags" in the Programming Issues chapter in this guide.
qnx_prefix_attach() name_attach() or pathmgr_symlink() No If you were using this function just to put a name in the prefix table so that other processes could find yours, then use name_attach() instead (QNX 6).
If you were using this function in an I/O manager that handled _IO_* messages, then you need to convert to the resource manager library.
If you were using this function to create an alias, then use pathmgr_symlink() instead.
qnx_prefix_detach() name_detach() or resmgr_detach() or pathmgr_unlink() or unlink() No If you're using name_attach() to register a name (QNX 6), then use name_detach() to detach it.
If you're writing a resource manager and had attached the name via resmgr_attach(), then use resmgr_detach() to detach it.
If you wanted to remove a symlink created using pathmgr_symlink(), then use pathmgr_unlink() or unlink() instead.
qnx_prefix_getroot() NO LONGER SUPPORTED No QNX 6 doesn't have the concept of a network root.
qnx_prefix_query() NO LONGER SUPPORTED No For the names that are associated with a resource manager, you can walk through the directory structure under /proc/mount. The numbers shown refer to a resource manager and are nd,pid,chid,handle,type where the type is one of the _FTYPE_* macros in <sys/ftype.h>. Names that are the equivalent of replacements (or aliases) aren't visible in QNX 6.
qnx_prefix_setroot() NO LONGER SUPPORTED No QNX 6 doesn't have the concept of a network root.
qnx_proxy_attach() Replace proxies with pulses Yes If you're not using the migration library, then consider replacing proxies with pulses.
qnx_proxy_detach() NO LONGER SUPPORTED Yes If you're not using the migration library and you're replacing qnx_proxy_attach() with pulses, then you may need to detach the connection for delivering the pulse.
qnx_proxy_rem_attach() Replace proxies with pulses No If you're not using the migration library, then consider replacing proxies with pulses.
qnx_proxy_rem_detach() Replace proxies with pulses No If you're not using the migration library and you're replacing qnx_proxy_rem_attach() with pulses, then you may need to detach the connection for delivering the pulse.
qnx_psinfo() NO LONGER SUPPORTED Yes See the section on "Getting system information" in the Programming Issues chapter in this guide.
qnx_scheduler() sched_setscheduler() for the local case. No Currently, there's no way to do this across the network.
qnx_segment_alloc() NO LONGER SUPPORTED No See shm_open(), ftruncate(), and mmap().
qnx_segment_alloc_flags() NO LONGER SUPPORTED No See shm_open(), ftruncate(), and mmap().
qnx_segment_arm() NO LONGER SUPPORTED No
qnx_segment_flags() NO LONGER SUPPORTED No See mmap().
qnx_segment_free() NO LONGER SUPPORTED No See munmap() and shm_unlink().
qnx_segment_get() NO LONGER SUPPORTED No
qnx_segment_huge() NO LONGER SUPPORTED No
qnx_segment_index() NO LONGER SUPPORTED No
qnx_segment_info() NO LONGER SUPPORTED No To get a physical address, use posix_mem_offset().
qnx_segment_overlay() NO LONGER SUPPORTED No See mmap_device_memory() or mmap().
qnx_segment_overlay_flags() NO LONGER SUPPORTED No See mmap_device_memory() or mmap().
qnx_segment_put() NO LONGER SUPPORTED No
qnx_segment_raw_alloc() shm_ctl() No Create a shared memory object and use shm_ctl() to both set its size and to create it as contiguous. If the process dies, then as long as you don't do shm_unlink() the memory will still be set aside. To get a physical address, use posix_mem_offset().
qnx_segment_raw_free() shm_unlink() No To return memory allocated as detailed above under qnx_segment_raw_alloc(), close() the file descriptor, munmap() the memory, and call shm_unlink().
There's no equivalent function for adding memory that wasn't reported by the BIOS. However, this sort of thing can be done using the -M option to startup-* (Utilities reference) or from the startup code using add_mem() (see Building Embedded Systems in the Embedding SDK package).
qnx_segment_realloc() N/A No You can grow shared memory at any time. You can shrink it only to 0 bytes and only when no other process has it mapped. Shrinking it to other sizes may be implemented in a furture release.
qnx_setclock() clock_settime() for the local case. No Currently, there's no way to do this across the network.
qnx_setids() NO LONGER SUPPORTED No
qnx_sflags() NO LONGER SUPPORTED No To obtain the equivalent of most of these flags, see the source for qnx_osinfo() in the migration library.
qnx_sid_query() NO LONGER SUPPORTED No
qnx_spawn() spawn() and spawn* family. Yes See the section on "Process issues" in the Programming Issues chapter in this guide.
qnx_strtonid() netmgr_ndtostr() No
qnx_sync() sync(), possibly with fdatasync() or fsync(). No Note that these will not sync a filesystem on another node of the network.
qnx_ticksize() ClockPeriod() No This behaves like qnx_ticksize() with the _TICKSIZE_CLOSEST flag.
qnx_trace_close() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_trace_info() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_trace_open() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_trace_read() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_trace_severity() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_trace_trigger() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
qnx_umask() N/A No There's no way to set the umask of another process, but you can use umask() to set the umask for the caller.
qnx_vc_attach() ConnectAttach() No
qnx_vc_detach() ConnectDetach() No
qnx_vc_name_attach() open() or name_open() No This is the equivalent of doing open() (or name_open()) of a name that is registered by a process on another node via resmgr_attach() (or name_attach()).
qnx_vc_poll_parm() NO LONGER SUPPORTED No See the various docs on QNX 6 native networking for similar options.

R

QNX 4 function QNX 6 equivalent In migration library? Comments
Readmsg() MsgRead() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.
Readmsgmx() MsgReadv() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.
Receive() MsgReceive() Yes Note that this takes a channel ID returned from ChannelCreate() instead of a process ID.
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
Receivemx() MsgReceivev() Yes Note that this takes a channel ID returned from ChannelCreate() instead of a process ID.
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
Relay() NO LONGER SUPPORTED No
reltimer() timer_settime(CLOCK_REALTIME, 0, ...) No
Reply() MsgReply() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.
Replymx() MsgReplyv() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.
rmtimer() timer_delete() No
_rotl() NO LONGER SUPPORTED No
_rotr() NO LONGER SUPPORTED No

S

QNX 4 function QNX 6 equivalent In migration library? Comments
_searchenv() searchenv() No Note that searchenv() doesn't search in the current directory unless it's specified in the given environment variable.
segread() NO LONGER SUPPORTED No
Send() MsgSend() Yes Note that this takes a connection ID (coid) instead of a process ID. This coid (a file descriptor) can be obtained from open() or ConnectAttach(..., _NTO_SIDE_CHANNEL, ...).
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
Sendfd() MsgSend() No Note that this takes a file descriptor (which is also a connection ID in QNX 6).
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
Sendfdmx() MsgSendv() No Note that this takes a file descriptor (which is also a connection ID in QNX 6).
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
Sendmx() MsgSendv() Yes Note that this takes a connection ID (coid) instead of a process ID. This coid (a file descriptor) can be obtained from open() or ConnectAttach(..., _NTO_SIDE_CHANNEL, ...).
For more information, see the section on "Channel IDs vs process IDs" in the Programming Issues chapter in this guide.
_setmx() SETIOV() for use with the QNX 6 Msg*() functions. Yes -- a _setmx() macro is provided in the migration library header file.
set_new_handler() N/A No This is available in the C++ library (posted as free software for QNX 6).
_set_new_handler() N/A No This is available in the C++ library (posted as free software for QNX 6).
sound() NO LONGER SUPPORTED No
_splitpath() NO LONGER SUPPORTED No
_splitpath2() NO LONGER SUPPORTED No
stackavail() __stackavail() No
_status87() NO LONGER SUPPORTED No
_strdate() time(), localtime(), gmtime(), and strftime() No
_strdup() strdup() No
_stricmp() stricmp() No
_strlwr() strlwr() No
_strnicmp() strnicmp() No
_strrev() strrev() No
_strtime() time(), localtime(), gmtime(), and strftime() No
_strupr() strupr() No

T

QNX 4 function QNX 6 equivalent In migration library? Comments
tcsetct() N/A No Although there's no equivalent function for this, the first tty that is opened without O_NOCTTY after a call to setsid() and that doesn't already have a controlling process will cause the calling process to be the controlling process for this tty.
term_attr_type() NO LONGER SUPPORTED No Use ncurses instead.
term_axis() NO LONGER SUPPORTED No Use ncurses instead.
term_bar() NO LONGER SUPPORTED No Use ncurses instead.
term_box() NO LONGER SUPPORTED No Use ncurses instead.
term_box_fill() NO LONGER SUPPORTED No Use ncurses instead.
term_box_off() NO LONGER SUPPORTED No Use ncurses instead.
term_box_on() NO LONGER SUPPORTED No Use ncurses instead.
term_clear() NO LONGER SUPPORTED No Use ncurses instead.
term_color() NO LONGER SUPPORTED No Use ncurses instead.
term_cur() NO LONGER SUPPORTED No Use ncurses instead.
term_delete_char() NO LONGER SUPPORTED No Use ncurses instead.
term_delete_line() NO LONGER SUPPORTED No Use ncurses instead.
term_down() NO LONGER SUPPORTED No Use ncurses instead.
term_field() NO LONGER SUPPORTED No Use ncurses instead.
term_fill() NO LONGER SUPPORTED No Use ncurses instead.
term_flush() NO LONGER SUPPORTED No Use ncurses instead.
term_get_line() NO LONGER SUPPORTED No Use ncurses instead.
term_home() NO LONGER SUPPORTED No Use ncurses instead.
term_init() NO LONGER SUPPORTED No Use ncurses instead.
term_insert_char() NO LONGER SUPPORTED No Use ncurses instead.
term_insert_line() NO LONGER SUPPORTED No Use ncurses instead.
term_insert_off() NO LONGER SUPPORTED No Use ncurses instead.
term_insert_on() NO LONGER SUPPORTED No Use ncurses instead.
term_key() NO LONGER SUPPORTED No Use ncurses instead.
term_left() NO LONGER SUPPORTED No Use ncurses instead.
term_lmenu() NO LONGER SUPPORTED No Use ncurses instead.
term_load() NO LONGER SUPPORTED No Use ncurses instead.
term_menu() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_default() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_flags() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_handler() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_hide() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_move() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_off() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_on() NO LONGER SUPPORTED No Use ncurses instead.
term_mouse_process() NO LONGER SUPPORTED No Use ncurses instead.
term_printf() NO LONGER SUPPORTED No Use ncurses instead.
term_receive() NO LONGER SUPPORTED No Use ncurses instead.
term_relearn_size() NO LONGER SUPPORTED No Use ncurses instead.
term_resize_off() NO LONGER SUPPORTED No Use ncurses instead.
term_resize_on() NO LONGER SUPPORTED No Use ncurses instead.
term_restore() NO LONGER SUPPORTED No Use ncurses instead.
term_restore_image() NO LONGER SUPPORTED No Use ncurses instead.
term_right() NO LONGER SUPPORTED No Use ncurses instead.
term_save_image() NO LONGER SUPPORTED No Use ncurses instead.
term_scroll_down() NO LONGER SUPPORTED No Use ncurses instead.
term_scroll_up() NO LONGER SUPPORTED No Use ncurses instead.
term_setup() NO LONGER SUPPORTED No Use ncurses instead.
term_type() NO LONGER SUPPORTED No Use ncurses instead.
term_unkey() NO LONGER SUPPORTED No Use ncurses instead.
term_up() NO LONGER SUPPORTED No Use ncurses instead.
term_video_off() NO LONGER SUPPORTED No Use ncurses instead.
term_video_on() NO LONGER SUPPORTED No Use ncurses instead.
term_window_scan() NO LONGER SUPPORTED No Use ncurses instead.
tfork() N/A No QNX 6 has true POSIX threads. See the pthread_*() functions (specifically, pthread_create()) as a starting point.
timer_create() timer_create() No The QNX 4 version was based on a draft standard. In QNX 6, the timer ID is returned through the third parameter, and the sigevent structure is filled in differently.
_tolower() tolower() No
_toupper() toupper() No
Trace0() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace0b() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace1() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace2() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace2b() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace3() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace4() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace4b() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace5() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace5b() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace6() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trace6b() NO LONGER SUPPORTED No Consider using syslog() for logging instead.
Trigger() N/A Yes Proxies have been replaced by pulses. See the section on "Proxies vs pulses" in the chapter on Programming Issues in this guide.
The migration library Trigger() function works the same as the QNX 4 one, but it's slower if the "triggerer" is in a different process than that which the proxy is attached to. For details, see the Trigger() function in the Migration Library chapter in this guide.

U

QNX 4 function QNX 6 equivalent In migration library? Comments
umount() umount() No This is supported, but it now has unused flags parameters.
ungetch() ungetc() No
unlock() fcntl() with F_SETLK No

V

QNX 4 function QNX 6 equivalent In migration library? Comments
_vbprintf() vsnprintf() No
vcprintf() vprintf(), with /dev/tty set as standard output. No
vcscanf() vsscanf(), with /dev/tty set as standard output. No

W

QNX 4 function QNX 6 equivalent In migration library? Comments
Writemsg() MsgWrite() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.
Writemsgmx() MsgWritev() Yes Note that this takes the receive ID returned from MsgReceive() instead of a process ID.

Y

QNX 4 function QNX 6 equivalent In migration library? Comments
Yield() sched_yield() Yes

[Previous] [Contents] [Next]