Porting Differences for
Linux and AIX APIs

This document Copyright IBM Corp. 2000, 2001.

Overview

This document is intended to aid application developers when porting source code from Linux to AIX, or when writing code on Linux that is intended for eventual deployment on AIX.  Each of the Linux system calls and C runtime APIs, their prototypes and functionality, is discussed.  This document only describes compatibility at the source level.

This document should be viewed only as a source of information.  It does not represent a commitment by IBM either to modify AIX, nor to implement/not implement those functions that were found to be incompatible.

In the tables below, functions in bold italics were found to have differences.
 

Contents

System calls table

Library functions table

File macro values

Signal values

Poll macro values

File open modes

Macro definitions for libc(header file locations)


System calls

The following table was obtained from the system call table (syscalls.h) in the i386 port of Linux 2.2.14.  This table arranges the calls in alphabetical order.  Some of the calls listed do not exist on all Linux ports and some are not listed in the LSB.  They are included anyway.
 

access

acct

adjtimex

alarm

bdflush

brk

capget

capset

chdir

chmod

chown

chroot

clone

close

creat

create_module

delete_module

dup

dup2

execve

exit

fchdir

fchmod

fchown

fcntl

fdatasync

flock

fork

fstat

fstatfs

fsync

ftruncate

get_kernel_syms

getcwd

getegid

geteuid

getgid

getgroups

getitimer

getpgid

getpgrp

getpid

getppid

getpriority

getresgid

getresuid

getrlimit

getrusage

getsid

gettimeofday

getuid

idle

init_module

ioctl

ioperm

iopl

ipc

kill

lchown

link

llseek

lseek

lstat

mkdir

mknod

mlock

mlockall

mmap

modify_ldt

mount

mprotect

mremap

msync

munlock

munlockall

munmap

nanosleep

nfsservctl

nice

open

pause

personality

pipe

poll

prctl

pread

ptrace

pwrite

query_module

quotactl

read

readdir

readlink

readv

reboot

rename

rmdir

sched_get_priority_max

sched_get_priority_min

sched_getparam

sched_getscheduler

sched_rr_get_interval

sched_setparam

sched_setscheduler

sched_yield

select

sendfile

setdomainname

setfsgid

setfsuid

setgid

setgroups

sethostname

setitimer

setpgid

setpriority

setregid

setresgid

setresuid

setreuid

setrlimit

setsid

settimeofday

setuid

sgetmask

sigaction

sigaltstack

signal

sigpending

sigprocmask

sigreturn

sigsuspend

socketcall

ssetmask

stat

statfs

stime

swapoff

swapon

symlink

sync

sysctl

sysfs

sysinfo

syslog

time

times

truncate

umask

umount

uname

unlink

uselib

ustat

utime

vfork

vhangup

vm86

wait4

waitpid

write

writev


Standard functions

The remaining functions are from the LSB.
 
 

abort

abs

accept

asctime

atexit

atof

atoi

atol

bcmp

bcopy

bind

bsearch

bzero

calloc

catclose

catgets

catopen

cfgetispeed

cfgetospeed

cfsetispeed

cfsetospeed

cfsetspeed

clearerr

clock

closedir

connect

ctermid

ctime

daylight

difftime

div

drand48

ecvt

endgrent

endpwent

erand48

execl

execle

execlp

execv

execvp

fclose

fcvt

fdopen

feof

ferror

fflush

ffs

fgetc

fgetpos

fgets

fileno

fopen

fprintf

fputc

fputs

fread

free

freopen

fscanf

fseek

fsetpos

ftell

fwrite

getc

getchar

getenv

getgrent

gethostid

gethostname

getmsg

getpeername

getpwent

getpwuid

gets

getsockname

getsockopt

getw

gmtime

index

initgroups

initstate

insque

isalnum

isalpha

isascii

iscntrl

isdigit

isgraph

islower

isprint

ispunct

isspace

isupper

iswalnum

iswalpha

iswblank

iswcntrl

iswctype

iswdigit

iswgraph

iswlower

iswprint

iswpunct

iswspace

iswupper

iswxdigit

isxdigit

jrand48

killpg

labs

ldiv

listen

localtime

lrand48

malloc

memccpy

memchr

memcmp

memcpy

memset

mkfifo

mkstemp

mktemp

mktime

mrand48

msgctl

msgget

msgrcv

msgsnd

nrand48

opendir

pathconf

pause

printf

putc

putchar

putenv

putmsg

puts

putw

qsort

raise

rand

random

re_comp

re_compile_fastmap

re_compile_pattern

re_exec

re_match

re_match_2

re_search

re_search_2

re_set_registers

re_set_syntax

realloc

recv

recvfrom

recvmsg

regcomp

regerror

regexec

regfree

remove

remque

res_init

rewind

rewinddir

rexec

rindex

sbrk

scanf

seed48

seekdir

semctl

semget

semop

send

sendmsg

sendto

setbuf

setegid

seteuid

setgrent

sethostid

sethostname

setlocale

setpgrp

setpwent

setsockopt

setstate

setvbuf

shmat

shmctl

shmdt

shmget

shutdown

sigaction

sigaddset

sigaltstack

sigandset

sigblock

sigdelset

sigemptyset

sigfillset

siggetmask

sighold

sigignore

siginterrupt

sigisemptyset

sigismember

siglongjmp

signal

sigorset

sigpause

sigpending

sigprocmask

sigqueue

sigrelse

sigreturn

sigset

sigsetmask

sigstack

sigsuspend

sigtimedwait

sigvec

sigwait

sigwaitinfo

sleep

snprintf

socket

socketpair

sprintf

srand

srand48

srandom

sscanf

statvfs

strcasecmp

strcasestr

strcat

strchr

strcmp

strcoll

strcpy

strcspn

strdup

strerror

strerror_r

strfmon

strfry

strftime

strlen

strncasecmp

strncat

strncmp

strncpy

strndup

strnlen

strpbrk

strptime

strrchr

strsep

strsignal

strspn

strstr

strtod

strtof

strtoimax

strtok

strtok_r

strtol

strtold

strtoll

strtoq

strtoul

strtoull

strtoumax

strtouq

strverscmp

strxfrm

swab

sysconf

tcdrain

tcflow

tcflush

tcgetattr

tcgetpgrp

tcgetsid

tcsendbreak

tcsetattr

tcsetpgrp

telldir

tempnam

timezone

tolower

toupper

tzname

tzset

tzset

ulimit

ungetc

vfprintf

vprintf

vsnprintf

vsprintf

wait

wait3

waitid


System Calls in Alphabetical Order

 

access

NAME
access - check user's permissions for a file

Linux prototype

#include <unistd.h>

int access(const char *pathname, int mode);

AIX prototype

#include <unistd.h>

int access (char *PathName, int Mode);
 

Details

Functions are compatible.  In AIX, access() is a system call.  See file bits for file modes.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT- The connection timed out


acct

NAME
acct - switch process accounting on or off

Linux prototype

#include <unistd.h>

int acct(const char *filename);

AIX prototype

int acct (char *Path);

Details

Functions are compatible.  AIX does not define a prototype.

Errno

When called in AIX, this function can return these additional errnos not documented in Linux:
EBUSY - An attempt is made to enable accounting when it is already enabled.
ENOENT - The file named by the Path parameter does not exist.


adjtimex

NAME
adjtimex - tune kernel clock

Linux prototype

#include <sys/timex.h>

int adjtimex(struct timex *buf);

AIX prototype

NONE

Details

adjtimex  is Linux specific and should not be used in programs intended to be portable.  There  is  a  similar  but less general call adjtime in SVr4.

Proposal

No AIX support is planned for this interface.


alarm

NAME
alarm - set an alarm clock for delivery of a signal

Linux prototype

#include <unistd.h>

unsigned int alarm(unsigned int seconds);

AIX prototype

#include <unistd.h>

unsigned int alarm(unsigned int Seconds);

Details

Functions are compatible.


bdflush

NAME
bdflush - start, flush, or tune buffer-dirty-flush daemon

Linux prototype

int bdflush(int func, long *address);
int bdflush(int func, long data);

AIX prototype

NONE

Details

bdflush  is  Linux specific and should not be used in programs intended to be portable.

Proposal

This call will not be added to AIX.


brk

NAME
brk, sbrk - change data segment size

Linux prototype

#include <unistd.h>

int brk(void *end_data_segment);
void *sbrk(ptrdiff_t increment);

AIX prototype

#include <unistd .h>

int brk (char *EndDataSegment);
void *sbrk (intptr_t Increment);

Details

Functions are compatible.  The void * end_data_segment in Linux will not cause any compiler problems when compiled on AIX.  The ptrdiff_t type is defined as a long in AIX and did not cause compile errors when tested.


capget

NAME
capget, capset - set/get process capabilities

Linux prototype

#undef _POSIX_SOURCE
#include <sys/capability.h>

int   capget(cap_user_header_t   header,   cap_user_data_t data);
int capset(cap_user_header_t header, const cap_user_data_t data);
 

AIX prototype

NONE

Detail

Not provided in AIX

Proposal

No support is planned for these calls in AIX.


chdir

NAME
chdir - change working directory

Linux prototype

#include <unistd.h>

int chdir(const char *path);

AIX prototype

#include <unistd.h>

int chdir (const char *Path);

Details

Functions are compatible.   Chdir() is a system call in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT- The connection timed out


chmod

NAME
chmod, fchmod - change permissions of a file

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>

int chmod(const char *path, mode_t mode);
int fchmod(int fildes, mode_t mode);

AIX prototype

#include <sys/stat.h>

int chmod(const char *Path, mode_t Mode);
int fchmod(int FileDescriptor, mode_t Mode);

Details

Functions are compatible.    These are system calls in AIX.  See file bits for file mode values.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT- The connection timed out


chown

NAME
chown, fchown, lchown - change ownership of a file

Linux prototype

#include <sys/types.h>
#include <unistd.h>

int chown(const char *path, uid_t owner, gid_t group);
int fchown(int fd, uid_t owner, gid_t group);
int lchown(const char *path, uid_t owner, gid_t group);

AIX prototype

#include <sys/types.h>
#include <unistd.h>

int chown(const char * Pathuid_t Owner, gid_t Group);
int fchown(int FileDescriptoruid_t Owner, gid_t Group);
int lchown(const char *Path, uid_t Owner, gid_t Group);

Details

Functions are compatible.   These are system calls on AIX.  Uid_t and gid_t are unsigned ints on both AIX and Linux.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The new group for the file system object cannot be set because the group's quota of disk blocks or i-nodes has been exhausted on the file system.
EINVAL -  The owner or group ID supplied is not valid.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT- The connection timed out


chroot

NAME
chroot - change root directory

Linux prototype

#include <unistd.h>

int chroot(const char *path);


AIX prototype

#include <unistd.h>

int chroot (const char *Path);
 

Details

Functions are compatible.  In AIX this is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux :
ESTALE -   The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT- The connection timed out


clone

NAME
clone - create a child process

Linux prototype

#include <sched.h>

int  clone(int (*fn) (void *arg), void *child_stack, int flags, void *arg);

AIX prototype

NONE

Details

The  clone call is Linux-specific and should not be used in programs intended  to  be  portable.

Proposal

This will not be implemented in AIX.
This is only intended for use by the threads library.  In AIX, the pthreads library should be used.


close

NAME
close - close a file descriptor

Linux prototype

#include <unistd.h>

int close(int fd);

AIX prototype

#include <unistd.h>

int close (int FileDescriptor);

Details

Functions are compatible.  In AIX, close() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINTR - The close subroutine was interrupted by a signal.
ETIMEDOUT - The connection timed out.


creat

NAME
creat - create a file or device

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int creat(const char *pathname, mode_t mode);

AIX prototype

#include <fcntl.h>

int creat (const char *Path, [mode_t Mode]);

Details

Functions are compatible.  This is a system call on AIX.  See file bits for details on file modes.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory in which the entry for the new link is being placed cannot be extended, or an i-node could not be allocated for the file, because the user or group quota of disk blocks or i-nodes in the file system containing the directory has been exhausted.
EOVERFLOW - A call was made to open or creat and the file already existed and its size was larger than OFF_MAX and the O_LARGEFILE flag was not set.


create_module

NAME
create_module - create a loadable module entry

Linux prototype

#include <linux/module.h>

caddr_t create_module(const char *name, size_t size);

AIX prototype

NONE

Details

AIX does not support loadable modules, but uses kernel extensions.

Proposal

This call will not be available in AIX.


delete_module

NAME
delete_module - delete a loadable module entry

Linux prototype

#include <linux/module.h>

int delete_module(const char *name);

AIX prototype

NONE

Details

AIX does not support loadable modules, but uses kernel extensions.

Proposal

This call will not be available in AIX.


dup

NAME
dup, dup2 - duplicate a file descriptor

Linux prototype

#include <unistd.h>

int dup(int oldfd);
int dup2(int oldfd, int newfd);

AIX prototype

#include <unistd.h>

int dup(int oldfd);
int dup2(int oldfd, int newfd);

Details

Functions are compatible.  In AIX, dup() and dup2() use fcntl().


execve

NAME
execve - execute program

Linux prototype

#include <unistd.h>

int  execve  (const char  *filename,  char *const argv [],  char *const envp[]);

AIX prototype

#include <unistd.h>

int execve (const char *Pathchar *const ArgumentV[ ], char *const EnvironmentPointer[ ]);

Details

Functions are compatible.  Execve() is a system call in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINTR - The close subroutine was interrupted by a signal.
ETIMEDOUT - The connection timed out.


exit

NAME
       exit - cause normal program termination

Linux prototype

#include <stdlib.h>

void exit(int status);

AIX prototype

#include <stdlib.h>

void exit(int status);

Details

Functions are compatible.  Programs can call _exit(), but this bypasses the library level and results in direct kernel entry.


fchdir

NAME
fchdir - change working directory

Linux prototype

#include <unistd.h>

int fchdir(int fd);

AIX prototype

#include <unistd.h>

int fchdir (int Fildes);

Details

Functions are compatible.  In AIX fchdir() is a system call.


fcntl

NAME
fcntl - manipulate file descriptor

Linux prototype

#include <unistd.h>
#include <fcntl.h>

int fcntl(int fd, int cmd);
int fcntl(int fd, int cmd, long arg);
int fcntl(int fd, int cmd, struct flock *lock);

AIX prototype

#include <fcntl.h>

int fcntl (int  FileDescriptor, int Command, ...);

Details

Functions are compatible.   AIX does not support Linux-specific command extensions.   See file bits for command values.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESRCH - The value of the Command parameter is F_SETOWN, and the process ID specified as the Argument parameter is not in use.
EOVERFLOW - The Command parameter was F_GETLK and the block lock could not be represented in the flock structure.
ETIMEDOUT - The connection timed out.



fdatasync

NAME
fdatasync - synchronize a file's in-core data with that on disk

Linux prototype

#include <unistd.h>

#ifdef _POSIX_SYNCHRONIZED_IO
int fdatasync(int fd);
#endif

AIX prototype

#include <unistd.h>

int fdatasync(int fd);

Detail

Functions are compatible, but archaic.  Use fsync().


flock

NAME
flock - apply or remove an advisory lock on an open file

Linux prototype

#include <sys/file.h>

int flock(int fd, int operation);

AIX prototype

#include <sys/file.h>

int flock(int fd, int operation);

Detail

Functions are compatible.  In AIX, flock is implemented via the fcntl() system call.


fork

NAME
       fork - create a child process

Linux prototype

#include <unistd.h>

pid_t fork(void);

AIX prototype

#include <unistd.h>

pid_t fork(void);

Details

Functions are compatible.


fstat

NAME
stat, fstat, lstat - get file status

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int stat(const char *file_name, struct stat * buf);
int fstat(int filedes, struct stat * buf);
int lstat(const char *file_name, struct stat * buf);

AIX prototype

#include <sys/stat.h>

int stat(const char * Path, struct stat * Buffer);
int lstat (const char * Path, struct stat * Buffer);
int fstat (int FileDescriptor, struct stat * Buffer);

Details

Functions are source compatible.   Code that references dev_t's may not work correctly unless the macros major(), minor(), and makedev() are used.   These are found in sys/sysmacros.h.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESTALE -   The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.
EIO - An input/output (I/O) error occurred while reading from the file system.


fstatfs

NAME
statfs, fstatfs - get file system statistics

Linux prototype

#include <sys/vfs.h>

int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);

AIX prototype

#include <sys/statfs.h>

int statfs (char *Path, struct statfs *StatusBuffer);
int fstatfs (int FileDescriptor, struct statfs *StatusBuffer);
 

Details

Functions are compatible.  In AIX, the sys/vfs.h file includes sys/statfs.h.  In AIX, statfs() and fstatfs() are system calls.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ESTALE -   The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.
EIO - An input/output (I/O) error occurred while reading from the file system.



fsync

NAME
fsync  -  synchronize a file's complete in-core state with that on disk

Linux prototype

#include <unistd.h>

int fsync(int fd);

AIX prototype

#include <unistd.h>

int fsync (int FileDescriptor);

Details

Functions are compatible.  In AIX fsync() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The file is not a regular file.
EINTR - The fsync subroutine was interrupted by a signal.


ftruncate

NAME
truncate,  ftruncate  -  truncate  a  file  to a specified length

Linux prototype

#include <unistd.h>

int truncate(const char *path, off_t length);
int ftruncate(int fd, off_t length);

AIX prototype

#include <unistd.h>

int truncate (const   char *Path, off_t Length);
int ftruncate (int FileDescriptor, off_t Length);
 

Details

Functions are compatible.  In AIX truncate() and ftruncate() are system calls.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - The truncation operation fails due to an enforced write lock on a portion of the file being truncated. Because the target file was opened with the O_NONBLOCK or O_NDELAY flags set, the subroutine fails immediately rather than wait for a release.
EDQUOT - New disk blocks cannot be allocated for the truncated file. The quota of the user's or group's allotted disk blocks has been exhausted on the target file system.
EFBIG - An attempt was made to write a file that exceeds the process' file size limit or the maximum file size. If the user has set the environment variable XPG_SUS_ENV=ON prior to execution of the process, then the SIGXFSZ signal is posted to the process when exceeding the process' file size limit.
EFBIG - The file is a regular file and length is greater than the offset maximum established in the open file description associated with fildes.
EINTR - A signal was caught during execution.
EMFILE - The file is open with O_DEFER by one or more processes.
ENOSPC - New disk blocks cannot be allocated for the truncated file. There is no free space on the file system containing the file.
ESTALE -   The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.



get_kernel_syms

NAME
get_kernel_syms - retrieve exported kernel and module symbols

Linux prototype

#include <linux/module.h>

int get_kernel_syms(struct kernel_sym *table);

AIX prototype

NONE

Details

AIX does not support loadable modules, but uses kernel extensions.

Proposal

This will not be available in AIX.


getcwd

NAME
getcwd,  get_current_dir_name, getwd - Get current working directory

Linux prototype

#include <unistd.h>

char *getcwd(char *buf, size_t size);
char *get_current_dir_name(void);
char *getwd(char *buf);
 

AIX prototype

#include <unistd.h>

char *getcwd (char *Buffer, size_t Size);
char *getwd(char *buf);

Detail

Functions are compatible.  AIX does not provide get_current_dir_name().

Errno

The Linux documentation page does not provide enough information to determine whether AIX errnos are compatible.


getegid

NAME
getegid - get group identity

Linux prototype

#include <unistd.h>
#include <sys/types.h>

gid_t getegid(void);

AIX prototype

#include <unistd.h>
#include <sys/types.h>

gid_t getegid (void);

Details

Functions are compatible.


geteuid

NAME
geteuid - get user identity

Linux prototype

#include <unistd.h>
#include <sys/types.h>

uid_t geteuid(void);

AIX prototype

#include <sys/types.h>
#include <unistd.h>

uid_t geteuid(void);

Details

Functions are compatible.


getgid

NAME
getgid - get group identity

Linux prototype

#include <unistd.h>
#include <sys/types.h>

gid_t getgid(void);

AIX prototype

#include <unistd.h>
#include <sys/types.h>

gid_t getgid (void);

Details

Functions are compatible.


getgroups

NAME
getgroups, setgroups - get/set list of supplementary group IDs

Linux prototype

#include <sys/types.h>
#include <unistd.h>

int getgroups(int size, gid_t list[]);

#define _BSD_SOURCE
#include <grp.h>

int setgroups(size_t size, const gid_t *list);

AIX prototype

#include <sys/types.h>
#include <unistd.h>

int getgroups (int NGroups, gid_t GIDSet[]);

#include <grp.h>

int setgroups(int NumberGroups, gid_t *GroupIDSet);

