Name patterns reserved by each standard header file

The C and POSIX standards define conventions for the names used by each header file. New user-namespace names can be added to each header file without breaking compliance if they conform to one of the conventional patterns for that header.

The list below was formerly the file NAMESPACE in the source tree. It has not been updated since 2000, and should be carefully checked before doing anything with the information. Ultimately, it would be good to have this in the manual.

Header          Prefix                                  Suffix

aio.h           aio_, lio_, AIO_, LIO_
complex.h       cerf{,f,l}, cerfc{,f,l}, cexp2{,f,l},
                cexpm1{,f,l}, clog10{,f,l}, clog1p{,f,l},
                clog2{,f,l}, clgamma{,f,l}, ctgamma{,f,l}
ctype.h         is[a-z], to[a-z]
dirent.h        d_
dlfcn.h         RTLD_
errno.h         E
fcntl.h         l_, F_, O_, S_
fmtmsg.h        MM_
fnmatch.h       FNM_
ftw.h           FTW
glob.h          gl_, GLOB_
grp.h           gr_
inttypes.h      PRI[a-zX], SCN[a-zX]
limits.h                                                _MAX
locale.h        LC_[A-Z]
mqueue.h        mq_, MQ_
ndbm.h          dbm_, DBM_
nl_types.h      NL_
poll.h          pd_, ph_, ps_, POLL
pthread.h       pthread_, PTHREAD_
pwd.h           pw_
regex.h         re_, rm_, REG_
sched.h         sched_, SCHED_
semaphore.h     sem_, SEM_
signal.h        sa_, uc_, SIG[A-Z], SIG_[A-Z], SIG_[0-9a-z_]
                ss_, sv_
                si_, SI_, sigev_, SIGEV_, sival_, SA_,
                BUS_, CLD_, FPE_, ILL_, POLL_, SEGV_, SS_, SV_, TRAP_
stdint.h        int*_t, uint*_t, INT*_MAX, INT*_MIN,
                INT*_C, UINT*_MAX, UINT*_MIN, UINT*_C
stdlib.h        str[a-z]
string.h        str[a-z], wcs[a-z]
stropts.h       bi_, ic_, l_, sl_, str_,
                FLUSH[A-Z], I_, M_, MUXID_R[A-Z], S_, SND[A-Z], STR
syslog.h        LOG_
sys/ipc.h       ipc_, IPC_
sys/mman.h      shm_, MAP_, MCL_, MS_, PROT_
sys/msg.h       msg, MSG[A-Z], MSG_[A-Z]
sys/resource.h  rlim_, ru_, PRIO_, RLIM_, RLIMIT_, RUSAGE_
sys/sem.h       sem, SEM_
sys/shm.h       shm, SHM[A-Z], SHM_[A-Z]
sys/socket.h    AF_, MSG_, PF_, SO
sys/stat.h      st_, S_
sys/statvfs.h   f_, ST_
sys/time.h      fds_, it_, tv_, FD_, ITIMER_
sys/times.h     tms_
sys/uio.h       iov_, IOV_
sys/utsname.h   uts_
sys/wait.h      si_, W[A-Z], P_,
                BUS_, CLD_, FPE_, ILL_, POLL_, SEGV_, SI_, TRAP_
termios.h       c_, V, I, O, TC, B[0-9]
time.h          tm_
                clock_, timer_, it_, tv_,
                CLOCK_, TIMER_
ucontext.h      uc_, SS_
ulimit.h        UL_
utime.h         utim_
utmpx.h         ut_                                     _LVL, _TIME, _PROCESS
wchar.h         wcs[a-z]
wctype.h        is[a-z], to[a-z]
wordexp.h       we_, WRDE_
ANY header                                              _t

None: ReservedNamePatterns (last edited 2017-08-06 16:06:49 by ZackWeinberg)