Details

Functions are compatible.  The size_t in Linux setgroups() may cause a compiler warning.  In AIX these are system calls.



getitimer

NAME
getitimer,  setitimer  -  get  or set value of an interval timer

Linux prototype

#include <sys/time.h>

int getitimer(int which, struct itimerval *value);
int setitimer(int which, const  struct  itimerval  *value, struct itimerval *ovalue);

AIX prototype

#include <sys/time.h>

int getitimer (int Which, struct itimerval *Value);
int setitimer (int Which, struct itimerval *Value, struct itimerval *OValue);

Details

Functions are compatible.



getpgid

NAME
setpgid, getpgid, setpgrp, getpgrp - set/get process group

Linux prototype

#include <unistd.h>

int setpgid(pid_t pid, pid_t pgid);
pid_t getpgid(pid_t pid);
int setpgrp(void);
pid_t getpgrp(void);


AIX prototype

#include <unistd.h>

int setpgid(pid_t ProcessID, pid_t ProcessGroupID);
pid_t getpgid (pid_t Pid);
int setpgrp(void);
pid_t getpgrp (void);
 

Details

Functions are compatible.  This is a system call in AIX.


getpid

NAME
getpid, getppid - get process identification

Linux prototype

#include <unistd.h>

pid_t getpid(void);
pid_t getppid(void);

AIX prototype

#include <unistd.h>

pid_t getpid (void);
pid_t getppid (void);

Details

Functions are compatible.


getpriority

NAME
getpriority, setpriority - get/set program scheduling priority

Linux prototype

#include <sys/time.h>
#include <sys/resource.h>

int getpriority(int which, int who);
int setpriority(int which, int who, int prio);

AIX prototype

#include <sys/resource.h>

int getpriority(int Which, int Who);
int setpriority(int Which, int Who, int Priority)
 

Details

Functions are compatible.  The "which" flags are a equal to AIX flags.  In AIX getpriority() and setpriority() are system calls.



getresgid

NAME
setresgid,  getresgid - set or get real, effective and saved group ID

Linux prototype

#include <unistd.h>

int setresgid(uid_t ruid, uid_t euid, uid_t suid);
int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);

AIX prototype

NONE

Detail

These calls are Linux-specific,  and should not be used in programs intended to be portable.

Proposal

No AIX support is planned for these interfaces.


getresuid

NAME
setresuid,  getresuid - set real, effective and saved user or group ID

Linux prototype

#include <unistd.h>

int setresuid(uid_t ruid, uid_t euid, uid_t suid);
int getresuid(gid_t *rgid, gid_t *egid, gid_t *sgid);

AIX prototype

NONE

Detail

These calls are Linux-specific,  and should not be used in programs intended to be portable.

Proposal

No AIX support is planned for these interfaces.



getrlimit

NAME
getrlimit,  getrusage, setrlimit - get/set resource limits and usage

Linux prototype

#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>

int getrlimit (int resource, struct rlimit *rlim);
int getrusage (int who, struct rusage *usage);
int setrlimit (int resource, const struct rlimit *rlim);


AIX prototype

#include <sys/time.h>
#include <sys/resource.h>

int getrlimit(int Resource1, struct rlimit *RLP);
int getrusage (int Who, struct rusage *RUsage);
int setrlimit(int Resource1, struct rlimit *RLP);

Details

Functions are compatible.  In AIX these are system calls.

Non-scalar types

The definitions of struct rusage are identical.
The definitions of struct rlimit are identical.
AIX does not define RLIMIT_NPROC or RLIMIT_MEMLOCK resources.



getsid

NAME
getsid - get session ID

Linux prototype

#include <unistd.h>

pid_t getsid(pid_t pid);

AIX prototype

#include <unistd.h>

pid_t getsid (pid_t pid);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EPERM - The process specified by pid is not in the same session as the calling process.


gettimeofday

NAME
gettimeofday, settimeofday - get / set time

Linux prototype

#include <sys/time.h>
#include <unistd.h>

int gettimeofday(struct timeval *tv, struct timezone *tz);
int settimeofday(const struct timeval *tv ,  const  struct timezone *tz);


AIX prototype

#include <sys/time.h>

int gettimeofday (struct timeval *Tp, void *Tzp);
int settimeofday (struct timeval *Tp, struct timezone *Tzp);

Details

Functions are compatible.  The void * in AIX gettimeofday() should not cause any compiler errors or warnings.  In AIX use read_real_time() for system call in gettimeofday and settimer() for settimeofday().

Non-scalar types

The definitions of struct timeval are identical.
The definitions of struct timezone are identical.



getuid

NAME
getuid - get user identity

Linux prototype

#include <unistd.h>
#include <sys/types.h>

uid_t getuid(void);

AIX prototype

#include <sys/types.h>
#include <unistd.h>

uid_t getuid(void);

Details

Functions are compatible.


idle

NAME
idle - make process 0 idle

Linux prototype

#include <unistd.h>

int idle(void);

AIX prototype

NONE

Details

This call is Linux-specific, and should  not  be  used  in programs intended to be portable.

Proposal

This system call is used only to create the idle process in Linux.
This will not be implemented or stubbed in AIX.


init_module

NAME
init_module - initialize a loadable module entry

Linux prototype

#include <linux/module.h>

int init_module(const char *name, struct module *image);

AIX prototype

NONE

Details

AIX does not support loadable modules, but uses kernel extensions.

Proposal

This will not be implemented or stubbed in AIX.


ioctl

NAME
ioctl - control device

Linux prototype

#include <sys/ioctl.h>

int ioctl(int d, int request, ...)

AIX prototype

#include <sys/ioctl.h>
#include <sys/types.h>
#include <unistd.h>

int ioctl (int FileDescriptor,  int Command, void *Argument);

Details

Functions are not compatible.   Command values are generally driver-specific.   This function is not considered to be portable.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINTR - A signal was caught and the process had not enabled re-startable subroutines for the signal.
ENODEV - The FileDescriptor parameter is associated with a valid character or block special file, but the supporting device driver does not support the ioctl function.
ENXIO - The FileDescriptor parameter is associated with a valid character or block special file, but the supporting device driver is not in the configured state.


ioperm

NAME
ioperm - set port input/output permissions

Linux prototype

#include <sys/io.h> /* for glibc */

int  ioperm(unsigned  long  from,  unsigned  long num, int turn_on);

AIX prototype

NONE

Details

ioperm is Linux specific and should not be used in programs intended to be portable.

Proposal

This call will not be supported in AIX.


iopl

NAME
iopl - change I/O privilege level

Linux prototype

#include <unistd.h> /* for libc5 */
#include <sys/io.h> /* for glibc */

int iopl(int level);

AIX prototype

NONE

Details

iopl is Linux specific and should not be used in processes intended to be portable.

Proposal

This call will not be supported in AIX.


ipc

NAME
ipc - System V IPC system calls

Linux prototype

int  ipc(unsigned  int  call,  int  first, int second, int third, void *ptr, long fifth);

AIX prototype

NONE

Details

ipc  is Linux specific, and should not be used in programs intended to be portable.

Proposal

This is intended only for library implementors and hackers in Linux and will not be implemented in AIX.


kill

NAME
kill - send signal to a process

Linux prototype

#include <sys/types.h>
#include <signal.h>

int kill(pid_t pid, int sig);

AIX prototype

#include <sys/types.h>
#include <signal.h>

int kill(pid_t Process, int Signal);

Details

Functions are compatible.  The Linux signal SIGSTKFLT is not defined in AIX.  In AIX, kill() is a system call.


link

NAME
link - make a new name for a file

Linux prototype

#include <unistd.h>

int link(const char *oldpath, const char *newpath);

AIX prototype

#include <unistd.h>

int link (const char *Path1, const char *Path2);

Details

Functions are compatible.  Link() is a system call in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory in which the entry for the new link is being placed cannot be extended, or an i-node could not be allocated for the file, because the user or group quota of disk blocks or i-nodes in the file system containing the directory has been exhausted.
ENOSPC - Indicates the directory in which the entry for the new link is being placed cannot be extended because there is no space left on the file system containing the directory.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


llseek

NAME
llseek - reposition read/write file offset

Linux prototype

#include <unistd.h>

#include <linux/unistd.h>

int llseek(unsigned int fd,  unsigned  long offset_high, unsigned  long offset_low,  loff_t * result, unsigned int whence);

AIX prototype

offset_t llseek(int fd, offset_t offset, int whence);

Detail

llseek is Linux-specific and should not  be  used  in programs intended to be portable.

Proposal

The llseek function will not be implemented on AIX.  Use lseek64.


lseek

NAME
lseek - reposition read/write file offset

Linux prototype

#include <sys/types.h>
#include <unistd.h>

off_t lseek(int fildes, off_t offset, int whence);

AIX prototype

#include <sys/types.h>
#include <unistd.h>

off_t lseek(int FileDescriptor, off_t Offset, int Whence);

Details

Functions are compatible.   This is a system call in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EOVERFLOW - The resulting offset is larger than can be returned properly.


mkdir

NAME
mkdir - create a directory

Linux prototype

#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>

int mkdir(const char *pathname, mode_t mode);

AIX prototype

#include <sys/stat.h>

int mkdir(const char *Path, mode_t Mode);

Details

Functions are compatible.  In AIX, mkdir() is a system call.  See file bits for file mode values.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory in which the entry for the new directory is being placed cannot be extended, or an i-node or disk blocks could not be allocated for the new directory because the user's or group's quota of disk blocks or i-nodes on the file system containing the directory is exhausted.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


mknod

NAME
mknod - create a directory or special or ordinary file

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int mknod(const char *pathname, mode_t mode, dev_t dev);

AIX prototype

#include <sys/stat.h>

int mknod (const char *Path, mode_tMode, dev_tDevice);

Details

Functions are source compatible.  This is a system call on AIX.  Note that on 32 bit AIX kernel, dev_t is an unsigned int and on Linux, dev_t is an unsigned 64 bit value.  Code that references dev_t's may not work correctly unless the macros major(), minor(), and makedev() are used.   These are found in sys/sysmacros.h.  See file bits for file mode bits.


mlock

NAME
mlock - disable paging for some parts of memory

Linux prototype

#include <sys/mman.h>

int mlock(const void *addr, size_t len);

AIX prototype

NONE

Detail

This call does not exist on AIX.  AIX does not allow applications to pin memory.

Proposal

This is part of POSIX realtime.  No support for this is planned for AIX.


mlockall

NAME
mlockall - disable paging for calling process

Linux prototype

#include <sys/mman.h>

int mlockall(int flags);

AIX prototype

NONE

Detail

This call does not exist on AIX.   AIX does not allow applications to pin memory.

Proposal

This is part of POSIX realtime.  No support for this is planned for AIX.


mmap

NAME
mmap, munmap - map or unmap files or devices into memory

Linux prototype

#include <unistd.h>
#include <sys/mman.h>

#ifdef _POSIX_MAPPED_FILES

void  *  mmap(void  *start,  size_t length, int prot, int flags, int fd, off_t offset);
int munmap(void *start, size_t length);

#endif

AIX prototype

#include <sys/types.h>
#include <sys/mman.h>

void *mmap (void *addr, size_t len, int prot, int flags, int fildes, off_t off);
int munmap (void *addr, size_t len);
 

Details

Functions are compatible.  AIX does not implement the flags MAP_DENYWRITE or MAP_EXECUTABLE.  Values for prot are identical.   In AIX, mmap() and munmap() are system calls.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFBIG - The mapping requested extends beyond the maximum file size associated with fildes.
EMFILE - The application has requested SPEC1170 compliant behavior and the number of mapped regions would excedd and implementation-dependent limit (per process or per system).
ENODEV - The fildes parameter refers to an object that cannot be mapped, such as a terminal.
ENXIO - The addresses specified by the range (off, off+len) are invalid for the fildes parameter.
 EOVERFLOW - The mapping requested extends beyond the offset maximum for the file description associated with fildes.



modify_ldt

NAME
modify_ldt - get or set ldt

Linux prototype

#include <linux/ldt.h>
#include <linux/unistd.h>

int modify_ldt(int func, void *ptr, unsigned long bytecount);

AIX prototype

NONE

Details

This call is Linux-specific, and should  not  be  used  in programs intended to be portable.

Proposal

This is specific to Intel ports and will not be added to AIX.


mount

NAME
mount, umount - mount and unmount filesystems.

Linux prototype

#include <sys/mount.h>

int  mount(const  char  *specialfile, const  char *dir, const char * filesystemtype, unsigned long rwflag ,  const void *data);

int umount(const char *specialfile);

int umount(const char *dir);

AIX prototype

#include <sys/vmount.h>

int mount(char *Device, char *Path, int Flags)
int umount (char *Device)

Details

Functions are not source compatible.

Proposal

The Linux mount semantics will not be added to AIX.  Use vmount().


mprotect

NAME
mprotect  - control allowable accesses to a region of memory

Linux prototype

#include <sys/mman.h>

int mprotect(const void *addr, size_t len, int prot);

AIX prototype

#include <sys/types.h>
#include <sys/mman.h>

int mprotect (void *addr, size_t len, int prot);

Details

Functions are compatible.  In AIX mprotect() is a system call.



mremap

NAME
mremap - re-map a virtual memory address

Linux prototype

#include <unistd.h>
#include <sys/mman.h>

void * mremap(void * old_address, size_t old_size , size_t new_size, unsigned long flags);

AIX prototype

NONE

Detail

This  call  is  Linux-specific,  and should not be used in programs intended to be portable.

Proposal

This function can be difficult to implement on Power architectures.  It would be wise to get an opinion from the vmm team before deciding to offer this function on AIX.


msync

NAME
msync - synchronize a file with a memory map

Linux prototype

#include <unistd.h>
#include <sys/mman.h>

#ifdef _POSIX_MAPPED_FILES
#ifdef _POSIX_SYNCHRONIZED_IO

int msync(const void *start, size_t length, int flags);

#endif
#endif

AIX prototype

#include <sys/types.h>
#include <sys/mman.h>

int msync (void *addr, size_t len, int flags);

Detail

Functions are compatible.  Flags are identical.  In AIX, msync() is a system call.


munlock

NAME
munlock - reenable paging for some parts of memory

Linux prototype

#include <sys/mman.h>

int munlock(const void *addr, size_t len);

AIX prototype

NONE

Detail

This call does not exist on AIX.   AIX does not allow applications to pin memory.

Proposal

This is part of POSIX realtime.  No support for this is planned for AIX.


munlockall

NAME
munlockall - reenable paging for calling process

Linux prototype

#include <sys/mman.h>

int munlockall(void);

AIX prototype

NONE

Detail

This call does not exist on AIX.   AIX does not allow applications to pin memory.

Proposal

This is part of POSIX realtime.  No support for this is planned for AIX.


nanosleep

NAME
nanosleep - pause execution for a specified time

Linux prototype

#include <time.h>

int  nanosleep(const struct timespec *req, struct timespec *rem);

AIX prototype

NONE

Detail

This call does not exist on AIX.

Proposal

This will be provided with AIX5L.  Granularity is allowed to be as large as HZ.


nfssrvctl

NAME
nfsservctl - syscall interface to kernel nfs daemon

Linux prototype

#include <linux/nfsd/syscall.h>

nfsservctl(int cmd, struct nfsctl_arg  *argp,  union nfsctl_res *resp);

AIX prototype

NONE

Detail

This call is Linux-specific.

Proposal

This function is not part of the LSB and is not implemented on all Linux ports.  It will not be added to AIX.


nice

NAME
nice - change process priority

Linux prototype

#include <unistd.h>

int nice(int inc);

AIX prototype

#include <unistd.h>

int nice(int Increment);

Details

Functions are compatible.


open

NAME
open - open a file or device

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);

AIX prototype

#include <fcntl.h>

int open (const char *Path, int OFlag, [mode_t Mode]);

Details

Functions are compatible at the source level.  This is a system call in AIX.  See file bits for a comparison of file flag values and modes.  See  file open modes  for differences in supported flags.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - The O_TRUNC flag is set and the named file contains a record lock owned by another process.
EDQUOT - The directory in which the entry for the new link is being placed cannot be extended, or an i-node could not be allocated for the file, because the user or group quota of disk blocks or i-nodes in the file system containing the directory has been exhausted.
EFBIG - An attempt was made to write a file that exceeds the process' file limit or the maximum file size. If the user has set the envirnoment variable XPG_SUS_ENV=ON prior to execution of the process, then the SIGXFSZ signal is posted to the process when exceeding the process' file size limit.
EINTR - A signal was caught during the open subroutine.
EIO - The path parameter names a STREAMS file and a hangup or error occured.
ENOSR - The Path argument names a STREAMS-based file and the system is unable to allocate a STREAM.
EOVERFLOW - A call was made to open and creat and the file already existed and its size was larger than OFF_MAX and the O_LARGEFILE flag was not set.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


pause

NAME
pause - wait for signal

Linux prototype

#include <unistd.h>

int pause(void);

AIX prototype

#include <unistd.h>

int pause(void);

Details

Functions are compatible.  In AIX, this is a system call.


personality

NAME
personality - set the process execution domain

Linux prototype

int personality(unsigned long persona);

AIX prototype

NONE

Detail

personality is Linux-specific and should not  be used  in programs intended to be portable.

Proposal

This will not be added to AIX.


pipe

NAME
pipe - create pipe

Linux prototype

#include <unistd.h>

int pipe(int filedes[2]);

AIX prototype

#include <unistd.h>

int pipe(int FileDescriptor[2]);

Details

Functions are compatible.  In AIX, pipe() is a system call.


poll

NAME
poll - wait for some event on a file descriptor

Linux prototype

#include <sys/poll.h>

int poll(struct pollfd *ufds, unsigned int nfds, int timeout);

AIX prototype

#include <sys/poll.h>

int poll(void *ListPointer, unsigned long Nfdsmsgs, long Timeout);

Detail

Functions are compatible.  In AIX, poll() is a system call.  See poll values for pollfd information.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - Allocation of internal data structures was unsuccessful.
EINVAL - The number of pollfd structures specified by the Nfdsmsgs parameter is greater than the maximum number of open files, OPEN_MAX. This error is also returned if the number of pollmsg structures specified by the Nfdsmsgs parameter is greater than the maximum number of allowable message queues.


prctl

NAME
prctl - operations on a process

Linux prototype

#include <sys/prctl.h>

int  prctl(int option,  unsigned long arg2, unsigned long arg3 , unsigned long arg4, unsigned long arg5);

AIX prototype

NONE

Detail

This  call  is  Linux-specific,  and should not be used in programs intended to be portable.

Proposal

This function is not part of the LSB.  It is used to reassign SIGCHLD to another signal.  It will not be added to AIX.


pread

NAME
pread, pwrite - read from or write to a file descriptor at a given offset

Linux prototype

#define _XOPEN_SOURCE 500

#include <unistd.h>

ssize_t pread(int fd, void *buf, size_t count, off_t  offset);
ssize_t  pwrite(int  fd,  const  void  *buf, size_t count, off_t offset);
 

AIX prototype

#include <unistd.h>

ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset);
ssize_t pwrite (int FileDescriptor, const void *Buffer, size_t NBytes, off_t Offset);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBADMSG - The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
EDEADLK - A deadlock would occur if the calling process were to sleep until the region to be read was unlocked.
EOVERFLOW - An attempt was made to read from a regular file where NBytes was greater than zero and the starting offset was before the end-of-file and was greater than or equal to the offset maximum established in the open file description associated with FileDescriptor.
ENXIO - A request was made of a nonexistent device, or the request was outside the capabilities of the device.
ESPIPE - fildes is associated with a pipe or FIFO.
ETIMEDOUT - The connection timed out


ptrace

NAME
ptrace - process trace

Linux prototype

#include <sys/ptrace.h>

long  int ptrace(enum ptrace_request request, pid_t pid, void *addr, void *data);

AIX prototype

#include <sys/reg.h>
#include <sys/ptrace.h>
#include <sys/ldr.h>

int ptrace(int Request, int Identifier, int *Address, int Data, int *Buffer);

#define _LINUX_SOURCE_COMPAT
#include <sys/ptrace.h>

long  int ptrace(enum ptrace_request request, pid_t pid, void *addr, void *data);

Details

Functions are not compatible.

Proposal

In AIX5L, if sys/ptrace.h is compiled with _LINUX_SOURCE_COMPAT, the application will see Linux semantics.  The Linux ptrace wrapper will call the underlying AIX ptrace function.  Linux requests values will be defined, but will return ENOTSUP for functions not supported by AIX ptrace.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOTSUP - The request is not supported.
EINVAL - The debugger and the traced process are the same; or the Identifier parameter does not identify the thread that caused the exception.


query_module

NAME
query_module  - query the kernel for various bits pertaining to modules.

Linux prototype

#include <linux/module.h>

int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);

AIX prototype

NONE

Detail

AIX does not support loadable modules, but uses kernel extensions.

Proposal

This will not be implemented in AIX.


quotactl

NAME
quotactl - manipulate disk quotas

Linux prototype

#include <sys/types.h>
#include <sys/quota.h>

int  quotactl(int  cmd,  const  char  *special, int id, caddr_t addr);

AIX prototype

#include <jfs/quota.h>

int quotactl (char *Path, int Cmd, int ID, char *Addr);

Details

Functions are not compatible.  The header is in a different location.  The arguments are in a different order.  The Q_SETQLIM subcommand is not defined in AIX.  In AIX quotactl() is a system call.

Proposal

This will be added to AIX 5L version 5.1.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ELOOP - Too many symbolic links were encountered in translating a path name.
ENAMETOOLONG - A component of either path name exceeded 255 characters, or the entire length of either path name exceeded 1023 characters.
ENOENT - A file name does not exist.
ENOTDIR - A component of a path prefix is not a directory.
EOPNOTSUPP - The file system does not support quotas.
EROFS - In the Q_QUOTAON command, the quota file resides on a read-only file system.
EUSERS - The in-core quota table cannot be expanded.



read

NAME
read - read from a file descriptor

Linux prototype

#include <unistd.h>

ssize_t read(int fd, void *buf, size_t count);

AIX prototype

#include <unistd.h>

ssize_t read (int FileDescriptor, void *Buffer, size_t NBytes);

Details

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBADMSG - The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
EDEADLK - A deadlock would occur if the calling process were to sleep until the region to be read was unlocked.
EOVERFLOW - An attempt was made to read from a regular file where NBytes was greater than zero and the starting offset was before the end-of-file and was greater than or equal to the offset maximum established in the open file description associated with FileDescriptor.
ENXIO  - A request was made of a nonexistent device, or the request was outside the capabilities of the device.
ESPIPE - fildes is associated with a pipe or FIFO.
ETIMEDOUT - The connection timed out.



readdir

FROM THE LINUX MANUAL PAGE:
This  is  not the function you are interested in.  Look at readdir(3) for the POSIX conforming C  library  interface.  This page documents the bare kernel system call interface, which can change, and which is superseded by  getdents(2).


readlink

NAME
readlink - read value of a symbolic link

Linux prototype

#include <unistd.h>

int readlink(const char *path, char *buf, size_t bufsiz);

AIX prototype

#include <unistd.h>

int readlink(const char *Path, char *Buffer, size_t BufferSize);

Details

Functions are compatible.  In AIX, readlink() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ERANGE - The path name in the symbolic link is longer than the BufferSize value.
ETIMEDOUT - The connection timed out.


readv

NAME
readv, writev - read or write data into multiple buffers

Linux prototype

#include <sys/uio.h>

int readv(int filedes, const struct iovec *vector, int count);
int writev(int filedes, const struct iovec *vector, int count);

AIX prototype

#include <sys/uio.h>

ssize_t readv (int FileDescriptor, const struct iovec *iov, int iovCount);
ssize_t writev (int FileDescriptor, const struct iovec *iov, int iovCount);

Detail

Functions return different types.

Proposal

The ssize_t is correct.  AIX will not be changed.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBADMSG - The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
EDEADLK - A deadlock would occur if the calling process were to sleep until the region to be read was unlocked.
EOVERFLOW - An attempt was made to read from a regular file where NBytes was greater than zero and the starting offset was before the end-of-file and was greater than or equal to the offset maximum established in the open file description associated with FileDescriptor.
ENXIO  - A request was made of a nonexistent device, or the request was outside the capabilities of the device.
ESPIPE - fildes is associated with a pipe or FIFO.
ETIMEDOUT - The connection timed out.


reboot

NAME
reboot - reboot or enable/disable Ctrl-Alt-Del

Linux prototype

#include <unistd.h>
#include <sys/reboot.h>

int reboot (int flag);

AIX prototype

#include <sys/reboot.h>

void reboot (int HowTo, void *Argument)

#define _LINUX_SOURCE_COMPAT
#include <sys/reboot.h>

int reboot (int flag);

Details

Functions are not compatible.  In AIX, reboot is a system call.

From the Linux man page:
Reboot  is  Linux specific, and should not be used in programs intended to be portable.

Proposal

A Linux-compatible version will be added to AIX 5L version 5.1.
Add the Linux reboot command defines to sys/reboot.h.
Flag values will be mapped as follows (Linux -> AIX)
LINUX_REBOOT_CMD_RESTART  ->  RB_SOFTIPL
LINUX_REBOOT_CMD_HALT  -> RB_HALT_POWERED
LINUX_REBOOT_CMD_POWER_OFF  ->  RB_HALT
LINUX_REBOOT_CMD_RESTART2  ->  RB_POWIPL
LINUX_REBOOT_CMD_CAD_ON  -> return(ENOSYS)
LINUX_REBOOT_CMD_CAD_OFF  -> return(0)

AIX will not implement CAD (Ctrl-Alt-Del) for Linux compatibility.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOSYS - Function not supported (LINUX_REBOOT_CMD_CAD_ON only)


rename

NAME
rename - change the name or location of a file

Linux prototype

#include <stdio.h>

int rename(const char *oldpath, const char *newpath);

AIX prototype

#include <stdio.h>

int rename(const char *FromPath, const char *ToPath)

Details

Functions are compatible.  In AIX, rename() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory that would contain the path specified by the ToPath parameter cannot be extended because the user's or group's quota of disk blocks on the file system containing the directory is exhausted.
ETXTBSY - The ToPath parameter names a shared text file that is currently being used.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


rmdir

NAME
rmdir - delete a directory

Linux prototype

#include <unistd.h>

int rmdir(const char *pathname);

AIX prototype

#include <unistd.h>

int rmdir(const char *Path);

Details

Functions are compatible.  In AIX, rmdir() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EEXIST - The directory named by the Path parameter is not empty.
EINVAL - The directory named by the Path parameter is not well-formed.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


sched_get_priority_max

NAME
sched_get_priority_max,   sched_get_priority_min    -  get static priority range

Linux prototype

#include <sched.h>

int sched_get_priority_max(int policy);
int sched_get_priority_min(int policy);

AIX prototype

NONE

Detail

This call does not exist on AIX.

Proposal

Part of POSIX realtime scheduling.  This will not be added to AIX.



sched_getparam

NAME
sched_setparam,  sched_getparam  -  set and get scheduling parameters

Linux prototype

#include <sched.h>

int sched_setparam(pid_t  pid,  const  struct  sched_param *p);
int sched_getparam(pid_t pid, struct sched_param *p);

AIX prototype

NONE

Detail

This call does not exist on AIX.

Proposal

Part of POSIX realtime scheduling.  This will not be added to AIX.



sched_getscheduler

NAME
sched_setscheduler,   sched_getscheduler  -  set  and  get scheduling algorithm/parameters

Linux prototype

#include <sched.h>

int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p);
int sched_getscheduler(pid_t pid);

AIX prototype

NONE

Detail

This call does not exist on AIX.

Proposal

Part of POSIX realtime scheduling.  This will not be added to AIX.



sched_rr_get_interval

NAME
sched_rr_get_interval  - get the SCHED_RR interval for the named process

Linux prototype

#include <sched.h>

int sched_rr_get_interval(pid_t pid, struct timespec *tp);

AIX prototype

NONE

Detail

This call does not exist on AIX.

Proposal

Part of POSIX realtime scheduling.  This will not be added to AIX.


sched_yield

NAME
sched_yield - yield the processor

Linux prototype

#include <sched.h>

int sched_yield(void);

AIX prototype

#include <sched.h>

int sched_yield (void) ;

Detail

Functions are compatible.


select

NAME
select - synchronous I/O multiplexing

Linux prototype

#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

int  select(int  n,  fd_set  *readfds,  fd_set  *writefds, fd_set *exceptfds, struct timeval *timeout);

AIX prototype

#include <sys/time.h>
#include <sys/select.h>
#include <sys/types.h>

int select (int Nfdsmsgs, struct sellist *ReadList, struct sellist *WriteList, struct sellist *ExceptList, struct timeval *TimeOut);

Details

Functions are source compatible.
The file sys/time.h contains compatibility defines for fd_set and the prototype for select().  The FD_* macros are also defined there.  The sizes of the fd_set types is different, but code is source-compatible.  In AIX select is a system call.

In Linux, an fd_set is 128 bytes.  In AIX it is 4096 bytes.  Since n cannot exceed 128 in Linux, the structures are binary compatible with AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - Allocation of internal data structures was unsuccessful.
EFAULT - The ReadList, WriteList, ExceptList, or TimeOut parameter points to a location outside of the address space of the process.


sendfile

NAME
sendfile - transfer data between file descriptors

Linux prototype

#include <unistd.h>

ssize_t  sendfile(int out_fdint in_fd,off_t *offset, size_t count);
 

AIX prototype

NONE

Detail

Other  Unixes  often  implement  sendfile  with  different semantics  and  prototypes.  It  should  not  be  used  in portable programs.

Proposal

No AIX support is planned for this interface.


setdomainname

NAME
getdomainname, setdomainname - get/set domain name

Linux prototype

#include <unistd.h>

int getdomainname(char *name, size_t len);
int setdomainname(const char *name, size_t len);

AIX prototype

int getdomainname (char *Name, int Namelen);
int setdomainname (char *Name, int Namelen);

Details

Functions are compatible.  In AIX getdomainname() and setdomainname() are system calls.


setfsgid

NAME
setfsgid - set group identity used for file system checks

Linux prototype

int setfsgid(uid_t fsgid);

AIX prototype

NONE

Detail

setfsgid is Linux-specific and should not  be  used  in programs intended to be portable.

Proposal

This call will not be available in AIX.
This call is intended for use by NFS daemons.  AIX already has its NFS daemons.


setfsuid

NAME
setfsuid - set user identity used for file system checks

Linux prototype

int setfsuid(uid_t fsuid);

AIX prototype

NONE

Detail

setfsuid is Linux-specific and should not  be  used  in programs intended to be portable.

Proposal

This call will not be available in AIX.
This call is intended for use by NFS daemons.  AIX already has its NFS daemons.


setgid

NAME
setgid - set group identity

Linux prototype

#include <unistd.h>

int setgid(gid_t gid);

AIX prototype

#include <unistd.h>

int setgid(gid_t GID);

Details

Functions are source compatible.  In AIX, setgid() is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates the value of the GID or EGID parameter is invalid.


setregid

NAME
setregid, setegid - set real and / or effective group ID

Linux prototype

#include <unistd.h>

int setregid(gid_t rgid, gid_t egid);


AIX prototype

#include <unistd.h>

int setregid (gid_t RGID, gid_t EGID);

Details

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates the value of the GID or EGID parameter is invalid.



setreuid

NAME
setreuid, seteuid - set real and / or effective user ID

Linux prototype

#include <unistd.h>

int setreuid(uid_t ruid, uid_t euid);


AIX prototype

#include <unistd.h>

int setreuid (uid_t RUID, uid_t EUID);

Details

Functions are source compatible.  In AIX this is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL -The value of the UID or EUID parameter is invalid.


setsid

NAME
setsid - creates a session and sets the process group ID

Linux prototype

#include <unistd.h>

pid_t setsid(void);


AIX prototype

#include <unistd.h>

pid_t setsid (void);
 

Details

Functions are source compatible.  In AIX this is a system call.


setuid

NAME
setuid - set user identity

Linux prototype

#include <unistd.h>

int setuid(uid_t uid);

AIX prototype

#include <unistd.h>

int setuid (uid_t UID);

Details

Functions are source compatible.   In AIX this is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL -The value of the UID or EUID parameter is invalid.


sgetmask

Not supported.  Superceeded by sigprocmask().  No man pages available.


sigaction

NAME
sigaction,  sigprocmask,  sigpending,  sigsuspend  - POSIX signal handling functions.

Linux prototype

#include <signal.h>

int sigaction(int signum,  const  struct  sigaction  *act, struct sigaction *oldact);
int  sigprocmask(int  how,  const  sigset_t *set, sigset_t *oldset);
int sigpending(sigset_t *set);
int sigsuspend(const sigset_t *mask);
int sigpause(int sigmask);


AIX prototype

#include <signal.h>

int sigaction (int Signal, struct sigaction *Action, struct sigaction *OAction);
int sigprocmask (int How, const sigset_t *Set, sigset *OSet);
int sigpending (sigset_t *Set);
int sigsuspend (const sigset_t *SignalMask);
int sigpause (int SignalMask);

Details

Functions are source compatible.  In AIX this is a system call.
Sigpause() is listed in the LSB, but should be considered obsolete.  Use sigsuspend().

Non-scalar types

The definitions of struct sigaction are identical.
The definitions of sigset_t are different.  As long as sigset_t's are manipulated with sigemptyset(), sigfillset(), sigaddset(), and sigdelset() there should be no problems.  See signals for signal values.


sigaltstack

NAME
sigaltstack - define and examine the state of an alternate stack for signal handlers.

Linux prototype

#include <signal.h>

int sigaltstack(const stack_t *ss, stack_t *oss);

AIX prototype

#include <signal.h>

int sigaltstack(const stack_t *ss, stack_t *oss);

Detail

Functions are compatible.
In AIX sigaltstack() is a system call.  Did not find a man page for sigaltstack on Yellowdog Linux.


signal

NAME
signal - ANSI C signal handling

Linux prototype

#include <signal.h>

void (*signal(int signum, void (*handler)(int)))(int);

AIX prototype

#include <signal.h>

void (*signal (int Signal, void (*Action) (int))) (int);

Details

Functions are compatible.  AIX does not define SIGSTKFLT.  In AIX signal() is implemented with sigaction().  See signals for signal values.


sigreturn

NAME
sigreturn  -  return from signal handler and cleanup stack frame

Linux prototype

int sigreturn(unsigned long unused);

AIX prototype

NONE

Details

sigreturn is specific to Linux and should not be  used  in programs intended to be portable.

Proposal

This is intended only for library implementors in Linux and will not be implemented in AIX.


socketcall

NAME
socketcall - socket system calls

Linux prototype

int socketcall(int call, unsigned long *args);

AIX prototype

NONE

Details

This  call is specific to Linux, and should not be used in programs intended to be portable.

Proposal

This will not be added to AIX.
This is just a common system entry for socket calls like accept() and bind().


ssetmask

Not supported.  Superceeded by sigprocmask().  No man pages available.


stime

NAME
stime - set time

Linux prototype

#include <time.h>

int stime(time_t *t);

AIX prototype

#include <time.h>

int stime(time_t *t);

Details

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The time value is not valid.


swapoff

NAME
swapon, swapoff - start/stop swapping to file/device

Linux prototype

#include <unistd.h>
#include <asm/page.h>
#include <sys/swap.h>

int swapon(const char *path, int swapflags);
int swapoff(const char *path);

AIX prototype

int swapon (char *PathName);
int swapoff(char *PathName);

Details

Functions are compatible.  No documentation found for swapoff() in AIX.  In AIX, swapon() and swapoff() are system calls.  AIX will ignore the swapflags arguments to swapon, priority will be silently ignored.  No prototypes were found for either swapon() or swapoff() in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINTR - Signal was received during processing of a request.
ENOTBLK - Block device required.
ENOTDIR - A component of the PathName prefix is not a directory.
ENXIO  - No such device address.


symlink

NAME
symlink - make a new name for a file

Linux prototype

#include <unistd.h>

int symlink(const char *oldpath, const char *newpath);

AIX prototype

#include <unistd.h>

int symlink(const char *Path1, const char *Path2);

Details

Functions are compatible.  In AIX symlink is a system call.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory in which the entry for the new symbolic link is being placed cannot be extended or disk blocks could not be allocated for the symbolic link because the user's or group's quota of disk blocks on the file system containing the directory has been exhausted.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


sync

NAME
sync - commit buffer cache to disk.

Linux prototype

#include <unistd.h>

int sync(void);

AIX prototype

#include <unistd.h>

void sync(void);

Details

Functions are not quite compatible.  In AIX, sync() is a void system call.  In Linux, sync() always returns 0.  Any code which tests or assigns the return value of sync() will cause compile errors.

Proposal

Change the prototype to int in unistd.h.
Modify the libc sync to be an int function that returns zero.  This will not cause errors in AIX since void invocations of int functions do not cause warnings and the return value is dumped.


sysctl

NAME
sysctl - read/write system parameters

Linux prototype

#include <unistd.h>
#include <linux/unistd.h>
#include <linux/sysctl.h>

int sysctl(struct sysctl_args *args);

AIX prototype

NONE

Detail

This  call  is  Linux-specific,  and should not be used in programs intended to be portable.

Proposal

This will not be added to AIX.


sysfs

NAME
sysfs - get file system type information

Linux prototype

int sysfs(int option, const char * fsname);
int sysfs(int option, unsigned int fs_index, char * buf);
int sysfs(int option);

AIX prototype

NONE

Detail

sysfs does not exist in AIX.

Proposal

This will be added to libc or liblnx, with some additions to sys/vmount.h.  We could prototype it there as well.


sysinfo

NAME
sysinfo - returns information on overall system statistics

Linux prototype

#include <sys/sysinfo.h>

int sysinfo(struct sysinfo *info);

AIX prototype

NONE

Details

This function is Linux-specific, and should not be used in programs intended to be portable.

Proposal

This will not be implemented in AIX.


syslog

NAME
closelog,  openlog,  syslog  - send messages to the system logger

Linux prototype

#include <syslog.h>

void openlog( char *ident, int option, int  facility);
void syslog( int priority, char *format, ...);
void closelog( void );

AIX prototype

#include <syslog.h>

void openlog(const char *ID, int LogOption, int Facility);
void syslog(int Priority, const char *Value,... );
int closelog(void);

Details

Functions are not compatible.  AIX syslog.h does not define LOG_PERROR option.  AIX syslog.h does not define LOG_AUTHPRIV facility.  Priorities are equivalent.

Proposal

Define LOG_PERROR option in syslog.h.  Define LOG_AUTHPRIV facility in syslog.h.  Modify syslog to understand the new LOG_PERROR value.  Modify syslogd and logger to understand the LOG_AUTHPRIV facility.  Making calls to closelog() in void format will not cause errors when compiled on AIX.


time

NAME
time - get time in seconds

Linux prototype

#include <time.h>

time_t time(time_t *t);

AIX prototype

#include <time.h>

time_t time(time_t *Tp);

Details

Functions are compatible.   The AIX libc uses an architecture-dependent method for time().


times

NAME
times - get process times

Linux prototype

#include <sys/times.h>

clock_t times(struct tms *buf);

AIX prototype

#include <sys/times.h>

clock_t times(struct tms *Buffer);

Details

Functions are compatible.  In AIX, times() is a system call.


umask

NAME
umask - set file creation mask

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>

mode_t umask(mode_t mask);


AIX prototype

#include <sys/stat.h>

mode_t umask(mode_t CreationMask);
 

Details

Functions are compatible.  In AIX this is a system call.  See file bits for mask values.


uname

NAME
uname - get name and information about current kernel

Linux prototype

#include <sys/utsname.h>

int uname(struct utsname *buf);

AIX prototype

#include <sys/utsname.h>

int uname (struct utsname *Name);
 

Details

Functions are compatible.  AIX does not define domainname as part of the utsname structure.  The domainname entry is technically not compatible since it is defined in Linux only if the program is compiled with _GNU_SOURCE.


unlink

NAME
unlink - delete a name and possibly the file it refers to

Linux prototype

#include <unistd.h>

int unlink(const char *pathname);

AIX prototype

#include <unistd.h>

int unlink (const char *Path);

Details

Functions are compatible.  Unlink() is a system call in AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBUSY - The entry to be unlinked is the mount point for a mounted filesystem, or the file named by Path is a named STREAM.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


uselib

NAME
uselib - select shared library

Linux prototype

#include <unistd.h>

int uselib(const char *library);

AIX prototype

NONE

Details

uselib() is Linux specific, and should not be used in programs intended to be portable.

Proposial

Will not be implemented in AIX.


ustat

NAME
ustat - get file system statistics

Linux prototype

#include <sys/types.h>
#include <ustat.h>

int ustat(dev_t dev, struct ustat * ubuf);


AIX prototype

#include <sys/types.h>
#include <ustat.h>

int ustat (dev_t Device, struct ustat *Buffer);
 

Details

Functions are compatible.  In AIX this is a system call.

Non-scalar types

The definitions of struct ustat are identical.


utime

NAME
utime, utimes - change access and/or modification times of an inode

Linux prototype

#include <sys/types.h>
#include <utime.h>

int utime(const char *filename, struct utimbuf *buf);
 

#include <sys/time.h>

int utimes(char *filename, struct timeval *tvp);

AIX prototype

#include <utime.h>

int utime (const char *Path, const struct utimbuf *Times);

#include <sys/time.h>

int utimes (char *Path, struct timeval Times[2]);

Details

Functions are compatible.  In Linux, the timeval pointer tvp points to an array of two timevals, so the utimes() functions are compatible.  In AIX, utime() wraps to the system call utimes().

Errno

When called in AIX, the errno semantics are different:
EPERM - The Times parameter is not null and the calling process neither owns the file nor has root user authority.
EACCES - The Times parameter is null, effective user ID is neither the owner of the file nor has root authority, or write access is denied.
EROFS - The file system that contains the file is mounted read-only.


vfork

NAME
vfork - create a child process and block parent

Linux prototype

#include <unistd.h>

pid_t vfork(void);

AIX prototype

#include <unistd.h>

int vfork(void);

Detail

Functions are compatible, but should not be used in either OS.


vhangup

NAME
vhangup - virtually hangup the current tty

Linux prototype

#include <unistd.h>

int vhangup(void);

AIX prototype

NONE

Details

This call is Linux-specific, and should  not  be  used  in programs intended to be portable.

Proposal

This call will not be implemented on AIX.


vm86

NAME
vm86old, vm86 - enter virtual 8086 mode

Linux prototype

#include <sys/vm86.h>

int vm86old(struct vm86_struct * info);
int vm86(unsigned long fn, struct vm86plus_struct * v86);

AIX prototype

NONE

Detail

This call is specific to Linux on  Intel  processors,  and should not be used in programs intended to be portable.

Proposal

This function is Intel-specific and cannot be implemented on AIX.  This will not be implemented in AIX.


wait4

NAME
wait3, wait4 - wait for process termination, BSD style

Linux prototype

#define _USE_BSD
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>
 

pid_t wait3(int *status, int options, struct rusage *rusage);
pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);

AIX prototype

#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>

pid_t wait3(int *StatusLocation, int Options, struct rusage *ResourceUsage);

Details

AIX does not implement  wait4().

Proposal

The wait4 call will be available in AIX 5L release 5.1.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINTR - This subroutine was terminated by receipt of a signal.
EFAULT - The StatusLocation or ResourceUsage parameter points to a location outside of the address space of the process.



waitpid

NAME
waitpid - wait for process termination

Linux prototype

#include <sys/types.h>
#include <sys/wait.h>

pid_t waitpid(pid_t pid, int *status, int options);

AIX prototype

#include <sys/wait.h>

pid_t waitpid (pid_t ProcessIDint * StatusLocation, int Options);

Details

Functions are compatible.
Options are identical for Linux and AIX.  Linux status macros like WIFEXITED() are all supported on AIX.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - The StatusLocation or ResourceUsage parameter points to a location outside of the address space of the process.


write

NAME
write - write to a file descriptor

Linux prototype

#include <unistd.h>

ssize_t write(int fd, const void *buf, size_t count);

AIX prototype

#include <unistd.h>

ssize_t write (int FileDescriptor, const void *Buffer, size_t NBytes);

Details

Functions are compatible at the source level.  The AIX implementation explicitly handles ERESTART and also silently breaks writes larger than a segment into an iovec.  The breakup into iovecs seems to be legacy code, the uiomove functions seem to break up the i/o across segment boundaries.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - New disk blocks cannot be allocated for the file because the user or group quota of disk blocks has been exhausted on the file system.
EFBIG - An attempt was made to write a file that exceeds the process' file size limit or the maximum file size. If the user has set the environment variable XPG_SUS_ENV=ON prior to execution of the process, then the SIGXFSZ signal is posted to the process when exceeding the process' file size limit.
ENXIO - A hangup occurred on the STREAM being written to.
ERANGE - The transfer request size was outside the range supported by the STREAMS file associated with FileDescriptor.
ESPIPE - fildes is associated with a pipe or FIFO.


Library Calls in Alphabetical Order

 

abort

NAME
abort - cause abnormal program termination

Linux prototype

#include <stdlib.h>

void abort(void);

AIX prototype

#include <stdlib.h>

void abort(void);

Detail

Functions are compatible.


abs

NAME
abs - computes the absolute value of an integer.

Linux prototype

#include <stdlib.h>

int abs(int x);

AIX prototype

#include <stdlib.h>

int abs(int x);

Detail

Functions are compatible.


accept

NAME
accept - accept a connection on a socket

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int accept(int s,  struct  sockaddr  *addr,  socklen_t *addrlen);

AIX prototype

#include <sys/socket.h>

int accept(int Socket, struct sockaddr *Address, socklen_t *AddressLength);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOTCONN - The socket is not in the connected state.


asctime

NAME
asctime - transform binary date and time to ASCII

Linux prototype

#include <time.h>

char *asctime(const struct tm *tp);

AIX prototype

#include <time.h>

char *asctime(const struct tm *tp);

Detail

Functions are compatible.


atexit

NAME
atexit -  register a function to be called at normal program termination.

Linux prototype

#include <stdlib.h>

int atexit (void (*func) (void));

AIX prototype

#include <stdlib.h>

int atexit(void (*func)(void));

Detail

Functions are compatible.


atof

NAME
atof - convert a string to a double.

Linux prototype

#include <stdlib.h>

double atof(const char *nptr);

AIX prototype

#include <stdlib.h>

double atof(const char *ptr);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ERANGE - The correct value of the converted number causes underflow or overflow.


atoi

NAME
atoi - convert a string to an integer.

Linux prototype

#include <stdlib.h>

int atoi(const char *nptr);

AIX prototype

#include <stdlib.h>

int atoi(const char *ptr);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ERANGE - The correct value of the converted number causes underflow or overflow.
EINVAL - The value of the Base parameter is not valid, or the string to be converted is not a valid number.


atol

NAME
atol - convert a string to a long integer.

Linux prototype

#include <stdlib.h>

int atol(const char *nptr);

AIX prototype

#include <stdlib.h>

int atol(const char *ptr);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ERANGE - The correct value of the converted number causes underflow or overflow.
EINVAL - The value of the Base parameter is not valid, or the string to be converted is not a valid number.


bcmp

NAME
bcmp - compare byte strings

Linux prototype

#include <string.h>

int bcmp(const void *s1, const void *s2, int n);

AIX prototype

#include <strings.h>

int bcmp (const void *String1, const void *String2, size_t Length);

Detail

These functions are source compatible.


bcopy

NAME
bcopy - copy byte strings

Linux prototype

#include <string.h>

void bcopy (const void *src, void *dest, int n);

AIX prototype

#include <strings.h>

void bcopy (const void *Source, char *Destination, size_t Length);

Detail

These functions are source compatible.


bind

NAME
bind - bind a name to a socket

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int  bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int bind (int Socket, const struct sockaddr *Name, socklen_t NameLength);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EADDRNOTAVAIL - The specified address is not available from the local machine.
EADDRINUSE - The specified address is already in use.
ENODEV - The specified device does not exist.


bsearch

NAME
bsearch - binary search of a sorted array.

Linux prototype

#include <stdlib.h>

void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));

AIX prototype

#include <stdlib.h>

void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));

Detail

Functions are compatible.


bzero

NAME
bzero - write zeros to a byte string

Linux prototype

#include <string.h>

void bzero(void *s, int n);

AIX prototype

#include <strings.h>

void bzero (char *String, int Length);

Detail

These functions are source compatible.


calloc

NAME
calloc - Allocate and free dynamic memory

Linux prototype

#include <stdlib.h>

void *calloc(size_t nmemb, size_t size);

AIX prototype

#include <stdlib.h>

void *calloc(size_t nmemb, size_t size);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates a call has requested 0 bytes.
ENOMEM - Indicates that not enough storage space was available.


catclose

NAME
catopen, catclose, catgets - message catalog operations

Linux prototype

#include <features.h>
#include <nl_types.h>

nl_catd catopen(char *name, int flag);
void catclose(nl_catd catalog);
char  *catgets(nl_catd  catalog,  int set_number, int message_number, const char *message);

AIX prototype

#include <nl_types.h>

nl_catd catopen (const char *CatalogName, int Parameter);
int catclose (nl_catd CatalogDescriptor);
char *catgets (nl_catd Catalog, int SetNumber, int MessageNumber, const char *String);

Detail

The functions are source compatible.


cfgetispeed

NAME
cfgetispeed - get terminal input speed

Linux prototype

#include <termios.h>

speed_t cfgetispeed(const struct termios *termios_p);

AIX prototype

#include <termios.h>

speed_t cfgetispeed(const struct termios *termiosp);

Detail

Functions are compatible.


cfgetospeed

NAME
cfgetospeed - get terminal output speed

Linux prototype

#include <termios.h>

speed_t cfgetospeed(const struct termios *termios_p);

AIX prototype

#include <termios.h>

speed_t cfgetospeed(const struct termios *termiosp);

Detail

Functions are compatible.


cfsetispeed

NAME
cfsetispeed - set terminal input speed

Linux prototype

#include <termios.h>

int cfsetispeed(struct termios *termios_p, speed_t speed);

AIX prototype

#include <termios.h>

int cfsetispeed(struct termios *termiosp, speed_t speed);

Detail

Functions are compatible.


cfsetospeed

NAME
cfsetospeed - set terminal output speed

Linux prototype

#include <termios.h>

int cfsetospeed(struct termios *termios_p, speed_t speed);

AIX prototype

#include <termios.h>

int cfsetospeed(struct termios *termiosp, speed_t speed);

Detail

Functions are compatible.


cfsetspeed

NAME
cfsetspeed - set terminal input and output speed

Linux prototype

#include <termios.h>

int cfsetspeed(struct termios *termios_p, speed_t speed);

AIX prototype

NONE

Detail

This function is not defined in AIX.

Proposal

This call will be available in AIX 5L release 5.1.


clearerr

NAME
clearerr,  feof,  ferror,  fileno - check and reset stream status

Linux prototype

#include <stdio.h>

void clearerr( FILE *stream);
int feof( FILE *stream);
int ferror( FILE *stream);
int fileno( FILE *stream);

AIX prototype

#include <stdio.h>

void clearerr (FILE *Stream);
int feof (FILE *Stream);
int ferror (FILE *Stream);
int fileno (FILE *Stream);

Detail

These functions are source compatible.


clock

NAME
clock - Determine processor time

Linux prototype

#include <time.h>

clock_t clock(void);

AIX prototype

#include <time.h>

clock_t clock(void);

Detail

Functions are compatible.


closedir

NAME
closedir - close a directory

Linux prototype

#include <dirent.h>

int closedir(DIR *dirp);

AIX prototype

#include <dirent>

int closedir(DIR *dp);

Detail

Functions are compatible.


connect

NAME
connect - initiate a connection on a socket

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int  connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int connect(int Socket, const struct sockaddr *Name, socklen_t NameLength);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EADDRNOTAVAIL - The specified address is not available from the local machine.
ENETDOWN - The specified physical network is down.
ENOTCONN - The socket could not be connected.


ctermid

NAME
ctermid - get controlling terminal name

Linux prototype

#include <stdio.h>

char *ctermid(char *s);

AIX prototype

#include <stdio.h>

char *ctermid (char *String);

Detail

These functions are source compatible.


ctime

NAME
ctime - transform binary date and time to ASCII

Linux prototype

#include <time.h>

char *ctime(const time_t *timer);

AIX prototype

#include <time.h>

char *ctime(const time_t *time);

Detail

Functions are compatible.


difftime

NAME
difftime - calculate time difference

Linux prototype

#include <time.h>

double difftime(time_t time1, time_t time0);

AIX prototype

#include <time.h>

double difftime(time_t t1, time_t t2);

Detail

Functions are compatible.


div

NAME
div - computes the quotient and remainder of integer division

Linux prototype

#include <stdlib.h>

div_t div(int numer, int denom);

AIX prototype

#include <stdlib.h>

div_t div(int number, int divisor);

Detail

Functions are compatible.


drand48

NAME
drand48 - generate uniformly  distributed pseudo-random numbers

Linux prototype

#include <stdlib.h>

double drand48(void);

AIX prototype

#include <stdlib.h>

double drand48(void);

Detail

Functions are compatible.


ecvt

NAME
ecvt - convert a floating-point number to a string.

Linux prototype

#include <stdlib.h>

char *ecvt(double value, int ndigit, int *decp, int *sign);

AIX prototype

#include <stdlib.h>

char *ecvt(double val, int ndigit, int *dp, int *sign);

Detail

Functions are compatible.


endgrent

NAME
getgrent, setgrent, endgrent - get group file entry

Linux prototype

#include <grp.h>
#include <sys/types.h>

struct group *getgrent(void);
void setgrent(void);
void endgrent(void);

AIX prototype

#include <sys/types.h>
#include <grp.h>

struct group *getgrent(void);
void setgrent(void);
void endgrent(void);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EIO - Indicates that an input/output (I/O) error has occurred.
EINTR - Indicates that a signal was caught during the getgrnam or getgrgid subroutine.
EMFILE - Indicates that the maximum number of file descriptors specified by the OPEN_MAX value are currently open in the calling process.
ENFILE - Indicates that the maximum allowable number of files is currently open in the system.


endpwent

NAME
getpwent, setpwent, endpwent, getpwuid - get password file entry

Linux prototype

#include <pwd.h>
#include <sys/types.h>

struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);
struct passwd *getpwuid(uid_t uid);

AIX prototype

#include <sys/types.h>
#include <pwd.h>

struct passwd *getpwent (void);
void setpwent(void);
void endpwent(void);
struct passwd *getpwuid(uid_t UserID);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOATTR - corrupt entry detected.


erand48

NAME
erand48 - generate uniformly  distributed pseudo-random numbers

Linux prototype

#include <stdlib.h>

double erand48(unsigned short int xsubi[3]);

AIX prototype

#include <stdlib.h>

double erand48(unsigned short xsubi[3]);

Detail

Functions are compatible.


execl

NAME
execl - execute a file

Linux prototype

#include <unistd.h>

int execl(const char *path, const char *arg, ...);

AIX prototype

#include <unistd.h>

int execl(const char *path, const char *arg, ...);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOEXEC - The exec subroutine is neither an execlp subroutine nor an execvp subroutine. The new-process image file has the appropriate access permission, but the magic number in its header is not valid.
ENOEXEC - The new-process image file has a valid magic number in its header, but the header is damaged or is incorrect for the machine on which the file is to be run.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.


execle

NAME
execle - execute a file

Linux prototype

#include <unistd.h>

int execle(const char *path, const char *arg, ...);

AIX prototype

#include <unistd.h>

int execle(const char *path, const char *arg, ...);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOEXEC - The exec subroutine is neither an execlp subroutine nor an execvp subroutine. The new-process image file has the appropriate access permission, but the magic number in its header is not valid.
ENOEXEC - The new-process image file has a valid magic number in its header, but the header is damaged or is incorrect for the machine on which the file is to be run.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.


execlp

NAME
execlp - execute a file

Linux prototype

#include <unistd.h>

int execlp(const char *file, const char *arg, ...);

AIX prototype

#include <unistd.h>

int execlp(const char *file, const char *arg, ...);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOEXEC - The exec subroutine is neither an execlp subroutine nor an execvp subroutine. The new-process image file has the appropriate access permission, but the magic number in its header is not valid.
ENOEXEC - The new-process image file has a valid magic number in its header, but the header is damaged or is incorrect for the machine on which the file is to be run.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.


execv

NAME
execv - execute a file

Linux prototype

#include <unistd.h>

int execv(const char *path, char *const argv[]);

AIX prototype

#include <unistd.h>

int execv(const char *path, char *const argv[]);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOEXEC - The exec subroutine is neither an execlp subroutine nor an execvp subroutine. The new-process image file has the appropriate access permission, but the magic number in its header is not valid.
ENOEXEC - The new-process image file has a valid magic number in its header, but the header is damaged or is incorrect for the machine on which the file is to be run.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.


execvp

NAME
execvp - execute a file

Linux prototype

#include <unistd.h>

int execvp(const char *file, char *const argv[]);

AIX prototype

#include <unistd.h>

int execvp(const char *file, char *const argv[]);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOEXEC - The exec subroutine is neither an execlp subroutine nor an execvp subroutine. The new-process image file has the appropriate access permission, but the magic number in its header is not valid.
ENOEXEC - The new-process image file has a valid magic number in its header, but the header is damaged or is incorrect for the machine on which the file is to be run.
ESTALE - The root or current directory of the process is located in a virtual file system that has been unmounted.
ETIMEDOUT - The connection timed out.


fclose

NAME
fclose - close a stream

Linux prototype

#include <stdio.h>

int fclose(FILE *stream);

AIX prototype

#include <stdio.h>

int fclose (FILE *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFBIG - An attempt was made to write a file that exceeds the process' file size limit or the maximum file size. See the ulimit subroutine.
EFBIG - The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
ENXIO - A request was made of a non-existent device, or the request was outside the capabilities of the device


fcvt

NAME
fcvt - convert a floating-point number to a string.

Linux prototype

#include <stdlib.h>

char *fcvt(double value, int ndigit, int *decpt, int *sign));

AIX prototype

#include <stdlib.h>

char *fcvt(double value, int ndigit, int *decpt, int *sign);

Detail

Functions are source compatible.


fdopen

NAME
fopen, fdopen, freopen - stream open functions

Linux prototype

#include <stdio.h>

FILE *fopen(const char *path, const char *mode);
FILE *fdopen(int fildes, const char *mode);
FILE *freopen(const  char *path, const char *mode, FILE *stream);

AIX prototype

#include <stdio.h>

FILE  *fopen (const char *Path, const char *Type);
FILE  *fdopen (int FileDescriptor, const char *Type);
FILE  *freopen (const char *Path, const char *Type, FILE  *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EMFILE - FOPEN_MAX streams are currently open in the calling process.
EMFILE - STREAM_MAX streams are currently open in the calling process.
ENAMETOOLONG - Pathname resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX.
EBADF - The value of the File Descriptor parameter is not valid (fdopen).
EOVERFLOW - The named file is a size larger than 2 Gigabytes. (fopen, freopen)


fflush

NAME
fflush - flush a stream

Linux prototype

#include <stdio.h>

int fflush(FILE *stream);

AIX prototype

#include <stdio.h>

int fflush (FILE *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFBIG - An attempt was made to write a file that exceeds the process' file size limit or the maximum file size. See the ulimit subroutine.
EFBIG - The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
ENXIO - A request was made of a non-existent device, or the request was outside the capabilities of the device


ffs

NAME
ffs - find first bit set in a word

Linux prototype

#include <string.h>

int ffs(int i);

AIX prototype

#include <strings.h>

int ffs(int Index);

Detail

These functions are source compatible.


fgetc

NAME
fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings

Linux prototype

#include <stdio.h>

int fgetc(FILE *stream);
char *fgets(char *s, int size, FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *gets(char *s);
int ungetc(int c, FILE *stream);

AIX prototype

#include <stdio.h>

int getc (FILE *Stream);
int fgetc (FILE *Stream);
int getchar (void);
char *gets (char *String);
char *fgets (char *String, int Number, FILE *Stream);
int ungetc (int Character, FILE *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - Indicates that the O_NONBLOCK flag is set for the file descriptor underlying the stream specified by the Stream parameter. The process would be delayed in the fgetc subroutine operation.
EBADF - Indicates that the file descriptor underlying the stream specified by the Stream parameter is not a valid file descriptor opened for reading.
EFBIG - Indicates that an attempt was made to read a file that exceeds the process' file-size limit or the maximum file size. See the ulimit subroutine.
EINTR - Indicates that the read operation was terminated due to the receipt of a signal, and either no data was transferred, or the implementation does not report partial transfer for this file.
Note: Depending upon which library routine the application binds to, this subroutine may return EINTR.  Refer to the signal subroutine regarding sa_restart.


EIO - Indicates that a physical error has occurred, or the process is in a background process group attempting to perform a read subroutine call from its controlling terminal, and either the process is ignoring (or blocking) the SIGTTIN signal or the process group is orphaned.
EPIPE - Indicates that an attempt is made to read from a pipe or first-in-first-out (FIFO) that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
EOVERFLOW - Indicates that the file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.

The getc, getchar, fgetc, or getw subroutine is also unsuccessful under the following error conditions:

ENOMEM - Indicates insufficient storage space is available.
ENXIO - Indicates either a request was made of a nonexistent device or the request was outside the capabilities of the device.


fgetpos

NAME
fgetpos,  fseek,  fsetpos,  ftell,  rewind  - reposition a stream

Linux prototype

#include <stdio.h>

int fseek( FILE *stream, long offset, int whence);
long ftell( FILE *stream);
void rewind( FILE *stream);
int fgetpos( FILE *stream, fpos_t *pos);
int fsetpos( FILE *stream, fpos_t *pos);

AIX prototype

#include <stdio.h>

int fseek (FILE *Stream, long int Offset, int Whence);
long int ftell (FILE *Stream);
void rewind (FILE *Stream);
int fgetpos (FILE *Stream, fpos_t *Position);
int fsetpos (FILE *Stream, const fpos_t *Position);

Detail

These functions are source compatible.

Errno

When called in AIX, the fseek, ftell, and rewind functions can return these errnos not documented in Linux:
EAGAIN - Indicates that the O_NONBLOCK flag is set for the file descriptor, delaying the process in the write operation.
EFBIG - Indicates that an attempt has been made to write to a file that exceeds the file-size limit of the process or the maximum file size.
EFBIG - Indicates that the file is a regular file and that an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
EINTR - Indicates that the write operation has been terminated because the process has received a signal, and either no data was transferred, or the implementation does not report partial transfers for this file.
EIO - Indicates that the process is a member of a background process group attempting to perform a write subroutine to its controlling terminal, the TOSTOP flag is set, the process is not ignoring or blocking the SIGTTOU signal, and the process group of the process is orphaned. This error may also be returned under implementation-dependent conditions.
ENOSPC - Indicates that no remaining free space exists on the device containing the file.
EPIPE - Indicates that an attempt has been made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
EOVERFLOW  - The resulting could not be returned properly.

When called in AIX, the fgetpos and fsetpos functions can return these errnos not documented in Linux:

ESPIPE - Indicates that the file descriptor underlying the Stream parameter is associated with a pipe or FIFO.
EOVERFLOW  - The resulting could not be returned properly.


fprintf

NAME
printf,  fprintf,  sprintf,  snprintf,  vprintf, vfprintf, vsprintf, vsnprintf - formatted output conversion

Linux prototype

#include <stdio.h>

int printf(const char *format, ...);
int fprintf(FILE *stream, const char *format, ...);
int sprintf(char *str, const char *format, ...);
int snprintf(char *str, size_t size, const  char  *format, ...);

#include <stdarg.h>

int vprintf(const char *format, va_list ap);
int  vfprintf(FILE  *stream,  const  char *format, va_list ap);
int vsprintf(char *str, const char *format, va_list ap);
int vsnprintf(char *str, size_t size, const char  *format, va_list ap);

AIX prototype

#include <stdio.h>

int printf (const char *Format, [Value, . . .]);
int fprintf (FILE *Stream, const char *Format, [Value, . . .]);
int sprintf (char *String, const char *Format, [Value, . . .]);
int snprintf(char *String, size_t Size, const char *Format, [Value,...]);

#include <stdarg.h>

int vprintf (const char *Format, va_list Value);
int vfprintf (FILE *Stream, const char *Format, va_list Value);
int vsprintf (char *String, const char *Format, va_list Value);
int vsnprintf(char *String, size_t Size, const char *Format, va_list Value);

Detail

These functions are source compatible.

These functions are source compatible.

Errno

When called in AIX, these functions can return these errnos not documented in Linux:
EAGAIN - The O_NONBLOCK flag is set for the file descriptor underlying the file specified by the Stream or String parameter and the process would be delayed in the write operation.
EBADF - The file descriptor underlying the file specified by the Stream or String parameter is not a valid file descriptor open for writing.
EFBIG - An attempt was made to write to a file that exceeds the file size limit of this process or the maximum file size. For more information, refer to the ulimit subroutine.
EINTR - The write operation terminated due to receipt of a signal, and either no data was transferred or a partial transfer was not reported.
Note: Depending upon which library routine the application binds to, this subroutine may return EINTR. Refer to the signal subroutine regarding sa_restart.

EIO - The process is a member of a background process group attempting to perform a write to its controlling terminal, the TOSTOP flag is set, the process is neither ignoring nor blocking the SIGTTOU signal, and the process group of the process has no parent process.
ENOSPC - No free space remains on the device that contains the file.
EPIPE - An attempt was made to write to a pipe or first-in-first-out (FIFO) that is not open for reading by any process. A SIGPIPE signal is sent to the process.

The printf, fprintf, sprintf, or wsprintf subroutine may be unsuccessful if one or more of the following are true:

EILSEQ - An invalid character sequence was detected.
EINVAL - The Format parameter received insufficient arguments.
ENOMEM - Insufficient storage space is available.
ENXIO - A request was made of a nonexistent device, or the request was outside the capabilities of the device.


fputc

NAME
fputc,  fputs,  putc, putchar, puts - output of characters and strings

Linux prototype

#include <stdio.h>

int fputc(int c, FILE *stream);
int fputs(const char *s, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int puts(const char *s);

AIX prototype

#include <stdio.h>

int fputc (int Character, FILE *Stream);
int fputs  (const char *String, FILE *Stream);
int putc (int Character, FILE *Stream);
int putchar (int Character);
int puts (const char *String);
 

Detail

These functions are source compatible.

Errno

When called in AIX, the fputc subroutine will fail if either the Stream is unbuffered or the Stream buffer needs to be flushed, and:
EAGAIN - The O_NONBLOCK flag is set for the file descriptor underlying Stream and the process would be delayed in the write operation.
EBADF - The file descriptor underlying Stream is not a valid file descriptor open for writing.
EFBIG - An attempt was made to write a file that exceeds the file size of the process limit or the maximum file size.
EFBIG - The file is a regular file and an attempt was made to write at or beyond the offset maximum.
EINTR - The write operation was terminated due to the receipt of a signal, and either no data was transferred or the implementation does not report partial transfers for this file.
EIO - A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write subroutine to its controlling terminal, the TOSTOP flag is set, the process is neither ignoring nor blocking the SIGTTOU signal and the process group of the process is orphaned. This error may also be returned under implementation-dependent conditions.
ENOSPC - There was no free space remaining on the device containing the file.
EPIPE - An attempt is made to write to a pipe or first-in-first-out (FIFO) that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
ENOMEM - Insufficient storage space is available.
ENXIO - A request was made of a nonexistent device, or the request was outside the capabilities of the device.


fread

NAME
fread, fwrite - binary stream input/output

Linux prototype

#include <stdio.h>

size_t  fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);

AIX prototype

#include <stdio.h>

size_t fread (void *Pointer, size_t Size, size_t NumberOfItems, FILE *Stream);
size_t fwrite (const void *Pointer, size_t Size, size_t NumberOfItems, FILE *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ENOMEM - Indicates that insufficient storage space is available.
ENXIO - Indicates that a request was made of a nonexistent device.


free

NAME
free - free dynamic memory

Linux prototype

#include <stdlib.h>

void free(void *ptr);

AIX prototype

#include <stdlib.h>

void free(void *ptr);

Detail

Functions are source compatible.


fscanf

NAME
scanf,  fscanf,  sscanf - input format conversion

Linux prototype

#include <stdio.h>

int scanf( const char *format, ...);
int fscanf( FILE *stream, const char *format, ...);
int sscanf( const char *str, const char *format, ...);

AIX prototype

#include <stdio.h>

int scanf(const char *Format [, Pointer, ... ]);
int fscanf (FILE *Stream, const char *Format[,Pointer, ... ]);
int sscanf (const char *String, const char *Format[, Pointer, ... ]);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - The O_NONBLOCK flag is set for the file descriptor underlying the file specified by the Stream, String, or wcs parameter, and the process would be delayed in the scanf, fscanf, sscanf, or wsscanf operation.
EBADF - The file descriptor underlying the file specified by the Stream, String, or wcs parameter is not a valid file descriptor open for reading.
EINTR - The read operation was terminated due to receipt of a signal, and either no data was transferred or a partial transfer was not reported.
Note: Depending upon which library routine the application binds to, this subroutine may return EINTR. Refer to the signal subroutine regarding SA_RESTART.

EIO - The process is a member of a background process group attempting to perform a read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group has no parent process.
EINVAL - The subroutine received insufficient arguments for the Format parameter.
EILSEQ - A character sequence that is not valid was detected, or a wide-character code does not correspond to a valid character.
ENOMEM - Insufficient storage space is available.


getenv

NAME
getenv - get an environment variable

Linux prototype

#include <stdlib.h>

char *getenv(const char *name);

AIX prototype

#include <stdlib.h>

char *getenv(const char *name);

Detail

Functions are source compatible.


gethostid

NAME
gethostid, sethostid - get or set the unique identifier of the current host

Linux prototype

#include <unistd.h>

long int gethostid(void);
int sethostid(long int hostid);

AIX prototype

#include <unistd.h>

int gethostid(void);
int sethostid(int HostID);

Detail

The long int may cause compiler errors.

Proposal

The return type of long for the Linux prototype is not a problem since the AIX prototype returns an int, which will always fit in the memory allocated for a long.


gethostname

NAME
gethostname, sethostname - get/set host name

Linux prototype

#include <unistd.h>

int gethostname(char *name, size_t len);
int sethostname(const char *name, size_t len);


AIX prototype

#include <unistd.h>

int gethostname (char *Name, size_t NameLength);
int sethostname (char *Name, size_t NameLength);

Details

Functions are compatible.  In AIX these are system calls.  Passing a const char * into a char * may cause compiler warnings.


getmsg

NAME
getmsg - Gets the next message off a stream.

Linux prototype

NONE

AIX prototype

#include <stropts.h>

int getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flags);

Detail

Functions are source compatible.


getpeername

NAME
getpeername - get name of connected peer

Linux prototype

#include <sys/socket.h>

int  getpeername(int  s,  struct sockaddr *name, socklen_t *namelen);

AIX prototype

#include <sys/socket.h>

int getpeername(int Socket, struct sockaddr *Name, socklen_t *NameLength);

Detail

These functions are compatible.


getsockname

NAME
getsockname - get socket name

Linux prototype

#include <sys/socket.h>

int getsockname(int s,  struct  sockaddr *name, socklen_t * namelen);

AIX prototype

#include <sys/socket.h>

int getsockname(int Socket, struct sockaddr *Name, socklen_t *NameLength);

Detail

These functions are compatible.


getsockopt

NAME
getsockopt, setsockopt - get and set options on sockets

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int  getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
int setsockopt(int s, int level, int optname,  const  void *optval, socklen_t optlen);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int getsockopt(int Socket, int Level, int Name, void *Value, socklen_t *OptionLength);
int setsockopt(int Socket, int Level, int Name, const void *Value, socklen_t OptionLength);

Detail

These functions are compatible.


getw

NAME
getw, putw - input and output of words (ints)

Linux prototype

#include <stdio.h>

int getw(FILE *stream);
int putw(int w, FILE *stream);

AIX prototype

#include <stdio.h>

int getw (FILE *Stream);
int putw (int Word, FILE *Stream);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - Indicates that the O_NONBLOCK flag is set for the file descriptor underlying the stream specified by the Stream parameter. The process would be delayed in the fgetc subroutine operation.
EBADF - Indicates that the file descriptor underlying the stream specified by the Stream parameter is not a valid file descriptor opened for reading.
EFBIG - Indicates that an attempt was made to read a file that exceeds the process' file-size limit or the maximum file size. See the ulimit subroutine.
EINTR - Indicates that the read operation was terminated due to the receipt of a signal, and either no data was transferred, or the implementation does not report partial transfer for this file.

                 Note: Depending upon which library routine the application
                 binds to, this subroutine may return EINTR. Refer to the
                 signal subroutine regarding sa_restart.

EIO - Indicates that a physical error has occurred, or the process is in a background process group attempting to perform a read subroutine call from its controlling terminal, and either the process is ignoring (or blocking) the SIGTTIN signal or the process group is orphaned.
EPIPE - Indicates that an attempt is made to read from a pipe or first-in-first-out (FIFO) that is not open for reading by any process. A SIGPIPE signal will also be sent to the process.
EOVERFLOW - Indicates that the file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream (getw).
ENOMEM - Indicates insufficient storage space is available.
ENXIO - Indicates either a request was made of a nonexistent device or the request was outside the capabilities of the device.
ENOSPC - There was no free space remaining on the device containing the file (putw).


gmtime

NAME
gmtime - transform
       binary date and time to ASCII

Linux prototype

#include <time.h>

tm *gmtime(const time_t *timer);

AIX prototype

#include <time.h>

tm *gmtime(const time_t *time);

Detail

Functions are source compatible.


index

NAME
index, rindex - locate character in string

Linux prototype

#include <string.h>

char *index(const char *s, int c);
char *rindex(const char *s, int c);

AIX prototype

#include <strings.h>

char *index (const char *String, int Character);
char *rindex (const char *String, int Character);

Detail

These functions are source compatible.


initgroups

NAME
initgroups -  initialize  the  supplementary group access list

Linux prototype

#include <grp.h>
#include <sys/types.h>

int initgroups(const char *user, gid_t group);

AIX prototype

int initgroups (char *User, int BaseGID);

Detail

The gid_t may cause compiler warnings or errors.

Proposal

This will be source compatible in AIX 5L release 5.1.
The prototype int initgroups(const char *User, gid_tgroup); will be added to grp.h and the initgroups function will be redefined to change the first arg to a const.  The documentation page for initgroups will be brought up to date.  This will not break compatibility in AIX since either a char * or const char * can be an actual parameter into a const char * formal parameter.


initstate

NAME
initstate - random number generator.

Linux prototype

#include <stdlib.h>

char *initstate(unsigned int seed, char *statebuf, size_t statelen);

AIX prototype

#include <stdlib.h>

char *initstate(unsigned seed, char *buf, size_t len);

Detail

Functions are source compatible.


insque

NAME
insque, remque - insert/remove an item from a queue

Linux prototype

#include <stdlib.h>

void insque(struct qelem *elem, struct qelem *prev);
void remque(struct qelem *elem);

AIX prototype

#include <search.h>

void insque(void *Element, void *Pred);
void remque(void *Element);

Detail

Functions are prototyped in different files.  In AIX libc, insque and remqueue are written to accept struct qelem * arguments.  The prototype uses void *.

Proposal

We need to define struct qelem in stdlib.h.  There is a definition in /usr/include/sys/atmsock.h but it does not include the q_data element.


isalnum

NAME
isalnum,  isalpha,  isascii,  isblank,  iscntrl,  isdigit, isgraph,  islower,  isprint,  ispunct,  isspace,  isupper, isxdigit - character classification routines

Linux prototype

#include <ctype.h>

int isalnum (int c);
int isalpha (int c);
int isascii (int c);
int isblank (int c);
int iscntrl (int c);
int isdigit (int c);
int isgraph (int c);
int islower (int c);
int isprint (int c);
int ispunct (int c);
int isspace (int c);
int isupper (int c);
int isxdigit (int c);

AIX prototype

#include <ctype.h>

int isalpha (int Character);
int isupper (int Character);
int islower (int Character);
int isdigit (int Character);
int isxdigit (int Character);
int isalnum (int Character);
int isspace (int Character);
int ispunct (int Character);
int isprint (int Character);
int isgraph (int Character);
int iscntrl (int Character);
int isascii (int Character);

Detail

AIX does not define isblank().


iswalnum

NAME
iswalnum - test for alphanumeric wide character

Linux prototype

#include <wctype.h>

int iswalnum(wint_t wc);
int iswalpha(wint_t wc);
int iswcntrl(wint_t wc);
int iswdigit(wint_t wc);
int iswgraph(wint_t wc);
int iswlower(wint_t wc);
int iswprint(wint_t wc);
int iswpunct(wint_t wc);
int iswspace(wint_t wc);
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswblank(wint_t wc);

AIX prototype

#include <wchar.h>

int iswalnum (wint_t WC);
int iswalpha (wint_t WC);
int iswcntrl (wint_t WC);
int iswdigit (wint_t WC);
int iswgraph (wint_t WC);
int iswlower (wint_t WC);
int iswprint (wint_t WC);
int iswpunct (wint_t WC);
int iswspace (wint_t WC);
int iswupper (wint_t WC);
int iswxdigit (wint_t WC);

Detail

AIX does not define iswblank().

Proposal

The iswblank() function will be added to AIX5L release 5.1.


jrand48

NAME
jrand48 - generate uniformly  distributed pseudo-random numbers

Linux prototype

#include <stdlib.h>

long jrand48(unsigned short int xsubi[3]);

AIX prototype

#include <stdlib.h>

long jrand48(unsigned short xsubi[3]);

Detail

Functions are source compatible.


killpg

NAME
killpg - send signal to a process group

Linux prototype

#include <signal.h>

int killpg(pid_t pgrp, int sig);

AIX prototype

#include <signal.h>

int killpg(pid_t pgrp, int  sig);

Detail

Functions are source compatible.


labs

NAME
labs - computes the absolute value of a long integer.

Linux prototype

#include <stdlib.h>

int labs(long int x);

AIX prototype

#include <stdlib.h>

int labs(long int x);

Detail

Functions are source compatible.


ldiv

NAME
ldiv - computes the quotient and remainder of long integer division.

Linux prototype

#include <stdlib.h>

ldiv_t ldiv(long int numer, long int denom);

AIX prototype

#include <stdlib.h>

ldiv_t ldiv(long int number, long int denom);

Detail

Functions are source compatible.


listen

NAME
listen - listen for connections on a socket

Linux prototype

#include <sys/socket.h>

int listen(int s, int backlog);

AIX prototype

#include <sys/socket.h>

int listen (int Socket, int Backlog);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
ECONNREFUSED - The host refused service, usually due to a server process missing at the requested name or the request exceeding the backlog amount.


localtime

NAME
localtime - transform binary date and time to ASCII

Linux prototype

#include <time.h>

tm *localtime(const time_t *timer);

AIX prototype

#include <time.h>

tm *localtime(const time_t *time);

Detail

Functions are source compatible.


lrand48

NAME
lrand48 - generate uniformly  distributed pseudo-random numbers

Linux prototype

#include <stdlib.h>

int lrand48(void);

AIX prototype

#include <stdlib.h>

long lrand48(void);

Detail

Functions are source compatible.


malloc

NAME
malloc - Allocate dynamic memory

Linux prototype

#include <stdlib.h>

void *malloc(size_t size);

AIX prototype

#include <stdlib.h>

void *malloc(size_t size);

Detail

Functions are source compatible.

The AIX operating system uses two modes for paging space allocation. The setting of the PSALLOC environment variable determines the paging space allocation mode. The default mechanism is the late paging space allocation algorithm. The user can switch to the mode most like Linux allocation by setting the value of the PSALLOC environment variable to PSALLOC=early .

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates a call has requested 0 bytes.
ENOMEM - Indicates that not enough storage space was available.


memccpy

NAME
memccpy, memchr, memcmp, memcpy, memset - memory operations

Linux prototype

#include <string.h>

void *memccpy(void *dest, const void *src, int c, size_t n);
void *memchr(const void *s, int c, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
void *memcpy(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);

AIX prototype

#include <string.h>

void *memccpy(void *Target, const void *Source, int C, size_t N);
void *memchr (const void *S, int C, size_t N);
int memcmp (const void *Target, const void *Source, size_t N);
void *memcpy (void *Target, const void *Source, size_t N);
void *memset (void *S, int C, size_t N);

Detail

These functions are compatible.


mkfifo

NAME
mkfifo - make a FIFO special file (a named pipe)

Linux prototype

#include <sys/types.h>
#include <sys/stat.h>

int mkfifo(const char *path, mode_t mode);

AIX prototype

#include <sys/stat.h>

int mkfifo(const char *path, mode_t mode);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EDQUOT - The directory in which the entry for the new file is being placed cannot be extended, or an i-node could not be allocated for the file because the user's or group's quota of disk blocks or i-nodes on the file system is exhausted.
EISDIR - The Mode parameter specifies a directory. Use the mkdir subroutine instead.
EPERM - The Mode parameter specifies a file type other than S_IFIFO, and the calling process does not have root user authority.
ETIMEDOUT - The connection timed out.
EFAULT - The Path parameter points outside of the allocated address space of the process.
EIO - An I/O error occurred during the operation.
ELOOP - Too many symbolic links were encountered in translating the Path parameter.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.


mkstemp

NAME
mkstemp - create a unique temporary file

Linux prototype

#include <stdlib.h>

int mkstemp(char *template);

AIX prototype

#include <stdlib.h>

int mkstemp(char *template);

Detail

Functions are source compatible.


mktemp

NAME
mktemp - make a unique temporary file name

Linux prototype

#include <stdlib.h>

char *mktemp(char *template);

AIX prototype

#include <stdlib.h>

char *mktemp(char *template);

Detail

Functions are source compatible.


mktime

NAME
mktime - transform binary date and time to ASCII

Linux prototype

#include <time.h>

time_t mktime(struct tm *tp);

AIX prototype

#include <time.h>

time_t mktime(struct tm *tp);

Detail

Functions are source compatible.


mrand48

NAME
mrand48

Linux prototype

#include <stdlib.h>

long mrand48(void);

AIX prototype

#include <stdlib.h>

long mrand48(void);

Detail

Functions are source compatible.


msgctl

NAME
msgctl, msgget, msgsnd, msgrcv - message operations

Linux prototype

# include <sys/types.h>
# include <sys/ipc.h>
# include <sys/msg.h>

int msgctl(int msqid, int  cmd, struct msqid_ds *buf);
int msgget(key_t key, int msgflg);
int msgsnd(int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg);
int msgrcv(int msqid, struct msgbuf *msgp,  size_t msgsz, long msgtyp, int msgflg);

AIX prototype

#include <sys/msg.h>

int msgctl(int MessageQueueID, int Command, struct msqid_ds *Buffer);
int msgget (key_t Key, int MessageFlag);
int msgsnd (int mqid, const void *mp, size_t size, int flag);
int msgrcv(int mqid, void *mp, size_t size, long int type, int flag);

Detail

The functions are source compatible.


nrand48

NAME
nrand48 - generate uniformly  distributed
       pseudo-random numbers

Linux prototype

#include <stdlib.h>

long nrand48(unsigned short int xsubi[3]);

AIX prototype

#include <stdlib.h>

long nrand48(unsigned short xsubi[3]);

Detail

Functions are source compatible.


opendir

NAME
opendir - open a directory

Linux prototype

#include <dirent.h>

DIR *opendir(const char *name);
struct dirent *readdir(DIR *dir);

AIX prototype

#include <dirent>

DIR *opendir(const char *name);
struct dirent *readdir (DIR *DirectoryPointer);

Detail

Functions are source compatible.

There are differences between the dirent structures of the two systems:

Linux

AIX

struct dirent

struct dirent

d_ino

d_ino

d_off

d_offset

d_reclen

d_reclen

d_type

d_namelen

d_name[]

d_name[]

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBADF - Indicates that the DirectoryPointer parameter argument does not refer to an open directory stream (readdir).
ENAMETOOLONG - Indicates that the length of the DirectoryName parameter argument exceeds the PATH_MAX value, or a path-name component is longer than the NAME_MAX value while the POSIX_NO_TRUNC value is in effect (opendir).


pathconf

NAME
pathconf - retreive file implementation characteristics

Linux prototype

#include <unistd.h>

long int pathconf (const char *path, int name);

AIX prototype

#include <unistd.h>

long pathconf(const char * Path, int Name);

Detail

These functions are compatible.

Errno

The Linux system referenced did not list any specific errnos in the documentation page for pathconf, but indicated that some errnos are returned.  Linux programmers should assume that AIX can return ESTALE and ETIMEDOUT in addition to the ususal error codes.


pause

NAME
pause - suspend a process until a signal is received

Linux prototype

#include <unistd.h>

int pause (void);

AIX prototype

#include <unistd.h>

int pause(void);

Detail

These functions are compatible.


putenv

NAME
putenv - set an environment variable

Linux prototype

#include <stdlib.h>

int putenv(char *string);

AIX prototype

#include <stdlib.h>

int putenv(const char *string);

Detail

These functions are compatible.


putmsg

NAME
putmsg - send a message on a stream

Linux prototype
 

#include <stropts.h>

int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags);
 

AIX prototype
 

#include <stropts.h>

int putmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int flags);

Detail

These functions are compatible.


qsort

NAME
qsort - sort a table of data in place

Linux prototype
 

#include <stdlib.h>

void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));

AIX prototype

#include <stdlib.h>

void qsort(void *Base, size_t Num, size_t Size, int(*Compar)(const void *, const void *));

Detail

These functions are compatible.


raise

NAME
raise - send a signal to the current process

Linux prototype

#include <signal.h>

int raise (int sig);

AIX prototype

#include <sys/signal.h>

int raise (int Signal);

Detail

Functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The value of the sig argument is an invalid signal number


rand

NAME
rand - generate pseudo-random number

Linux prototype

#include <stdlib.h>

int rand (void);

AIX prototype

#include <stdlib.h>

int rand(void);

Detail

These functions are compatible.


random

NAME
random - generate pseudo-random number more efficiently

Linux prototype

#include <stdlib.h>

long random (void);

AIX prototype

#include <stdlib.h>

long random(void);

Detail

These functions are compatible.


re_comp

NAME
re_comp - regular expression handler

Linux prototype
 

#include <regex.h>

char *re_comp(const char *Regex);

AIX prototype
 

#include <regex.h>

char *re_comp(const char *Regex);

Detail

These functions are compatible.


re_compile_fastmap

NAME
re_compile_fastmap

Linux prototype
 

#include <regex.h>

int re_compile_fastmap(struct re_pattern_buffer *buffer);


AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_compile_pattern

NAME
re_compile_pattern

Linux prototype
 

#include <regex.h>

const char *re_compile_pattern(const char *pattern, size_t length, struct re_pattern_buffer *buffer);


AIX prototype
 

   NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_exec

NAME
re_exec - regular expression handler

Linux prototype
 

#include <regex.h>

int re_exec(const char *string);

AIX prototype
 

#include <regex.h>

int re_exec(const char *String);

Detail

These functions are compatible.


re_match

NAME
re_match - return number of characters that matched string

Linux prototype
 

#include <regex.h>

int re_match(struct re_pattern_buffer *buffer, const char *string, int length, int start, struct re_registers *regs);
 

AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_match_2

NAME
re_match_2

Linux prototype
 

#include <regex.h>

int re_match_2(struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers *regs, int stop);


AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_search

NAME
re_search - search string for pattern

Linux prototype
 

#include <regex.h>

int re_search(struct re_pattern_buffer *buffer, const char *string, int length, int start, int range, struct re_registers *regs);

AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_search_2

NAME
re_search_2

Linux prototype
 

#include <regex.h>

int re_search_2(struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop);


AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_set_registers

NAME
re_set_registers

Linux prototype
 

#include <regex.h>

void re_set_registers(struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends);


AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


re_set_syntax

NAME
re_set_syntax - sets the current default syntax

Linux prototype
 

#include <regex.h>

reg_syntax_t re_set_syntax(reg_syntax_t);

AIX prototype
 

NONE

Detail

This function does not exist on AIX.

Proposal

This is not an API function.  It is a service funtion for the Linux implementation of re_comp and re_exec.  It will not be provided on AIX.


realloc

NAME
realloc - memory allocator

Linux prototype

#include <stdlib.h>

void *realloc(void *ptr, size_t size);

AIX prototype

#include <stdlib.h>

void *realloc(void *ptr, size_t size);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates a call has requested 0 bytes.
ENOMEM - Indicates that not enough storage space was available.


recv

NAME
recv, recvfrom, recvmsg - receive a message from a socket

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int recv(int s, void *buf, size_t len, int flags);
int recvfrom(int  s,  void  *buf,  size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
int recvmsg(int s, struct msghdr *msg, int flags);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int recv(int Socket, void *Buffer, size_t Length, int Flags);
int recvfrom(int Socket, void *Buffer, size_t Length, int Flags, struct sockaddr *From, socklen_t *FromLength);
int recvmsg(int Socket, struct msghdr Message[ ], int Flags);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EWOULDBLOCK - The socket is marked nonblocking, and no connections are present to be accepted.


regcomp

NAME
regcomp - compile a regular expression into an executable string

Linux prototype
 

#include <regex.h>

int regcomp(regex_t *preg, const char *regex, int cflags);

AIX prototype
 

#include <regex.h>

int regcomp(regex_t *preg, const char * regex, int flags);

Detail

These functions are compatible.

Errno

The regcomp function returns error conditions as its return value.  The AIX implementation does not return any error values not defined in Linux.


regerror

NAME
regerror - return string that describes ErrCode parameter

Linux prototype
 

#include <regex.h>

size_t regerror(int  errcode,  const  regex_t  *preg, char *errbuf, size_t errbuf_size);

AIX prototype
 

#include <regex.h>

size_t regerror(int Errcode, const regex_t *Preg, char *ErrBuf, size_t ErrBuf_Size);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errors not documented in Linux:
REG_ENEWLINE - Indicates a new-line character was found before the end of the regular or extended regular expression, and REG_NEWLINE was not set.


regexec

NAME
regexec

Linux prototype
 

#include <regex.h>

int regexec(const regex_t *preg,  const char *string, size_t nmatch, regmatch_t pmatch[], int eflags);

AIX prototype
 

#include <regex.h>

size_t regexec(const regex_t *Preg, const char *String, size_t NMatch, regmatch_t *PMatch, int EFlags);

Detail

These functions are compatible.

Errno

The regexec function returns error conditions as its return value.  The AIX implementation does not return any error values not defined in Linux.


regfree

NAME
regfree - free memory allocated by regcomp()

Linux prototype
 

#include <regex.h>

void regfree(regex_t *preg);

AIX prototype
 

#include <regex.h>

void regfree(regex_t *Preg);

Detail

These functions are compatible.


remove

NAME
remove - delete a name and possibly the file it refers to

Linux prototype

#include <stdio.h>

int remove(const char *pathname);

AIX prototype

#include <stdio.h>

int remove(const char *FileName);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EBUSY - The entry to be unlinked is the mount point for a mounted filesystem, or the file named by Path is a named STREAM.
ETIMEDOUT - The connection timed out.
ESTALE - The root or current directory of the process is located in a virtual file system that is unmounted.
EEXIST - The directory named by the Path parameter is not empty.
EINVAL - The directory named by the Path parameter is not well-formed.


res_init

NAME
res_init - search for default domain name and Internet address

Linux prototype

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
extern struct state _res;

int res_init(void);


AIX prototype
 

#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>

int res_init(void);

Detail

These functions are compatible.


rewinddir

NAME
rewinddir - reset directory stream

Linux prototype

#include <sys/types.h>
#include <dirent.h>

void rewinddir(DIR *dir);

AIX prototype

#include <dirent.h>

void rewinddir (DIR *DirectoryPointer);

Detail

These functions are source compatible.


rexec

NAME
rexec - command execution on remote host

Linux prototype

#include <netdb.h>

int rexec(char **Host,  int Port, const char *User, const char *Passwd, const char *Command, int *Errorp);

AIX prototype
 

   #include <arpa/aixrcmds.h>

   int rexec(char **Host,  int Port, char *User, char *Passwd, char *Command, int *Errorp);

Detail

   No man page found on Linux.  The const char * may cause compiler warnings on AIX.


seed48

NAME
seed48 - generate uniformly distributed pseudo-random number sequences

Linux prototype

#include <stdlib.h>

unsigned short int *seed48(unsigned short int seed16v[3]);

AIX prototype

#include <stdlib.h>

unsigned short *seed48(unsigned short Seed16v[3]);

Detail

These functions are compatible.


seekdir

NAME
seekdir  -  set the position of the next readdir() call in the directory stream.

Linux prototype

#include <dirent.h>

void seekdir(DIR *dir, off_t offset);

AIX prototype

#include <dirent.h>

void seekdir(DIR *DirectoryPointer, long Location);

Detail

These functions are source compatible.


semctl

NAME
semctl, semget semop - semaphore operations

Linux prototype

# include <sys/types.h>
# include <sys/ipc.h>
# include <sys/sem.h>

int  semctl(int semid, int semnum, int cmd, union semun arg);
int semget(key_t key, int nsems, int semflg);
int semop(int semid, struct sembuf *sops, unsigned nsops);

#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
   /* union semun is defined by including <sys/sem.h> */
#else
   /* according to X/OPEN we have to define it ourselves */
union semun {
               int val;        /* value for SETVAL */
               struct semid_ds *buf;      /* buffer for IPC_STAT, IPC_SET */
               unsigned short int *array/* array for GETALL, SETALL */
               struct seminfo *__buf;      /* buffer for IPC_INFO */
};
#endif

AIX prototype

#include <sys/sem.h>

int semctl(int id, int number, int cmd, union semun arg);
int semget(key_t Key, int number, int flag);
int semop(int id, struct sembuf *op, size_t number);

union semun {
         int val;
         struct semid_ds *buf;
         unsigned short *array;
};

Detail

The definitions of union semun are different.  The types of the third argument to semop are different.

Proposal

AIX does not use the __buf member, nor do the standards define it.  AIX conforms to UNIX98.  The different type of the third arg in semop will ony result in compile warnings.

Errno

When called in AIX, this function can return these errnos not documented in Linux:

ENOMEM - There is not enough memory to complete the operation (semctl).
EINVAL - A semaphore identifier does not exist and the NumberOfSemaphores parameter is less than or equal to a value of 0, or greater than the system-imposed value (semget).
EINVAL - A semaphore identifier exists for the Key parameter, but the number of semaphores in the set associated with it is less than the value of the NumberOfSemaphores parameter and the NumberOfSemaphores parameter is not equal to 0 (semget).
ENOSPC - The limit on the number of individual processes requesting a SEM_UNDO flag would be exceeded (semop).


send

NAME
send, sendto, sendmsg - send a message from a socket

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int send(int s, const void *msg, size_t len, int flags);
int  sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
int sendmsg(int s, const struct msghdr *msg, int flags);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int send(int Socket, const void *Message, size_t Length, int Flags);
int sendto(int Socket, const void *Message, size_t Length, int Flags, const struct sockaddr *To, size_t ToLength);
int sendmsg (int Socket, const struct msghdr Message[ ], int Flags);

Detail

These functions are compatible.


setbuf

NAME
setbuf, setvbuf - stream buffering operations

Linux prototype

#include <stdio.h>

void setbuf(FILE *stream, char *buf);
int setvbuf(FILE *stream, char *buf, int mode , size_t size);

AIX prototype

#include <stdio.h>

void setbuf (FILE *Stream, char *Buffer);
int setvbuf (FILE *Stream, char *Buffer, int Mode, size_t Size);

Detail

These functions are source compatible.


setlocale

NAME
setlocale - set the current locale.

Linux prototype

#include <locale.h>

char *setlocale(int category, const char * locale);

AIX prototype

#include <locale.h>

char *setlocale(int Category, const char *Locale);

Detail

The functions are source compatible.


setstate

NAME
setstate - generate pseudo-random numbers more efficiently

Linux prototype

#include <stdlib.h>

char *setstate(char *statebuf);

AIX prototype

#include <stdlib.h>

char *setstate(const char *buffer);

Detail

These functions are compatible.


shmat

NAME
shmat, shmctl, shmdt, shmget - shared memory operations

Linux prototype

# include <sys/types.h>
# include <sys/ipc.h>
# include <sys/shm.h>

void *shmat(int shmid, const void *shmaddr, int shmflg);
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
int shmdt(const void *shmaddr);
int shmget(key_t key, int size, int shmflg);

AIX prototype

#include <sys/shm.h>

void *shmat(int id, const void *address, int flag);
int shmctl(int id, int Command, struct shmid_ds *Buffer);
int shmdt(const void *address);
int shmget(key_t Key, size_t Size, int Flag);

Detail

The functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAGAIN - The file to be mapped has enforced locking enabled, and the file is currently locked (shmat).
EBADF - A file descriptor to map does not refer to an open regular file (shmat).
EEXIST - The file to be mapped has already been mapped (shmat).
EMFILE - The number of shared memory segments attached to the calling process exceeds the system-imposed limit (shmat).
ENOMEM - The Command parameter is equal to the SHM_SIZE value, and the attempt to change the segment size is unsuccessful because the system does not have enough memory (shmctl).
ENOENT - A shared memory identifier does not exist for the Key parameter, and the IPC_CREAT flag is not set in the SharedMemoryFlag parameter (shmget).


shutdown

NAME
shutdown - shut down part of a full-duplex connection

Linux prototype

#include <sys/socket.h>

int shutdown(int s, int how);

AIX prototype

#include <sys/socket.h>

int shutdown(int Socket, int How);

Detail

Functions are source compatible.


sigaddset

NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal set operations.

Linux prototype

#include <signal.h>

int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

AIX prototype

#include <signal.h>

int sigemptyset (sigset_t *Set);
int sigfillset (sigset_t *Set);
int sigaddset (sigset_t *Set, int SignalNumber);
int sigdelset (sigset_t *Set, int SignalNumber);
int sigismember (sigset_t *Set, int SignalNumber);

Detail

Functions are compatible.


sigblock

NAME
sigblock, siggetmask, sigsetmask, sigmask - manipulate the signal mask

Linux prototype

#include <signal.h>

int sigblock(int mask);
int siggetmask(void);
int sigsetmask(int mask);
int sigmask(int signum);

AIX prototype

#include <signal.h>

int sigblock(int mask);
int sigsetmask(int mask);
int sigmask(int signum);

Detail

The siggetmask() function does not exist in AIX.  The sigmask() function is not listed in LSB.  There is no AIX man page for sigmask().  These functions should not be used by applications anyway because of the usage of ints instead of sigset_t's.

Proposal

We need to create a man page entry for sigmask().
The siggetmask function will be available on AIX 5L release 5.1.


sighold

NAME
sigset, sighold, sigrelse, sigignore - Enhanced signal management

Linux prototype

#include <signal.h>

void (*sigset(int Signal, void (*Function)(int)))(int);
int sighold (int Signal);
int sigrelse (int Signal);
int sigignore (int Signal);

AIX prototype

#include <signal.h>

void (*sigset(int Signal, void (*Function)(int)))(int);
int sighold (int Signal);
int sigrelse (int Signal);
int sigignore (int Signal);

Detail

Functions are source compatible.

Errno

These functions were not documented on Linux.  They can return EINVAL under AIX.


siginterrupt

NAME
siginterrupt - allow signals to interrupt system calls

Linux prototype

#include <signal.h>

int siginterrupt(int sig, int flag);

AIX prototype

#include <signal.h>

int siginterrupt (int Signal, int Flag);

Detail

Functions are source compatible.


siglongjmp

NAME
siglongjmp - non-local jump to a saved stack context

Linux prototype

#include <setjmp.h>

int sigsetjmp(sigjmp_buf env, int savesigs);
void siglongjmp(sigjmp_buf env, int val);

AIX prototype

#include <setjmp.h>

int sigsetjmp (sigjmp_buf Environment, int SaveMask);
void siglongjmp (sigjmp_buf Environment, int Value);

Detail

Functions are source compatible.  The sigjmp_buf structure is larger on AIX than Linux, but is source compatible since it is not directly manipulated by the application.  The LSB document does not list sigsetjmp.


sigqueue

NAME
sigqueue

Linux prototype

int sigqueue (pid_t pid, int sig, const union sigval val);

AIX prototype

#include <signal.h>

int sigqueue(pid_t Pid, int Signal, const union sigval Value);

Detail

This function is listed in the LSB but documented in neither system.  In AIX this function returns ENOSYS.

Proposal

This call is part of POSIX realtime signals.  Support for this is not yet scheduled.


sigstack

NAME
sigstack - Sets and gets signal stack context

Linux prototype

#include <signal.h>

int sigstack(struct sigstack *nstack, struct sigstack *ostack);

AIX prototype

#include <signal.h>

int sigstack(struct sigstack *InStack, struct sigstack *OutStack);

Detail

Functions are source compatible.

Errno

This function was not documented on Linux.  They can return EFAULT under AIX.


sigtimedwait

NAME
sigtimedwait

Linux prototype

#include <signal.h>

int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout);

AIX prototype

#include <signal.h>

int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout);

Detail

In AIX, this function returns ENOSYS.

Proposal

This call is part of POSIX realtime signals.  Support for this is not yet scheduled.


sigvec

NAME
sigvec - BSD software signal facilities

Linux prototype

#include <bsd/signal.h>

int  sigvec(int  sig,  struct  sigvec  *vec, struct sigvec *ovec);

AIX prototype

#include <signal.h>

Berkeley Compatibility Library (libbsd.a)

int sigvec (int Signal, struct sigvec *Invec, struct sigvec *Outvec);
 

Detail

The functions are source compatible.


sigwait

NAME
sigwait - handling of signals in threads

Linux prototype

#include <pthread.h>
#include <signal.h>

int sigwait(const sigset_t *set, int *sig);

AIX prototype

#include <signal.h>

int sigwait (const sigset_t *set, int *sig);

Detail

In AIX, this returns ENOSYS.

Proposal

This call is part of POSIX realtime signals.  Support for this is not yet scheduled.


sigwaitinfo

NAME
sigwaitinfo

Linux prototype

#include <pthread.h>
#include <signal.h>

int sigwait(const sigset_t *set, int *sig);

AIX prototype

#include <signal.h>

int sigwaitinfo(const sigset_t *set, siginfo_t *info);
 

Detail

In AIX, this function returns ENOSYS.  There are no man pages for sigwaitinfo() either in Linux or AIX.

Proposal

This call is part of POSIX realtime signals.  Support for this is not yet scheduled.


sleep

NAME
sleep - put process to sleep

Linux prototype

#include <unistd.h>

unsigned int sleep(unsigned int seconds);

AIX prototype

#include <unistd.h>

unsigned int sleep(unsigned int seconds);

Detail

These functions are compatible.


socket

NAME
socket - create an endpoint for communication

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int socket(int domain, int type, int protocol);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

int socket (int AddressFamily, int Type, int Protocol);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EAFNOSUPPORT - The addresses in the specified address family cannot be used with this socket.
ESOCKTNOSUPPORT - The socket in the specified address family is not supported.


socketpair

NAME
socketpair - create a pair of connected sockets

Linux prototype

#include <sys/types.h>
#include <sys/socket.h>

int socketpair(int d, int type, int protocol, int sv[2]);

AIX prototype

#include <sys/types.h>
#include <sys/socket.h>

int socketpair (int Domain, int Type, int Protocol, int SocketVector[2]);

Detail

These functions are compatible.


srand

NAME
srand - generate pseudo-random numbers

Linux prototype

#include <stdlib.h>

void srand(unsigned int seed);

AIX prototype

#include <stdlib.h>

void srand(unsigned int seed);

Detail

These functions are compatible.


srand48

NAME
srand48 - generate uniformly distributed pseudo-random number sequences

Linux prototype

#include <stdlib.h>

void srand48(long int seedval);

AIX prototype

#include <stdlib.h>

void srand48(long seed);

Detail

These functions are compatible.


srandom

NAME
srandom - generate pseudo-random numbers more efficiently

Linux prototype

#include <stdlib.h>

void srandom(unsigned int seed);

AIX prototype

#include <stdlib.h>

void srandom(unsigned seed);

Detail

These functions are compatible.


statvfs

NAME
statvfs - returns information about a filesystem

Linux prototype
 

    #include <sys/statvfs.h>

    int statvfs(const char *file, struct statvfs *buf);

AIX prototype
 

#include <sys/statvfs.h>

int statvfs(const char *file, struct statvfs *buf);

Detail

These functions are compatible.


strcasecmp

NAME
strcmp, strncmp, strcoll, strcasecmp, strncasecmp- compare strings

Linux prototype

#include <string.h>

int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, size_t n);
int strcoll(const char *s1, const char *s2);
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t n);

AIX prototype

#include <string.h>

int  strcmp(const char *String1,  const char *String2);
int strncmp(const char *String1, const char *String2, size_t Number);
int strcoll(const char *String1, const char *String2);

#include <strings.h>

int strcasecmp(const char *String1, const char *String2);
int strncasecmp(const char *String1, const char *String2, size_t Number);

Detail

Some prototypes are in different header files.  Linux prototypes strcasecmp and strncasecmp in string.h and strings.h, but the prototypes in string.h are only visible without POSIX_SOURCE.

Proposal

In AIX we can #include strings.h in string.h.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - A string parameter is an invalid address.
EINVAL - A string parameter contains characters outside the domain of the collating sequence (strcoll).


strcat

NAME
strcat, strncat, strxfrm, strcpy, strncpy, strdup- copy and append strings

Linux prototype

#include <string.h>

char *strcat(char *dest, const char *src);
char *strncat(char *dest, const char *src, size_t n);
size_t strxfrm(char *dest, const char *src, size_t n);
char *strcpy(char *dest, const char *src);
char *strncpy(char *dest, const char *src, size_t n);
char *strdup(const char *s);

AIX prototype

#include <string.h>

char *strcat(char *String1,  const char *String2);
char *strncat(char *String1, const char *String2, size_t Number);
size_t  strxfrm(char *String1, const char *String2, size_t  Number);
char *strcpy(char *String1, const char *String2);
char *strncpy(char *String1, const char *String2, size_t Number);
char * strdup(const char *String1);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - A string parameter is an invalid address.
EINVAL - A string parameter contains characters outside the domain of the collating sequence (strxfrm).


strchr

NAME
strlen, strchr, strrchr, strpbrk, strspn, strcspn, strstr, strtok, strtok_r - determine the size, location, and existence of strings

Linux prototype

#include <string.h>

size_t strlen(const char *s);
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
char *strpbrk(const char *s, const char *accept);
size_t strspn(const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);
char *strstr(const char *haystack, const char *needle);
char *strtok(char *s, const char *delim);

#if defined __USE_POSIX || defined __USE_MISC
char *strtok_r (char *restrict s, const char *restrict delim, char **restrict save_ptr);
#endif
 

AIX prototype

#include <string.h>

size_t  strlen(const char *String);
char *strchr(const char *String, int Character);
char *strrchr(const char *String,  int Character);
char *strpbrk(const char *String1,  const char *String2);
size_t  strspn(const char *String1, const char *String2);
size_t  strcspn(const char *String1,  const char *String2);
char *strstr(const char *String1,  const char *String2);
char *strtok(char *String1, const char *String2);
char *strtok_r(char *String1, const char *String2, char **SavePtr);

Detail

Functions are source compatible.  AIX has no documentation for strtok_r() but it is exported from libc and prototyped in string.h.

Proposal

A documentation page will be added to AIX 5L release 5.1 for strtok_r.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - A string parameter is an invalid address.


strerror

NAME
strerror, strerror_r - return string describing error code

Linux prototype

#include <string.h>

char *strerror(int errnum);

#ifdef  __USE_MISC
char *strerror_r(int errnum, char *buf, size_t buflen);
#endif

AIX prototype

#include <string.h>

char *strerror(int ErrorNumber);

#include <pthread.h>
#include <string.h>

 int  strerror_r(int ErrorNumber, char *Buffer, int BuffLen);

Detail

The strerror() functions are source compatible.  The prototype for strerror_r() is different.

Proposal

In AIX 5L release 5.1 a compatible version of this function will be added to libc.  The prototype will be visible without any special defines.  The prototype when compiled with -D_LINUX will be

#include <string.h>

 char *  strerror_r(int ErrorNumber, char *Buffer, size_t BuffLen);


strfmon

NAME
strfmon - Formats monetary strings

Linux prototype

#include <monetary.h>

ssize_t strfmon (char *s, size_t maxsize, const char *format, ...);

AIX prototype

#include <monetary.h>

ssize_t strfmon(char *S, size_t MaxSize, const char *Format, ...);

Detail

Functions are source compatible.

Errno

No man page was found for strfmon on Linux.  In AIX, strfmon can return E2BIG.


strfry

NAME
strfry - randomize a string

Linux prototype

#include <string.h>

char *strfry(char *string);

AIX prototype

NONE

Detail

This will not be implemented in AIX.


strftime

NAME
strftime - format date and time

Linux prototype

#include <time.h>

size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);

AIX prototype

#include <time.h>

size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);

Detail

Functions are source compatible.


strnlen

NAME
strnlen - determine the length of a fixed-size string

Linux prototype

#include <string.h>

size_t strnlen (const char *s, size_t maxlen);

AIX prototype

NONE

Detail

This will be available in AIX 5L release 5.1.


strpbrk

NAME
strpbrk - search a string for any of a set of characters

Linux prototype

#include <string.h>

char *strpbrk(const char *s, const char *accept);

AIX prototype

#include <string.h>

char *strpbrk(const char *s, const char *accept);

Detail

Functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - A string parameter is an invalid address.


strptime

NAME
strptime  -  convert  a string representation of time to a time tm structure

Linux prototype

#include <time.h>

char *strptime(const char *s, const char  *format,  struct tm *tm);

AIX prototype

#include <time.h>

char *strptime(const char *Buf, const char *Format, struct tm *Tm);

Detail

Functions are source compatible.


strsep

NAME
strsep - extract token from string

Linux prototype

#include <string.h>

char *strsep(char **stringp, const char *delim);

AIX prototype

char *strsep(char **stringp, const char *delim);

Detail

This function will be available in AIX5L release 5.1.


strsignal

NAME
strsignal - return string describing signal

Linux prototype

#define _GNU_SOURCE
#include <string.h>

char *strsignal(int sig);

extern const char * const sys_siglist[];

AIX prototype

NONE

Detail

This function does not exist on AIX.

Proposal

This will be available in AIX 5L release 5.1.


strtod

NAME
strtod - convert string to double

Linux prototype

#include <stdlib.h>

double strtod(const char *nptr, char **endptr);

AIX prototype

#include <stdlib.h>

double strtod(const char *ptr, char **end);

Detail

These functions are compatible.


strtof

NAME
strtof - convert string to float

Linux prototype

NONE

AIX prototype

#include <stdlib.h>

float strtof(char *ptr, char **end);

Detail

These functions are compatible.


strtol

NAME
strtol - convert string to long

Linux prototype

#include <stdlib.h>

int strtol(const char *nptr, char **endptr, int base);

AIX prototype

#include <stdlib.h>

int strtol(const char *nptr, char **endptr, int base);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The value of the Base parameter is not valid, or the string to be converted is not a valid number.


strtold

NAME
strtold, strtoll - convert string to long double or long long

Linux prototype

NONE

AIX prototype

#include <stdlib.h>

long double strtold(char *nptr, char **endptr);
long long int strtoll(char *String, char **EndPointer, int Base);

Detail

These functions are compatible.


strtoul

NAME
strtoul - convert string to unsigned long

Linux prototype

#include <stdlib.h>

int strtoul(const char *nptr, char **endptr, int base);

AIX prototype

#include <stdlib.h>

int strtoul(const char * nptr, char **endptr, int base);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The value of the Base parameter is not valid, or the string to be converted is not a valid number.


swab

NAME
swab - swap adjacent bytes

Linux prototype

#include <string.h>

void swab(const void *from, void *to, size_t n);

AIX prototype

#include <unistd.h>

void swab (const void *From, void *To, ssize_t NumberOfBytes);

Detail

These functions are compatible.


sysconf

NAME
sysconf - determine current value of system limit or option

Linux prototype

#include <unistd.h>

int sysconf(int name);

AIX prototype

#include <unistd.h>

long sysconf(int name);

Detail

We need to identify all of the valid values for the _SC defines for this call.

Proposal

AIX needs to identify _SC_PHYS_PAGES, _SC_AVPHYS_PAGES.  All others defined on Linux are defined on AIX.  These new flags will be available on AIX 5L release 5.1.


tcdrain

NAME
tcdrain - waits for output to complete

Linux prototype

#include <termios.h>

int tcdrain (int fd);

AIX prototype

#include <termios.h>

int tcdrain(int fd);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcflow

NAME
tcflow - performs flow control functions

Linux prototype

#include <termios.h>

int tcflow(int fd, int action);

AIX prototype

#include <termios.h>

int tcflow(int fd, int action);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcflush

NAME
tcflush - discards data from the specified queue

Linux prototype

#include <termios.h>

int tcflush(int fd, int queue_selector);

AIX prototype

#include <termios.h>

int tcflush(int File, int selector);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcgetattr

NAME
tcgetattr - gets terminal state

Linux prototype

#include <termios.h>

int tcgetattr(int fd, struct termios *termios_p);

AIX prototype

#include <termios.h>

int tcgetattr(int file, struct termios *termiosp);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcgetpgrp

NAME
tcgetpgrp - gets foreground process group id

Linux prototype

#include <unistd.h>

pid_t tcgetpgrp(int fd);

AIX prototype

#include <unistd.h>

pid_t tcgetpgrp(int file);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcgetsid

NAME
tcgetsid - get foreground session id

Linux prototype

#include <termios.h>

pid_t tcgetsid(int fd);

AIX prototype

#include <termios.h>

pid_t tcgetsid(int file);

Detail

These functions are compatible.

Errno

No documentation was found on either system for tcgetsid.


tcsendbreak

NAME
tcsendbreak - sends a break on an asynchronous serial line

Linux prototype

#include <termios.h>

int tcsendbreak(int fd, int duration);

AIX prototype

#include <termios.h>

int tcsendbreak(int file, int duration);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcsetattr

NAME
tcsetattr - sets terminal state

Linux prototype

#include <termios.h>

int tcsetattr(int fd, int actions, const struct termios *termios_p);

AIX prototype

#include <termios.h>

int tcsetattr(int file, int actions, const struct termios *termiosp);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


tcsetpgrp

NAME
tcsetpgrp - sets foreground process group id

Linux prototype

#include <unistd.h>

int tcsetpgrp(int fd, pid_t pgrp_id);

AIX prototype

#include <unistd.h>

int tcsetpgrp(int file, pid_t id);

Detail

These functions are compatible.

Errno

The man page on Linux did not specify the errnos returned.


telldir

NAME
telldir - return current location in directory stream.

Linux prototype

#include <dirent.h>

off_t telldir(DIR *dir);

AIX prototype

#include <dirent.h>

long telldir(DIR *DirectoryPointer);

Detail

These functions are compatible.


tempnam

NAME
tempnam - create a name for a temporary file

Linux prototype

#include <stdio.h>

char *tempnam(const char *dir, const char *pfx);

AIX prototype

#include <stdio.h>

char *tempnam (const char *Directory, const char *FileXPointer);

Detail

These functions are source compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - Indicates an invalid string value.


timezone

NAME
timezone  - global

Linux prototype

#include <time.h>

# if defined __USE_SVID || defined __USE_XOPEN
extern long int timezone;
# endif
 

AIX prototype
 

#include <time.h>

#ifdef _XOPEN_SOURCE
extern long timezone
#endif

Detail

These symbols are comaptible.


tolower

NAME
tolower - convert letter to lower case

Linux prototype

#include <ctype.h>

int tolower(int c);

AIX prototype

#include <ctype.h>

int tolower(int Character);

Detail

These functions are compatible.


toupper

NAME
toupper - convert letter to upper case

Linux prototype

#include <ctype.h>

int toupper(int c);

AIX prototype

#include <ctype.h>

int toupper(int Character);

Detail

These functions are compatible.


tzname

NAME
tzname - global

Linux prototype

#include <time.h>

# ifdef __USE_POSIX
extern char *tzname[2];
#endif

AIX prototype
 

#include <time.h>

extern char *tzname[];
 

Detail

These symbols are compatible.


tzset

NAME
tzset - converts the formats of date and time representations

Linux prototype

#include <time.h>

void tzset (void);

AIX prototype

#include <time.h>

void tzset(void);

Detail

These functions are compatible.


ulimit

NAME
ulimit - sets and gets user limits

Linux prototype

#include <ulimit.h>

long ulimit(int cmd, long newlimit);

AIX prototype

#include <ulimit.h>

long ulimit(int cmd, ulong newlimit);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EINVAL - The Command parameter is a value other than GET_FSIZE, SET_FSIZE, GET_DATALIM, SET_DATALIM, GET_STACKLIM, SET_STACKLIM, GET_REALDIR, or SET_REALDIR.


wait

NAME
wait - wait for child process to stop or terminate

Linux prototype

#include <sys/wait.h>

pid_t wait(int *status);

AIX prototype

#include <sys/wait.h>

pid_t wait(int *status);

Detail

These functions are compatible.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - The statu parameter points to a location outside of the address space of the process.


wait3

NAME
wait3 - wait for child, BSD style

Linux prototype

#define _USE_BSD
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>

pid_t wait3(int *status, int options, struct rusage *rusage)

pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage)


AIX prototype

#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>

pid_t wait3(int *status, int options, struct rusage * rusage);

Detail

We need to look at the defined options for the second argument.

Errno

When called in AIX, this function can return these errnos not documented in Linux:
EFAULT - The status or rusage parameter points to a location outside of the address space of the process.
EINVAL - The value of the Options parameter is not valid.


waitid

NAME
waitid - wait for child matching idtype and id

Linux prototype

#include <sys/wait.h>

int waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options);


AIX prototype

#include <sys/wait.h>

int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options);
 

Detail

These functions are compatible.

Errno

The waitid function is not documented on either system.   In AIX, waitid can return EINVAL.


getdents

NAME
getdents - get directory entries

Linux prototype

#include <unistd.h>
#include <linux/types.h>
#include <linux/dirent.h>
#include <linux/unistd.h>

int getdents(unsigned int fd, struct dirent *dirp, unsigned int count);

AIX prototype

NONE

Detail

getdents is not implemented on AIX.  Libraries should use getdirent((int)fd, (char *)buf, (size_t)count).


unknown

NAME
Unknown function

Detail

This function is listed in the LSB document but marked as being of unknown derivation.  It exists neither in the Linux man page base nor in AIX.  This function will be documented later.  Until a determination is made, it will not be available in AIX.


File Macro values

File open modes.

File open mode modifiers are defined differently between Linux and AIX.

Flag

Linux

AIX

O_ACCMODE

3

3

O_RDONLY

0

0

O_WRONLY

1

1

O_RDWR

2

2

O_CREAT

0x40

0x100

O_EXCL

0x80

0x400

O_NOCTTY

0x100

0x800

O_TRUNC

0x200

0x200

O_APPEND

0x400

0x8

O_NONBLOCK

0x800

0x4

O_NDELAY

0x800

0x8000

O_SYNC

0x1000

0x10

O_FSYNC

0x1000

undefined

O_ASYNC

0x2000

undefined

Fcntl commands

Cmd

Linux

AIX

F_DUPFD

0

0

F_GETFD

1

1

F_SETFD

2

2

F_GETFL

3

3

F_SETFL

4

4

F_GETLK

5

5

F_SETLK

6

6

F_SETLKW

7

7

File modes

File permission names and values are identical on Linux and AIX.


Signal values

Signal values are defined differently between Linux and AIX.  Linux signals are essentially a fully contained subset of AIX signals.  The only exception is SIGSTKFLT.  No code was found in the Linux kernel to implement this signal.
 

Signal

Linux

AIX

SIGHUP

1

1

SIGINT

2

2

SIGQUIT

3

3

SIGILL

4

4

SIGTRAP

5

5

SIGABRT

6

6

SIGIOT

6

6

SIGBUS

7

10

SIGFPE

8

8

SIGKILL

9

9

SIGUSR1

10

30

SIGSEGV

11

11

SIGUSR2

12

31

SIGPIPE

13

13

SIGALRM

14

14

SIGTERM

15

15

SIGSTKFLT

16

undefined

SIGCLD

17

20

SIGCHLD

17

20

SIGCONT

18

19

SIGSTOP

19

17

SIGTSTP

20

18

SIGTTIN

21

21

SIGTTOU

22

22

SIGURG

23

16

SIGXCPU

24

24

SIGXFSZ

25

25

SIGVTALRM

26

34

SIGPROF

27

32

SIGWINCH

28

28

SIGPOLL

29

23

SIGIO

29

23

SIGPWR

30

29

SIGSYS

31

12

_NSIG

64

undefined


Poll macro values

The pollfd structures are identical.  The values for the events element differ as follows.
 

Event

Linux

AIX

POLLIN

0x001

0x001

POLLOUT

0x004

0x002

POLLPRI

0x002

0x004

POLLWRNORM

0x100

0x002

POLLRDNORM

0x040

0x010

POLLRDBAND

0x080

0x020

POLLWRBAND

0x200

0x040

POLLMSG

0x400

0x080


Open modes

The following open modes are common to both Linux and AIX:

O_ACCMODE, O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_NOCTTY, OTRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC

The following open modes are available only in Linux with __USE_GNU defined:

O_DIRECTORY, O_NOFOLLOW

The following open mode is available in Linux with __USE_LARGEFILE64 defined and in AIX with _LARGE_FILE_API defined:

O_LARGEFILE

The following open modes are available in Linux with either __USE_POSIX199309 or __USE_UNIX98 defined and in AIX with _XOPEN_SOURCE == 500:

O_DSYNC, O_RSYNC



 

Data Definitions for libc

Symbol

LSB

AIX 4.3.3

Linux 2.2.14/glibc 2.1.3

B0

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B110

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B1200

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B134

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B150

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B1800

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B19200

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B200

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B2400

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B300

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B38400

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B4800

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B50

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B600

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B75

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

B9600

termios.h

sys/ttydev.h termios.h 

asm/termbits.h bits/termios.h 

BRKINT

termios.h

termios.h 

asm/termbits.h bits/termios.h 

BUFSIZ

stdio.h

stdio.h 

stdio.h 

CHAR_BIT

limits.h

sys/limits.h 

limits.h 

CHAR_MAX

limits.h

sys/limits.h 

limits.h 

CHAR_MIN

limits.h

sys/limits.h 

limits.h 

CLOCAL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CREAD

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CS5

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CS6

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CS7

termios.h

termios.h

asm/termbits.h bits/termios.h 

CS8

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CSIZE

termios.h

termios.h 

asm/termbits.h bits/termios.h 

CSTOPB

termios.h

termios.h 

asm/termbits.h bits/termios.h 

DBL_DIG

limits.h

float.h sys/limits.h

MISSING

DBL_MAX

limits.h

float.h sys/limits.h 

kpathsea/c-minmax.h 

DBL_MIN

limits.h

float.h sys/limits.h 

kpathsea/c-minmax.h 

E2BIG

errno.h

sys/errno.h 

asm/errno.h 

EACCES

errno.h

arpa/tftp.h sys/errno.h 

asm/errno.h 

EAGAIN

errno.h

sys/errno.h 

asm/errno.h 

EBADF

errno.h

sys/errno.h 

asm/errno.h 

EBADFD

errno.h

MISSING

asm/errno.h 

EBUSY

errno.h

sys/errno.h 

asm/errno.h 

ECHILD

errno.h

sys/errno.h 

asm/errno.h 

ECHO

termios.h

sys/ioctl.h termios.h 

asm/termbits.h bits/termios.h 

ECHOE

termios.h

termios.h 

asm/termbits.h bits/termios.h 

ECHOK

termios.h

termios.h 

asm/termbits.h bits/termios.h 

ECHONL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

EDEADLK

errno.h

sys/errno.h 

asm/errno.h 

EDEADLOCK

errno.h

MISSING

asm/errno.h 

EDOM

errno.h

sys/errno.h 

asm/errno.h bits/errno.h 

EEXIST

errno.h

arpa/tftp.h sys/errno.h 

asm/errno.h 

EFAULT

errno.h

sys/errno.h 

asm/errno.h 

EFBIG

errno.h

sys/errno.h 

asm/errno.h 

EIDRM

errno.h

sys/errno.h 

asm/errno.h 

EILSEQ

errno.h

sys/errno.h 

asm/errno.h bits/errno.h 

EINTR

errno.h

sys/errno.h 

asm/errno.h 

EINVAL

errno.h

sys/errno.h sys/mdio.h 

asm/errno.h 

EIO

errno.h

sys/errno.h 

asm/errno.h 

EISDIR

errno.h

sys/errno.h 

asm/errno.h 

EMFILE

errno.h

sys/errno.h 

asm/errno.h 

EMLINK

errno.h

sys/errno.h 

asm/errno.h 

ENAMETOOLONG

errno.h

sys/errno.h 

asm/errno.h 

ENFILE

errno.h

sys/errno.h 

asm/errno.h 

ENODEV

errno.h

sys/errno.h 

asm/errno.h 

ENOENT

errno.h

sys/errno.h 

asm/errno.h 

ENOEXEC

errno.h

sys/errno.h 

asm/errno.h 

ENOLCK

errno.h

sys/errno.h 

asm/errno.h 

ENOMEM

errno.h

sys/errno.h 

asm/errno.h 

ENOMSG

errno.h

sys/errno.h 

asm/errno.h pi-config.h pi-source.h 

ENOSPC

errno.h

sys/errno.h 

asm/errno.h 

ENOSYS

errno.h

sys/errno.h 

asm/errno.h 

ENOTBLK

errno.h

sys/errno.h 

asm/errno.h 

ENOTDIR

errno.h

sys/errno.h 

asm/errno.h 

ENOTEMPTY

errno.h

sys/errno.h 

asm/errno.h 

ENOTTY

errno.h

sys/errno.h 

asm/errno.h 

ENXIO

errno.h

sys/errno.h 

asm/errno.h 

EOF

stdio.h

stdio.h 

libio.h stdio.h 

EPERM

errno.h

sys/errno.h 

asm/errno.h 

EPIPE

errno.h

sys/errno.h 

asm/errno.h 

ERANGE

errno.h

sys/errno.h 

asm/errno.h bits/errno.h 

EREMOTEIO

errno.h

MISSING

asm/errno.h 

EROFS

errno.h

sys/errno.h 

asm/errno.h 

ESPIPE

errno.h

sys/errno.h 

asm/errno.h 

ESRCH

errno.h

sys/errno.h 

asm/errno.h 

ETXTBSY

errno.h

sys/errno.h 

asm/errno.h 

EWOULDBLOCK

errno.h

sys/errno.h 

asm/errno.h 

EXDEV

errno.h

sys/errno.h 

asm/errno.h 

EXIT_FAILURE

stdlib.h

stdlib.h 

kpathsea/c-std.h stdlib.h 

EXIT_SUCCESS

stdlib.h

stdlib.h 

kpathsea/c-std.h stdlib.h 

FD_CLOEXEC

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

FLT_DIG

limits.h

float.h sys/limits.h 

MISSING

FLT_MAX

limits.h

float.h sys/limits.h 

kpathsea/c-minmax.h 

FLT_MIN

limits.h

float.h sys/limits.h 

kpathsea/c-minmax.h 

FOPEN_MAX

stdio.h

stdio.h 

bits/stdio_lim.h 

F_DUPFD

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_GETFD

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_GETFL

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_GETLK

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_LOCK

unistd.h

sys/lockf.h 

fcntl.h unistd.h 

F_OK

unistd.h

sys/access.h 

fcntl.h kpathsea/c-unistd.h unistd.h

F_RDLCK

fcntl.h

sys/flock.h 

asm/fcntl.h bits/fcntl.h 

F_SETFD

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_SETFL

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_SETLK

fcntl.h

fcntl.h

asm/fcntl.h bits/fcntl.h 

F_SETLKW

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

F_TEST

unistd.h

sys/lockf.h 

fcntl.h unistd.h 

F_TLOCK

unistd.h

sys/lockf.h 

fcntl.h unistd.h 

F_ULOCK

unistd.h

sys/lockf.h 

fcntl.h unistd.h 

F_UNLCK

fcntl.h

sys/flock.h 

asm/fcntl.h bits/fcntl.h 

F_WRLCK

fcntl.h

sys/flock.h 

asm/fcntl.h bits/fcntl.h 

HUPCL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

ICANON

termios.h

termios.h 

asm/termbits.h bits/termios.h 

ICRNL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IEXTEN

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IGNBRK

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IGNCR

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IGNPAR

termios.h

termios.h 

asm/termbits.h bits/termios.h 

INLCR

termios.h

termios.h 

asm/termbits.h bits/termios.h 

INPCK

termios.h

termios.h 

asm/termbits.h bits/termios.h 

INT_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

INT_MIN

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

ISIG

termios.h

termios.h 

asm/termbits.h bits/termios.h 

ISTRIP

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IXOFF

termios.h

termios.h 

asm/termbits.h bits/termios.h 

IXON

termios.h

termios.h

asm/termbits.h bits/termios.h

LONG_BIT

limits.h

sys/limits.h 

MISSING

LONG_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

LONG_MIN

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

L_INCR

unistd.h

sys/file.h 

sys/file.h unistd.h 

L_SET

unistd.h

sys/file.h 

sys/file.h unistd.h 

L_XTND

unistd.h

sys/file.h 

sys/file.h unistd.h 

L_ctermid

stdio.h

stdio.h 

bits/stdio_lim.h 

L_cuserid

stdio.h

stdio.h 

bits/stdio_lim.h 

L_tmpnam

stdio.h

stdio.h 

bits/stdio_lim.h 

MB_LEN_MAX

limits.h

sys/limits.h 

limits.h 

NCCS

termios.h

termios.h 

asm/termbits.h bits/termios.h 

NL_ARGMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NL_LANGMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NL_MSGMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NL_NMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NL_SETMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NL_TEXTMAX

limits.h

sys/limits.h 

bits/xopen_lim.h 

NOFLSH

termios.h

sys/ioctl.h termios.h 

asm/termbits.h bits/termios.h 

NZERO

limits.h

sys/limits.h 

bits/xopen_lim.h 

OPOST

termios.h

termios.h 

asm/termbits.h bits/termios.h

O_ACCMODE

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

O_APPEND

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_ASYNC

fcntl.h

MISSING

bits/fcntl.h 

O_CREAT

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_EXCL

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_FSYNC

fcntl.h

MISSING

bits/fcntl.h 

O_NDELAY

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

O_NOCTTY

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

O_NONBLOCK

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

O_RDONLY

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_RDWR

fcntl.h

fcntl.h

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_SYNC

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h 

O_TRUNC

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

O_WRONLY

fcntl.h

fcntl.h 

asm/fcntl.h bits/fcntl.h kpathsea/win32lib.h 

PARENB

termios.h

termios.h 

asm/termbits.h bits/termios.h 

PARMRK

termios.h

termios.h 

asm/termbits.h bits/termios.h

PARODD

termios.h

termios.h 

asm/termbits.h bits/termios.h 

P_tmpdir

stdio.h

stdio.h 

stdio.h 

RAND_MAX

stdlib.h

stdlib.h 

stdlib.h 

R_OK

unistd.h

sys/access.h 

fcntl.h kpathsea/c-unistd.h unistd.h 

SA_NOCLDSTOP

signal.h

sys/signal.h 

asm/signal.h bits/sigaction.h 

SCHAR_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

SCHAR_MIN

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

SEEK_CUR

unistd.h

stdio.h unistd.h 

fcntl.h kpathsea/c-unistd.h stdio.h unistd.h zconf.h 

SEEK_END

unistd.h

stdio.h unistd.h 

fcntl.h kpathsea/c-unistd.h stdio.h unistd.h zconf.h 

SEEK_SET

unistd.h

stdio.h unistd.h 

fcntl.h kpathsea/c-unistd.h stdio.h unistd.h zconf.h 

SHRT_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

SHRT_MIN

limits.h

sys/limits.h

kpathsea/c-minmax.h limits.h 

SIGABRT

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGALRM

signal.h

sys/signal.h 

asm/signal.h bits/signum.h pi-source.h 

SIGBUS

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGCHLD

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGCLD

signal.h

sys/signal.h

bits/signum.h 

SIGCONT

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGFPE

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGHUP

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGILL

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGINT

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGIO

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGIOT

signal.h

sys/signal.h 

asm/signal.h bits/signum.h

SIGKILL

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGPIPE

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGPOLL

signal.h

sys/signal.h sys/stropts.h 

asm/signal.h bits/signum.h 

SIGPROF

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGPWR

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGQUIT

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGSEGV

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGSTKFLT

signal.h

MISSING

asm/signal.h bits/signum.h 

SIGSTOP

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGTERM

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGTRAP

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGTSTP

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGTTIN

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGTTOU

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGUNUSED

signal.h

MISSING

asm/signal.h bits/signum.h 

SIGURG

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGUSR1

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGUSR2

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGVTALRM

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGWINCH

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGXCPU

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIGXFSZ

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIG_BLOCK

signal.h

sys/signal.h 

asm/signal.h bits/sigaction.h 

SIG_DFL

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIG_ERR

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIG_IGN

signal.h

sys/signal.h 

asm/signal.h bits/signum.h 

SIG_SETMASK

signal.h

sys/signal.h 

asm/signal.h bits/sigaction.h 

SIG_UNBLOCK

signal.h

sys/signal.h 

asm/signal.h bits/sigaction.h 

SSIZE_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h

STDERR_FILENO

unistd.h

unistd.h 

kpathsea/c-unistd.h unistd.h 

STDIN_FILENO

unistd.h

unistd.h 

kpathsea/c-unistd.h unistd.h 

STDOUT_FILENO

unistd.h

unistd.h 

kpathsea/c-unistd.h unistd.h 

S_IFBLK

strings.h

sys/mode.h 

sys/stat.h 

S_IFCHR

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IFDIR

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IFIFO

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IFMT

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IFREG

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IRGRP

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IROTH

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IRUSR

strings.h

sys/mode.h

kpathsea/win32lib.h sys/stat.h 

S_IRWXG

strings.h

sys/mode.h 

sys/stat.h 

S_IRWXO

strings.h

sys/mode.h 

sys/stat.h 

S_IRWXU

strings.h

sys/mode.h 

sys/stat.h 

S_ISBLK

strings.h

sys/mode.h 

kpathsea/c-stat.h kpathsea/win32lib.h sys/stat.h 

S_ISCHR

strings.h

sys/mode.h 

kpathsea/c-stat.h kpathsea/win32lib.h sys/stat.h 

S_ISDIR

strings.h

isode/sys.dirent.h sys/mode.h 

kpathsea/c-stat.h kpathsea/win32lib.h sys/stat.h 

S_ISFIFO

strings.h

sys/mode.h 

kpathsea/c-stat.h kpathsea/win32lib.h sys/stat.h 

S_ISGID

strings.h

sys/mode.h 

sys/stat.h 

S_ISREG

strings.h

sys/mode.h 

kpathsea/c-stat.h kpathsea/win32lib.h sys/stat.h 

S_ISUID

strings.h

sys/mode.h 

sys/stat.h 

S_IWGRP

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IWOTH

strings.h

sys/mode.h

kpathsea/win32lib.h sys/stat.h 

S_IWUSR

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IXGRP

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

S_IXOTH

strings.h

sys/mode.h

kpathsea/win32lib.h sys/stat.h 

S_IXUSR

strings.h

sys/mode.h 

kpathsea/win32lib.h sys/stat.h 

TCIFLUSH

termios.h

termios.h 

asm/termbits.h bits/termios.h term.h 

TCIOFF

termios.h

termios.h 

asm/termbits.h bits/termios.h 

TCIOFLUSH

termios.h

termios.h 

asm/termbits.h bits/termios.h term.h 

TCION

termios.h

termios.h 

asm/termbits.h bits/termios.h 

TCOFLUSH

termios.h

termios.h

asm/termbits.h bits/termios.h term.h 

TCOOFF

termios.h

termios.h 

asm/termbits.h bits/termios.h 

TCOON

termios.h

termios.h 

asm/termbits.h bits/termios.h 

TCSADRAIN

termios.h

termios.h 

asm/termbits.h bits/termios.h term.h 

TCSAFLUSH

termios.h

termios.h 

asm/termbits.h bits/termios.h term.h 

TCSANOW

termios.h

termios.h 

asm/termbits.h bits/termios.h term.h 

TMP_MAX

stdio.h

stdio.h sys/limits.h 

bits/stdio_lim.h 

TOSTOP

termios.h

sys/ioctl.h termios.h 

asm/termbits.h bits/termios.h 

UCHAR_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

UINT_MAX

limits.h

sys/limits.h

kpathsea/c-minmax.h limits.h 

ULONG_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

UL_GETFSIZE

ulimit.h

ulimit.h 

ulimit.h 

UL_SETFSIZE

ulimit.h

ulimit.h 

ulimit.h

USHRT_MAX

limits.h

sys/limits.h 

kpathsea/c-minmax.h limits.h 

VEOF

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VEOL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VERASE

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VINTR

termios.h

sys/deviceq.h termios.h 

asm/termbits.h bits/termios.h 

VKILL

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VMIN

termios.h

sys/vminfo.h termios.h 

asm/termbits.h bits/termios.h 

VQUIT

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VSTART

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VSTOP

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VSUSP

termios.h

termios.h 

asm/termbits.h bits/termios.h 

VTIME

termios.h

termios.h 

asm/termbits.h bits/termios.h sys/vtimes.h 

WORD_BIT

limits.h

sys/limits.h 

MISSING

W_OK

unistd.h

sys/access.h 

fcntl.h kpathsea/c-unistd.h unistd.h 

X_OK

unistd.h

sys/access.h

fcntl.h kpathsea/c-unistd.h unistd.h 

_BSD_SOURCE

unistd.h

MISSING

features.h pngconf.h

_IOFBF

stdio.h

stdio.h 

stdio.h 

_IOLBF

stdio.h

stdio.h 

stdio.h 

_IONBF

stdio.h

stdio.h 

stdio.h 

_NSIG

signal.h

MISSING

asm/signal.h bits/signum.h 

_PC_CHOWN_RESTRICTED

unistd.h

unistd.h 

bits/confname.h 

_PC_LINK_MAX

unistd.h

unistd.h 

bits/confname.h 

_PC_MAX_CANON

unistd.h

unistd.h

bits/confname.h

_PC_MAX_INPUT

unistd.h

unistd.h 

bits/confname.h 

_PC_NAME_MAX

unistd.h

unistd.h 

bits/confname.h 

_PC_NO_TRUNC

unistd.h

unistd.h 

bits/confname.h 

_PC_PATH_MAX

unistd.h

unistd.h 

bits/confname.h 

_PC_PIPE_BUF

unistd.h

unistd.h 

bits/confname.h 

_PC_VDISABLE

unistd.h

unistd.h 

bits/confname.h 

_POSIX2_C_BIND

unistd.h

unistd.h 

unistd.h 

_POSIX2_C_VERSION

unistd.h

unistd.h 

unistd.h 

_POSIX2_LOCALEDEF

unistd.h

unistd.h 

unistd.h 

_POSIX_ARG_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_CHILD_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_CHOWN_RESTRICTED

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_C_SOURCE

unistd.h

MISSING

features.h 

_POSIX_JOB_CONTROL

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_LINK_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_MAX_CANON

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_MAX_INPUT

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_NAME_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h kpathsea/c-namemx.h 

_POSIX_NGROUPS_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_NO_TRUNC

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_OPEN_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_PATH_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h kpathsea/c-pathmx.h 

_POSIX_PIPE_BUF

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_REENTRANT_FUNCTIONS

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_SAVED_IDS

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_SOURCE

unistd.h

standards.h 

features.h 

_POSIX_SSIZE_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_STREAM_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h

_POSIX_THREADS

unistd.h

nsl/thread.h unistd.h 

bits/posix_opt.h 

_POSIX_THREAD_PRIORITY_SCHEDULING

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_THREAD_SAFE_FUNCTIONS

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_TZNAME_MAX

limits.h

sys/limits.h 

bits/posix1_lim.h 

_POSIX_VDISABLE

unistd.h

unistd.h 

bits/posix_opt.h 

_POSIX_VERSION

unistd.h

unistd.h 

unistd.h 

_SC_ARG_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_CHILD_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_CLK_TCK

unistd.h

unistd.h 

bits/confname.h 

_SC_JOB_CONTROL

unistd.h

unistd.h 

bits/confname.h 

_SC_NGROUPS_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_OPEN_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_SAVED_IDS

unistd.h

unistd.h 

bits/confname.h 

_SC_STREAM_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_TZNAME_MAX

unistd.h

unistd.h 

bits/confname.h 

_SC_VERSION

unistd.h

unistd.h 

bits/confname.h 

_SVID_SOURCE

unistd.h

MISSING

features.h 

_XOPEN_CRYPT

unistd.h

unistd.h

unistd.h 

_XOPEN_ENH_I18N

unistd.h

unistd.h 

unistd.h 

_XOPEN_SOURCE

unistd.h

standards.h

features.h 

_XOPEN_SOURCE_EXTENDED

unistd.h

standards.h 

features.h 

_XOPEN_UNIX

unistd.h

unistd.h 

unistd.h 

_XOPEN_VERSION

unistd.h

unistd.h 

unistd.h 

_XOPEN_XCU_VERSION

unistd.h

unistd.h 

unistd.h 

_XOPEN_XPG2

unistd.h

MISSING

unistd.h 

_XOPEN_XPG3

unistd.h

unistd.h 

unistd.h 

_XOPEN_XPG4

unistd.h

unistd.h 

unistd.h 

__GLIBC_MINOR__

unistd.h

MISSING

features.h 

__GLIBC__

unistd.h

MISSING

features.h 

__GNU_LIBRARY__

unistd.h

MISSING

features.h 

__USE_ANSI

unistd.h

MISSING

features.h 

__USE_BSD

unistd.h

MISSING

features.h 

__USE_GNU

unistd.h

MISSING

features.h libintl.h 

__USE_MISC

unistd.h

MISSING

features.h 

__USE_POSIX

unistd.h

MISSING

features.h 

__USE_POSIX199309

unistd.h

MISSING

features.h 

__USE_POSIX2

unistd.h

MISSING

features.h 

__USE_REENTRANT

unistd.h

MISSING

features.h 

__USE_SVID

unistd.h

MISSING

features.h 

__USE_XOPEN

unistd.h

MISSING

features.h 

__USE_XOPEN_EXTENDED

unistd.h

MISSING

features.h 

End of Document