gettextize
and autopoint
usersFD_CLR
FD_ISSET
FD_SET
FD_ZERO
_Exit
_exit
_longjmp
_setjmp
_tolower
_toupper
a64l
abort
abs
accept
access
acos
acosf
acosh
acoshf
acoshl
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
alarm
aligned_alloc
alphasort
asctime
asctime_r
asin
asinf
asinh
asinhf
asinhl
asinl
assert
atan
atan2
atan2f
atan2l
atanf
atanh
atanhf
atanhl
atanl
atexit
atof
atoi
atol
atoll
basename
bind
bsearch
btowc
c16rtomb
c32rtomb
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
calloc
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
catclose
catgets
catopen
cbrt
cbrtf
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
ceil
ceilf
ceill
cexp
cexpf
cexpl
cfgetispeed
cfgetospeed
cfsetispeed
cfsetospeed
chdir
chmod
chown
cimag
cimagf
cimagl
clearerr
clock
clock_getcpuclockid
clock_getres
clock_gettime
clock_nanosleep
clock_settime
clog
clogf
clogl
close
closedir
closelog
confstr
conj
conjf
conjl
connect
copysign
copysignf
copysignl
cos
cosf
cosh
coshf
coshl
cosl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
creat
crypt
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
ctermid
ctime
ctime_r
daylight
dbm_clearerr
dbm_close
dbm_delete
dbm_error
dbm_fetch
dbm_firstkey
dbm_nextkey
dbm_open
dbm_store
difftime
dirfd
dirname
div
dlclose
dlerror
dlopen
dlsym
dprintf
drand48
dup
dup2
duplocale
encrypt
endgrent
endhostent
endnetent
endprotoent
endpwent
endservent
endutxent
environ
erand48
erf
erfc
erfcf
erfcl
erff
erfl
errno
execl
execle
execlp
execv
execve
execvp
exit
exp
exp2
exp2f
exp2l
expf
expl
expm1
expm1f
expm1l
fabs
fabsf
fabsl
faccessat
fattach
fchdir
fchmod
fchmodat
fchown
fchownat
fclose
fcntl
fdatasync
fdetach
fdim
fdimf
fdiml
fdopen
fdopendir
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feof
feraiseexcept
ferror
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fexecve
fflush
ffs
fgetc
fgetpos
fgets
fgetwc
fgetws
fileno
flockfile
floor
floorf
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmemopen
fmin
fminf
fminl
fmod
fmodf
fmodl
fmtmsg
fnmatch
fopen
fork
fpathconf
fpclassify
fprintf
fputc
fputs
fputwc
fputws
fread
free
freeaddrinfo
freelocale
freopen
frexp
frexpf
frexpl
fscanf
fseek
fseeko
fsetpos
fstat
fstatat
fstatvfs
fsync
ftell
ftello
ftok
ftruncate
ftrylockfile
ftw
funlockfile
futimens
fwide
fwprintf
fwrite
fwscanf
gai_strerror
getaddrinfo
getc
getc_unlocked
getchar
getchar_unlocked
getcwd
getdate
getdate_err
getdelim
getegid
getenv
geteuid
getgid
getgrent
getgrgid
getgrgid_r
getgrnam
getgrnam_r
getgroups
gethostent
gethostid
gethostname
getitimer
getline
getlogin
getlogin_r
getmsg
getnameinfo
getnetbyaddr
getnetbyname
getnetent
getopt
getpeername
getpgid
getpgrp
getpid
getpmsg
getppid
getpriority
getprotobyname
getprotobynumber
getprotoent
getpwent
getpwnam
getpwnam_r
getpwuid
getpwuid_r
getrlimit
getrusage
gets
getservbyname
getservbyport
getservent
getsid
getsockname
getsockopt
getsubopt
gettimeofday
getuid
getutxent
getutxid
getutxline
getwc
getwchar
glob
globfree
gmtime
gmtime_r
grantpt
hcreate
hdestroy
hsearch
htonl
htons
hypot
hypotf
hypotl
iconv
iconv_close
iconv_open
if_freenameindex
if_indextoname
if_nameindex
if_nametoindex
ilogb
ilogbf
ilogbl
imaxabs
imaxdiv
inet_addr
inet_ntoa
inet_ntop
inet_pton
initstate
insque
ioctl
isalnum
isalnum_l
isalpha
isalpha_l
isascii
isastream
isatty
isblank
isblank_l
iscntrl
iscntrl_l
isdigit
isdigit_l
isfinite
isgraph
isgraph_l
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
islower
islower_l
isnan
isnormal
isprint
isprint_l
ispunct
ispunct_l
isspace
isspace_l
isunordered
isupper
isupper_l
iswalnum
iswalnum_l
iswalpha
iswalpha_l
iswblank
iswblank_l
iswcntrl
iswcntrl_l
iswctype
iswctype_l
iswdigit
iswdigit_l
iswgraph
iswgraph_l
iswlower
iswlower_l
iswprint
iswprint_l
iswpunct
iswpunct_l
iswspace
iswspace_l
iswupper
iswupper_l
iswxdigit
iswxdigit_l
isxdigit
isxdigit_l
j0
j1
jn
jrand48
kill
killpg
l64a
labs
lchown
lcong48
ldexp
ldexpf
ldexpl
ldiv
lfind
lgamma
lgammaf
lgammal
link
linkat
lio_listio
listen
llabs
lldiv
llrint
llrintf
llrintl
llround
llroundf
llroundl
localeconv
localtime
localtime_r
lockf
log
log10
log10f
log10l
log1p
log1pf
log1pl
log2
log2f
log2l
logb
logbf
logbl
logf
logl
longjmp
lrand48
lrint
lrintf
lrintl
lround
lroundf
lroundl
lsearch
lseek
lstat
malloc
mblen
mbrlen
mbrtoc16
mbrtoc32
mbrtowc
mbsinit
mbsnrtowcs
mbsrtowcs
mbstowcs
mbtowc
memccpy
memchr
memcmp
memcpy
memmove
memset
mkdir
mkdirat
mkdtemp
mkfifo
mkfifoat
mknod
mknodat
mkstemp
mktime
mlock
mlockall
mmap
modf
modff
modfl
mprotect
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
mrand48
msgctl
msgget
msgrcv
msgsnd
msync
munlock
munlockall
munmap
nan
nanf
nanl
nanosleep
nearbyint
nearbyintf
nearbyintl
newlocale
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
nftw
nice
nl_langinfo
nl_langinfo_l
nrand48
ntohl
ntohs
open
openat
opendir
openlog
open_memstream
open_wmemstream
optarg
opterr
optind
optopt
pathconf
pause
pclose
perror
pipe
poll
popen
posix_fadvise
posix_fallocate
posix_madvise
posix_mem_offset
posix_memalign
posix_openpt
posix_spawn
posix_spawn_file_actions_addclose
posix_spawn_file_actions_adddup2
posix_spawn_file_actions_addopen
posix_spawn_file_actions_destroy
posix_spawn_file_actions_init
posix_spawnattr_destroy
posix_spawnattr_getflags
posix_spawnattr_getpgroup
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_getsigdefault
posix_spawnattr_getsigmask
posix_spawnattr_init
posix_spawnattr_setflags
posix_spawnattr_setpgroup
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_spawnattr_setsigdefault
posix_spawnattr_setsigmask
posix_spawnp
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getcreatetime
posix_trace_attr_getgenversion
posix_trace_attr_getinherited
posix_trace_attr_getlogfullpolicy
posix_trace_attr_getlogsize
posix_trace_attr_getmaxdatasize
posix_trace_attr_getmaxsystemeventsize
posix_trace_attr_getmaxusereventsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogfullpolicy
posix_trace_attr_setlogsize
posix_trace_attr_setmaxdatasize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_create_withlog
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_get_name
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventset_del
posix_trace_eventset_empty
posix_trace_eventset_fill
posix_trace_eventset_ismember
posix_trace_eventtypelist_getnext_id
posix_trace_eventtypelist_rewind
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_get_status
posix_trace_getnext_event
posix_trace_open
posix_trace_rewind
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_stop
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
pow
powf
powl
pread
printf
pselect
psiginfo
psignal
pthread_atfork
pthread_attr_destroy
pthread_attr_getdetachstate
pthread_attr_getguardsize
pthread_attr_getinheritsched
pthread_attr_getschedparam
pthread_attr_getschedpolicy
pthread_attr_getscope
pthread_attr_getstack
pthread_attr_getstacksize
pthread_attr_init
pthread_attr_setdetachstate
pthread_attr_setguardsize
pthread_attr_setinheritsched
pthread_attr_setschedparam
pthread_attr_setschedpolicy
pthread_attr_setscope
pthread_attr_setstack
pthread_attr_setstacksize
pthread_barrier_destroy
pthread_barrier_init
pthread_barrier_wait
pthread_barrierattr_destroy
pthread_barrierattr_getpshared
pthread_barrierattr_init
pthread_barrierattr_setpshared
pthread_cancel
pthread_cleanup_pop
pthread_cleanup_push
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_timedwait
pthread_cond_wait
pthread_condattr_destroy
pthread_condattr_getclock
pthread_condattr_getpshared
pthread_condattr_init
pthread_condattr_setclock
pthread_condattr_setpshared
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_getspecific
pthread_join
pthread_key_create
pthread_key_delete
pthread_kill
pthread_mutex_consistent
pthread_mutex_destroy
pthread_mutex_getprioceiling
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_setprioceiling
pthread_mutex_timedlock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_mutexattr_destroy
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_getpshared
pthread_mutexattr_getrobust
pthread_mutexattr_gettype
pthread_mutexattr_init
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutexattr_setpshared
pthread_mutexattr_setrobust
pthread_mutexattr_settype
pthread_once
pthread_rwlock_destroy
pthread_rwlock_init
pthread_rwlock_rdlock
pthread_rwlock_timedrdlock
pthread_rwlock_timedwrlock
pthread_rwlock_tryrdlock
pthread_rwlock_trywrlock
pthread_rwlock_unlock
pthread_rwlock_wrlock
pthread_rwlockattr_destroy
pthread_rwlockattr_getpshared
pthread_rwlockattr_init
pthread_rwlockattr_setpshared
pthread_self
pthread_setcancelstate
pthread_setcanceltype
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
pthread_setspecific
pthread_sigmask
pthread_spin_destroy
pthread_spin_init
pthread_spin_lock
pthread_spin_trylock
pthread_spin_unlock
pthread_testcancel
ptsname
putc
putc_unlocked
putchar
putchar_unlocked
putenv
putmsg
putpmsg
puts
pututxline
putwc
putwchar
pwrite
qsort
quick_exit
raise
rand
rand_r
random
read
readdir
readdir_r
readlink
readlinkat
readv
realloc
realpath
recv
recvfrom
recvmsg
regcomp
regerror
regexec
regfree
remainder
remainderf
remainderl
remove
remque
remquo
remquof
remquol
rename
renameat
rewind
rewinddir
rint
rintf
rintl
rmdir
round
roundf
roundl
scalbln
scalblnf
scalblnl
scalbn
scalbnf
scalbnl
scandir
scanf
sched_get_priority_max
sched_get_priority_min
sched_getparam
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
sched_yield
seed48
seekdir
select
sem_close
sem_destroy
sem_getvalue
sem_init
sem_open
sem_post
sem_timedwait
sem_trywait
sem_unlink
sem_wait
semctl
semget
semop
send
sendmsg
sendto
setbuf
setegid
setenv
seteuid
setgid
setgrent
sethostent
setitimer
setjmp
setkey
setlocale
setlogmask
setnetent
setpgid
setpgrp
setpriority
setprotoent
setpwent
setregid
setreuid
setrlimit
setservent
setsid
setsockopt
setstate
setuid
setutxent
setvbuf
shm_open
shm_unlink
shmat
shmctl
shmdt
shmget
shutdown
sigaction
sigaddset
sigaltstack
sigdelset
sigemptyset
sigfillset
sighold
sigignore
siginterrupt
sigismember
siglongjmp
signal
signbit
signgam
sigpause
sigpending
sigprocmask
sigqueue
sigrelse
sigset
sigsetjmp
sigsuspend
sigtimedwait
sigwait
sigwaitinfo
sin
sinf
sinh
sinhf
sinhl
sinl
sleep
snprintf
sockatmark
socket
socketpair
sprintf
sqrt
sqrtf
sqrtl
srand
srand48
srandom
sscanf
stat
statvfs
stderr
stdin
stdout
stpcpy
stpncpy
strcasecmp
strcasecmp_l
strcat
strchr
strcmp
strcoll
strcoll_l
strcpy
strcspn
strdup
strerror
strerror_l
strerror_r
strfmon
strfmon_l
strftime
strftime_l
strlen
strncasecmp
strncasecmp_l
strncat
strncmp
strncpy
strndup
strnlen
strpbrk
strptime
strrchr
strsignal
strspn
strstr
strtod
strtof
strtoimax
strtok
strtok_r
strtol
strtold
strtoll
strtoul
strtoull
strtoumax
strxfrm
strxfrm_l
swab
swprintf
swscanf
symlink
symlinkat
sync
sysconf
syslog
system
tan
tanf
tanh
tanhf
tanhl
tanl
tcdrain
tcflow
tcflush
tcgetattr
tcgetpgrp
tcgetsid
tcsendbreak
tcsetattr
tcsetpgrp
tdelete
telldir
tempnam
tfind
tgamma
tgammaf
tgammal
time
timer_create
timer_delete
timer_getoverrun
timer_gettime
timer_settime
times
timezone
tmpfile
tmpnam
toascii
tolower
tolower_l
toupper
toupper_l
towctrans
towctrans_l
towlower
towlower_l
towupper
towupper_l
trunc
truncate
truncf
truncl
tsearch
ttyname
ttyname_r
twalk
tzname
tzset
ulimit
umask
uname
ungetc
ungetwc
unlink
unlinkat
unlockpt
unsetenv
uselocale
utime
utimensat
utimes
va_arg
va_copy
va_end
va_start
vdprintf
vfprintf
vfscanf
vfwprintf
vfwscanf
vprintf
vscanf
vsnprintf
vsprintf
vsscanf
vswprintf
vswscanf
vwprintf
vwscanf
wait
waitid
waitpid
wcpcpy
wcpncpy
wcrtomb
wcscasecmp
wcscasecmp_l
wcscat
wcschr
wcscmp
wcscoll
wcscoll_l
wcscpy
wcscspn
wcsdup
wcsftime
wcslen
wcsncasecmp
wcsncasecmp_l
wcsncat
wcsncmp
wcsncpy
wcsnlen
wcsnrtombs
wcspbrk
wcsrchr
wcsrtombs
wcsspn
wcsstr
wcstod
wcstof
wcstoimax
wcstok
wcstol
wcstold
wcstoll
wcstombs
wcstoul
wcstoull
wcstoumax
wcswidth
wcsxfrm
wcsxfrm_l
wctob
wctomb
wctrans
wctrans_l
wctype
wctype_l
wcwidth
wmemchr
wmemcmp
wmemcpy
wmemmove
wmemset
wordexp
wordfree
wprintf
write
writev
wscanf
y0
y1
yn
bcmp
bcopy
bsd_signal
bzero
ecvt
fcvt
ftime
gcvt
getcontext
gethostbyaddr
gethostbyname
getwd
h_errno
index
makecontext
mktemp
pthread_attr_getstackaddr
pthread_attr_setstackaddr
rindex
scalb
setcontext
swapcontext
ualarm
usleep
vfork
wcswcs
<aio.h>
<aliases.h>
<argp.h>
<argz.h>
<arpa/inet.h>
<byteswap.h>
<complex.h>
<crypt.h>
<ctype.h>
<dirent.h>
<dlfcn.h>
<envz.h>
<err.h>
<errno.h>
<error.h>
<execinfo.h>
<fcntl.h>
<fenv.h>
<fmtmsg.h>
<fstab.h>
<fts.h>
<getopt.h>
<glob.h>
<gnu/libc-version.h>
<grp.h>
<gshadow.h>
<ifaddrs.h>
<libintl.h>
<link.h>
<malloc.h>
<math.h>
drem
dremf
dreml
exp10
exp10f
exp10l
finite
finitef
finitel
gamma
gammaf
gammal
isinff
isinfl
isnanf
isnanl
j0f
j0l
j1f
j1l
jnf
jnl
lgamma_r
lgammaf_r
lgammal_r
matherr
pow10
pow10f
pow10l
scalbf
scalbl
significand
significandf
significandl
sincos
sincosf
sincosl
y0f
y0l
y1f
y1l
ynf
ynl
<mcheck.h>
<mntent.h>
<netdb.h>
endnetgrent
gethostbyaddr_r
gethostbyname2
gethostbyname2_r
gethostbyname_r
gethostent_r
getnetbyaddr_r
getnetbyname_r
getnetent_r
getnetgrent
getnetgrent_r
getprotobyname_r
getprotobynumber_r
getprotoent_r
getservbyname_r
getservbyport_r
getservent_r
herror
hstrerror
innetgr
rcmd
rcmd_af
rexec
rexec_af
rresvport
rresvport_af
ruserok
ruserok_af
setnetgrent
<netinet/ether.h>
<netinet/in.h>
bindresvport
getipv4sourcefilter
getsourcefilter
in6addr_any
in6addr_loopback
inet6_option_alloc
inet6_option_append
inet6_option_find
inet6_option_init
inet6_option_next
inet6_option_space
inet6_opt_append
inet6_opt_find
inet6_opt_finish
inet6_opt_get_val
inet6_opt_init
inet6_opt_next
inet6_opt_set_val
inet6_rth_add
inet6_rth_getaddr
inet6_rth_init
inet6_rth_reverse
inet6_rth_segments
inet6_rth_space
setipv4sourcefilter
setsourcefilter
<obstack.h>
<printf.h>
<pthread.h>
pthread_attr_getaffinity_np
pthread_attr_setaffinity_np
pthread_getaffinity_np
pthread_getattr_np
pthread_getname_np
pthread_kill_other_threads_np
pthread_mutex_consistent_np
pthread_mutexattr_getrobust_np
pthread_mutexattr_setrobust_np
pthread_rwlockattr_getkind_np
pthread_rwlockattr_setkind_np
pthread_setaffinity_np
pthread_setname_np
pthread_sigqueue
pthread_timedjoin_np
pthread_tryjoin_np
pthread_yield
<pty.h>
<pwd.h>
<regex.h>
<regexp.h>
<resolv.h>
<rpc/auth.h>
authdes_create
authdes_pk_create
authnone_create
authunix_create
authunix_create_default
getnetname
host2netname
key_decryptsession
key_decryptsession_pk
key_encryptsession
key_encryptsession_pk
key_gendes
key_get_conv
key_secretkey_is_set
key_setsecret
netname2host
netname2user
user2netname
xdr_des_block
xdr_opaque_auth
<rpc/auth_des.h>
<rpc/auth_unix.h>
<rpc/clnt.h>
callrpc
clnt_create
clnt_pcreateerror
clnt_perrno
clnt_perror
clnt_spcreateerror
clnt_sperrno
clnt_sperror
clntraw_create
clnttcp_create
clntudp_bufcreate
clntudp_create
clntunix_create
get_myaddress
getrpcport
rpc_createerr
<rpc/des_crypt.h>
<rpc/key_prot.h>
<rpc/netdb.h>
<rpc/pmap_clnt.h>
<rpc/pmap_prot.h>
<rpc/pmap_rmt.h>
<rpc/rpc_msg.h>
<rpc/svc.h>
svc_exit
svc_fdset
svc_getreq
svc_getreq_common
svc_getreq_poll
svc_getreqset
svc_max_pollfd
svc_pollfd
svc_register
svc_run
svc_sendreply
svc_unregister
svcerr_auth
svcerr_decode
svcerr_noproc
svcerr_noprog
svcerr_progvers
svcerr_systemerr
svcerr_weakauth
svcraw_create
svctcp_create
svcudp_bufcreate
svcudp_create
svcunix_create
xprt_register
xprt_unregister
<rpc/xdr.h>
xdr_array
xdr_bool
xdr_bytes
xdr_char
xdr_double
xdr_enum
xdr_float
xdr_free
xdr_hyper
xdr_int
xdr_int16_t
xdr_int32_t
xdr_int64_t
xdr_int8_t
xdr_long
xdr_longlong_t
xdr_netobj
xdr_opaque
xdr_pointer
xdr_quad_t
xdr_reference
xdr_short
xdr_sizeof
xdr_string
xdr_u_char
xdr_u_hyper
xdr_u_int
xdr_u_long
xdr_u_longlong_t
xdr_u_quad_t
xdr_u_short
xdr_uint16_t
xdr_uint32_t
xdr_uint64_t
xdr_uint8_t
xdr_union
xdr_vector
xdr_void
xdr_wrapstring
xdrmem_create
xdrrec_create
xdrrec_endofrecord
xdrrec_eof
xdrrec_skiprecord
xdrstdio_create
<rpcsvc/nislib.h>
nis_add
nis_add_entry
nis_addmember
nis_checkpoint
nis_clone_object
nis_creategroup
nis_destroy_object
nis_destroygroup
nis_dir_cmp
nis_domain_of
nis_domain_of_r
nis_first_entry
nis_freenames
nis_freeresult
nis_freeservlist
nis_freetags
nis_getnames
nis_getservlist
nis_ismember
nis_leaf_of
nis_leaf_of_r
nis_lerror
nis_list
nis_local_directory
nis_local_group
nis_local_host
nis_local_principal
nis_lookup
nis_mkdir
nis_modify
nis_modify_entry
nis_name_of
nis_name_of_r
nis_next_entry
nis_perror
nis_ping
nis_print_directory
nis_print_entry
nis_print_group
nis_print_group_entry
nis_print_link
nis_print_object
nis_print_result
nis_print_rights
nis_print_table
nis_remove
nis_remove_entry
nis_removemember
nis_rmdir
nis_servstate
nis_sperrno
nis_sperror
nis_sperror_r
nis_stats
nis_verifygroup
<rpcsvc/nis_callback.h>
<rpcsvc/yp.h>
xdr_domainname
xdr_keydat
xdr_mapname
xdr_peername
xdr_valdat
xdr_ypbind_binding
xdr_ypbind_resp
xdr_ypbind_resptype
xdr_ypbind_setdom
xdr_ypmap_parms
xdr_ypmaplist
xdr_yppush_status
xdr_yppushresp_xfr
xdr_ypreq_key
xdr_ypreq_nokey
xdr_ypreq_xfr
xdr_ypresp_all
xdr_ypresp_key_val
xdr_ypresp_maplist
xdr_ypresp_master
xdr_ypresp_order
xdr_ypresp_val
xdr_ypresp_xfr
xdr_ypstat
xdr_ypxfrstat
<rpcsvc/yp_prot.h>
<rpcsvc/ypclnt.h>
<rpcsvc/ypupd.h>
<sched.h>
<search.h>
<selinux/selinux.h>
<shadow.h>
<signal.h>
<stdio.h>
asprintf
cuserid
clearerr_unlocked
fcloseall
feof_unlocked
ferror_unlocked
fflush_unlocked
fgetc_unlocked
fgets_unlocked
fileno_unlocked
fopencookie
fputc_unlocked
fputs_unlocked
fread_unlocked
fwrite_unlocked
getw
putw
setbuffer
setlinebuf
sys_errlist
sys_nerr
tmpnam_r
vasprintf
<stdlib.h>
canonicalize_file_name
cfree
clearenv
drand48_r
ecvt_r
erand48_r
fcvt_r
getloadavg
getpt
initstate_r
jrand48_r
lcong48_r
lrand48_r
mkostemp
mkostemps
mrand48_r
mkstemps
nrand48_r
on_exit
ptsname_r
qecvt
qecvt_r
qfcvt
qfcvt_r
qgcvt
qsort_r
random_r
rpmatch
secure_getenv
seed48_r
setstate_r
srand48_r
srandom_r
strtod_l
strtof_l
strtol_l
strtold_l
strtoll_l
strtoq
strtoul_l
strtoull_l
strtouq
valloc
<string.h>
<sys/capability.h>
<sys/epoll.h>
<sys/fanotify.h>
<sys/file.h>
<sys/fsuid.h>
<sys/gmon.h>
<sys/io.h>
, <sys/perm.h>
<sys/kdaemon.h>
<sys/klog.h>
<sys/mman.h>
<sys/mount.h>
<sys/personality.h>
<sys/prctl.h>
<sys/profil.h>
<sys/ptrace.h>
<sys/quota.h>
<sys/reboot.h>
<sys/resource.h>
<sys/sem.h>
<sys/sendfile.h>
<sys/socket.h>
<sys/stat.h>
<sys/statfs.h>
<sys/swap.h>
<sys/sysctl.h>
<sys/sysinfo.h>
<sys/syslog.h>
<sys/sysmacros.h>
<sys/time.h>
<sys/timex.h>
<sys/uio.h>
<sys/ustat.h>
<sys/vlimit.h>
<sys/vm86.h>
<sys/vtimes.h>
<sys/wait.h>
<sys/xattr.h>
<termios.h>
<time.h>
<ttyent.h>
<unistd.h>
acct
brk
chroot
daemon
dup3
endusershell
euidaccess
execvpe
get_current_dir_name
getdomainname
getdtablesize
getpagesize
getpass
getresgid
getresuid
getusershell
group_member
pipe2
profil
revoke
sbrk
setlogin
setdomainname
sethostid
sethostname
setresgid
setresuid
setusershell
syncfs
syscall
ttyslot
vhangup
<utmp.h>
<utmpx.h>
<wchar.h>
fgetwc_unlocked
fgetws_unlocked
fputwc_unlocked
fputws_unlocked
getwc_unlocked
getwchar_unlocked
putwc_unlocked
putwchar_unlocked
wcschrnul
wcsftime_l
wcstod_l
wcstof_l
wcstol_l
wcstold_l
wcstoll_l
wcstoq
wcstoul_l
wcstoull_l
wcstouq
wmempcpy
.
)|
or \|
)[
… ]
and [^
… ]
)
(
… )
or \(
… \)
)\b
)\B
)\<
)\>
)\w
)\W
)Next: Brief Overview, Up: (dir) [Contents][Index]
This manual is for GNU Gnulib (updated 2017-05-03 05:43:19), which is a library of common routines intended to be shared at the source level.
Copyright © 2004–2017 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
• Brief Overview: | ||
• Philosophy: | ||
• Invoking gnulib-tool: | ||
• Writing modules: | ||
• Extending Gnulib: | ||
• Miscellaneous Notes: | ||
• POSIX Substitutes Library: | Building as a separate substitutes library. | |
• Header File Substitutes: | Overriding system headers. | |
• Function Substitutes: | Replacing system functions. | |
• Legacy Function Substitutes: | Replacing system functions. | |
• Glibc Header File Substitutes: | Overriding system headers. | |
• Glibc Function Substitutes: | Replacing system functions. | |
• Particular Modules: | Documentation of individual modules. | |
• Regular expressions: | The regex module. | |
• GNU Free Documentation License: | Copying and sharing this manual. | |
• Index: |
Next: Philosophy, Previous: Top, Up: Top [Contents][Index]
Gnulib is a source code library that provides basic functionality to programs and libraries. Many software packages make use of Gnulib to avoid reinventing the portability wheel.
Resources:
• Gnulib Basics: | ||
• Git Checkout: | ||
• Keeping Up-to-date: | ||
• Contributing to Gnulib: | ||
• Portability guidelines: | ||
• High Quality: |
Next: Git Checkout, Up: Brief Overview [Contents][Index]
While portability across operating systems is not one of GNU’s primary goals, it has helped introduce many people to the GNU system, and is worthwhile when it can be achieved at a low cost. This collection helps lower that cost.
Gnulib is intended to be the canonical source for most of the important “portability” and/or common files for GNU projects. These are files intended to be shared at the source level; Gnulib is not a typical library meant to be installed and linked against. Thus, unlike most projects, Gnulib does not normally generate a source tarball distribution; instead, developers grab modules directly from the source repository.
The easiest, and recommended, way to do this is to use the
gnulib-tool
script. Since there is no installation
procedure for Gnulib, gnulib-tool
needs to be run directly
in the directory that contains the Gnulib source code. You can do
this either by specifying the absolute filename of
gnulib-tool
, or by using a symbolic link from a place inside
your PATH
to the gnulib-tool
file of your preferred
Gnulib checkout. For example:
$ ln -s $HOME/gnu/src/gnulib.git/gnulib-tool $HOME/bin/gnulib-tool
Next: Keeping Up-to-date, Previous: Gnulib Basics, Up: Brief Overview [Contents][Index]
Gnulib is available for anonymous checkout. In any Bourne-shell the following should work:
$ git clone git://git.sv.gnu.org/gnulib.git
For a read-write checkout you need to have a login on ‘savannah.gnu.org’ and be a member of the Gnulib project at http://savannah.gnu.org/projects/gnulib. Then, instead of the URL git://git.sv.gnu.org/gnulib, use the URL ‘ssh://user@git.sv.gnu.org/srv/git/gnulib’ where user is your login name on savannah.gnu.org.
git resources:
When you use git annotate
or git blame
with Gnulib, it’s
recommended that you use the -w option, in order to ignore
massive whitespace changes that happened in 2009.
Next: Contributing to Gnulib, Previous: Git Checkout, Up: Brief Overview [Contents][Index]
The best way to work with Gnulib is to check it out of git.
To synchronize, you can use git pull
.
Subscribing to the bug-gnulib@gnu.org mailing list will help you to plan when to update your local copy of Gnulib (which you use to maintain your software) from git. You can review the archives, subscribe, etc., via https://lists.gnu.org/mailman/listinfo/bug-gnulib.
Sometimes, using an updated version of Gnulib will require you to use newer versions of GNU Automake or Autoconf. You may find it helpful to join the autotools-announce mailing list to be advised of such changes.
Next: Portability guidelines, Previous: Keeping Up-to-date, Up: Brief Overview [Contents][Index]
All software here is copyrighted by the Free Software Foundation—you need to have filled out an assignment form for a project that uses the module for that contribution to be accepted here.
If you have a piece of code that you would like to contribute, please email bug-gnulib@gnu.org.
Generally we are looking for files that fulfill at least one of the following requirements:
If your functions define completely new but rarely used functionality, you should probably consider packaging it as a separate library.
• Gnulib licensing: | ||
• Indent with spaces not TABs: | ||
• How to add a new module: |
Next: Indent with spaces not TABs, Up: Contributing to Gnulib [Contents][Index]
Gnulib contains code both under GPL and LGPL. Because several packages that use Gnulib are GPL, the files state they are licensed under GPL. However, to support LGPL projects as well, you may use some of the files under LGPL. The “License:” information in the files under modules/ clarifies the real license that applies to the module source.
Keep in mind that if you submit patches to files in Gnulib, you should license them under a compatible license, which means that sometimes the contribution will have to be LGPL, if the original file is available under LGPL via a “License: LGPL” information in the projects’ modules/ file.
Next: How to add a new module, Previous: Gnulib licensing, Up: Contributing to Gnulib [Contents][Index]
We use space-only indentation in nearly all files. This includes all
*.h, *.c, *.y files, except for the regex
module. Makefile and ChangeLog files are excluded, since TAB
characters are part of their format.
In order to tell your editor to produce space-only indentation, you can use these instructions.
;; In Gnulib, indent with spaces everywhere (not TABs). ;; Exceptions: Makefile and ChangeLog modes. (add-hook 'find-file-hook '(lambda () (if (and buffer-file-name (string-match "/gnulib\\>" (buffer-file-name)) (not (string-equal mode-name "Change Log")) (not (string-equal mode-name "Makefile"))) (setq indent-tabs-mode nil))))
" Don't use tabs for indentation. Spaces are nicer to work with. set expandtab
For Makefile and ChangeLog files, compensate for this by adding this to your $HOME/.vim/after/indent/make.vim file, and similarly for your $HOME/.vim/after/indent/changelog.vim file:
" Use tabs for indentation, regardless of the global setting. set noexpandtab
If you use the GNU indent program, pass it the option --no-tabs.
Previous: Indent with spaces not TABs, Up: Contributing to Gnulib [Contents][Index]
You can test that a module builds correctly with:
$ ./gnulib-tool --create-testdir --dir=/tmp/testdir module1 ... moduleN $ cd /tmp/testdir $ ./configure && make
Other things:
alloca
and fnmatch
modules for how to achieve this. If
for some reason you cannot do this, and you have a .c file that
leads to an empty .o file on some platforms (through some big
#if
around all the code), then ensure that the compilation unit
is not empty after preprocessing. One way to do this is to
#include <stddef.h>
or <stdio.h>
before the big
#if
.
Next: High Quality, Previous: Contributing to Gnulib, Up: Brief Overview [Contents][Index]
Gnulib code is intended to be portable to a wide variety of platforms, not just GNU platforms. Gnulib typically attempts to support a platform as long as it is still supported by its provider, even if the platform is not the latest version. See Target Platforms.
Many Gnulib modules exist so that applications need not worry about
undesirable variability in implementations. For example, an
application that uses the malloc
module need not worry about
malloc (0)
returning NULL
on some Standard C
platforms; and glob
users need not worry about glob
silently omitting symbolic links to nonexistent files on some
platforms that do not conform to POSIX.
Gnulib code is intended to port without problem to new hosts, e.g.,
hosts conforming to recent C and POSIX standards. Hence Gnulib code
should avoid using constructs that these newer standards no longer
require, without first testing for the presence of these constructs.
For example, because C11 made variable length arrays optional, Gnulib
code should avoid them unless it first uses the vararrays
module to check whether they are supported.
The following subsections discuss some exceptions and caveats to the general Gnulib portability guidelines.
• C language versions: | ||
• C99 features assumed: | ||
• C99 features avoided: | ||
• Other portability assumptions: |
Next: C99 features assumed, Up: Portability guidelines [Contents][Index]
Currently Gnulib assumes at least a freestanding C99 compiler, possibly operating with a C library that predates C99; with time this assumption will likely be strengthened to later versions of the C standard. Old platforms currently supported include AIX 6.1, HP-UX 11i v1 and Solaris 10, though these platforms are rarely tested. Gnulib itself is so old that it contains many fixes for obsolete platforms, fixes that may be removed in the future.
Because of the freestanding C99 assumption, Gnulib code can include
<float.h>
, <limits.h>
, <stdarg.h>
,
<stdbool.h>
, <stddef.h>
, and <stdint.h>
unconditionally. Gnulib code can also assume the existence
of <ctype.h>
, <errno.h>
, <fcntl.h>
,
<locale.h>
, <signal.h>
, <stdio.h>
,
<stdlib.h>
, <string.h>
, and <time.h>
. Similarly,
many modules include <sys/types.h>
even though it’s not even in
C11; that’s OK since <sys/types.h>
has been around nearly
forever.
Even if the include files exist, they may not conform to the C standard.
However, GCC has a fixincludes
script that attempts to fix most
C89-conformance problems. Gnulib currently assumes include files
largely conform to C89 or better. People still using ancient hosts
should use fixincludes or fix their include files manually.
Even if the include files conform, the library itself may not.
For example, strtod
and mktime
have some bugs on some platforms.
You can work around some of these problems by requiring the relevant
modules, e.g., the Gnulib mktime
module supplies a working and
conforming mktime
.
Next: C99 features avoided, Previous: C language versions, Up: Portability guidelines [Contents][Index]
Although the C99 standard specifies many features, Gnulib code is conservative about using them, partly because Gnulib predates the widespread adoption of C99, and partly because many C99 features are not well-supported in practice. C99 features that are reasonably portable nowadays include:
for
statement.
long long int
.
<stdbool.h>
, assuming the stdbool
module is used.
See stdbool.h.
<stdint.h>
, assuming the stdint
module is used.
See stdint.h.
static inline
functions.
__func__
, assuming the func
module is used. See func.
restrict
qualifier, assuming
AC_REQUIRE([AC_C_RESTRICT])
is used.
flexmember
module).
Next: Other portability assumptions, Previous: C99 features assumed, Up: Portability guidelines [Contents][Index]
Gnulib avoids some features even though they are standardized by C99, as they have portability problems in practice. Here is a partial list of avoided C99 features. Many other C99 features are portable only if their corresponding modules are used; Gnulib code that uses such a feature should require the corresponding module.
__STDC_NO_VLA__
is defined.
See the vararrays
module.
extern inline
functions, without checking whether they are
supported. See extern inline.
<iso646.h>
, since GNU programs need not worry about deficient
source-code encodings.
Previous: C99 features avoided, Up: Portability guidelines [Contents][Index]
The GNU coding standards allow one departure from strict C: Gnulib
code can assume that standard internal types like size_t
are no
wider than long
. POSIX requires implementations to support at
least one programming environment where this is true, and such
environments are recommended for Gnulib-using applications. When it
is easy to port to non-POSIX platforms like MinGW where these types
are wider than long
, new Gnulib code should do so, e.g., by
using ptrdiff_t
instead of long
. However, it is not
always that easy, and no effort has been made to check that all Gnulib
modules work on MinGW-like environments.
Gnulib code makes the following additional assumptions:
int
and unsigned int
are at least 32 bits wide. POSIX
and the GNU coding standards both require this.
Previously, Gnulib code sometimes assumed that signed integer arithmetic wraps around, but modern compiler optimizations sometimes do not guarantee this, and Gnulib code with this assumption is now considered to be questionable. See Integer Properties.
Although some Gnulib modules contain explicit support for the other signed integer representations allowed by the C standard (ones’ complement and signed magnitude), these modules are the exception rather than the rule. All practical Gnulib targets use two’s complement.
size_t
values, then S + T
cannot overflow.
(char *) &O <= (char *) P && (char *) P <
(char *) (&O + 1)
.
S + T
cannot overflow.
Overflow in this case would mean that the rest of your program fits
into T bytes, which can’t happen in realistic flat-address-space
hosts.
memset (A, 0, sizeof A)
initializes an array A
of
pointers to NULL.
0 + (char *) NULL == (char *) NULL
.
The above assumptions are not required by the C or POSIX standards but hold on all practical porting targets that we’re familiar with. If you have a porting target where these assumptions are not true, we’d appreciate hearing of any fixes. We need fixes that do not increase runtime overhead on standard hosts and that are relatively easy to maintain.
Previous: Portability guidelines, Up: Brief Overview [Contents][Index]
We develop and maintain a testsuite for Gnulib. The goal is to have a 100% firm interface so that maintainers can feel free to update to the code in git at any time and know that their application will not break. This means that before any change can be committed to the repository, a test suite program must be produced that exposes the bug for regression testing. All experimental work should be done on branches to help promote this.
Next: Invoking gnulib-tool, Previous: Brief Overview, Up: Top [Contents][Index]
Gnulib’s design and development philosophy is organized around steady, collaborative, and open development of reusable modules that are suitable for a reasonably wide variety of platforms.
Next: Library vs Reusable Code, Up: Philosophy [Contents][Index]
Gnulib is useful to enhance various aspects of a package:
asprintf
, canonicalize_file_name
are not affected
by buffer sizing problems that affect sprintf
, realpath
.
openat
does not have the race conditions that open
has. Etc.
xalloc
,
xprintf
, xstrtod
, xgetcwd
.
Next: Portability and Application Code, Previous: Benefits, Up: Philosophy [Contents][Index]
Classical libraries are installed as binary object code. Gnulib is
different: It is used as a source code library. Each package that uses
Gnulib thus ships with part of the Gnulib source code. The used portion
of Gnulib is tailored to the package: A build tool, called
gnulib-tool
, is provided that copies a tailored subset of Gnulib
into the package.
Next: Target Platforms, Previous: Library vs Reusable Code, Up: Philosophy [Contents][Index]
One of the goals of Gnulib is to make portable programming easy, on the basis of the standards relevant for GNU (and Unix). The objective behind that is to avoid a fragmentation of the user community into disjoint user communities according to the operating system, and instead allow synergies between users on different operating systems.
Another goal of Gnulib is to provide application code that can be shared between several applications. Some people wonder: "What? glibc doesn’t have a function to copy a file?" Indeed, the scope of a system’s libc is to implement the relevant standards (ISO C, POSIX) and to provide access functions to the kernel’s system calls, and little more.
There is no clear borderline between both areas.
For example, Gnulib has a facility for generating the name of backup files. While this task is entirely at the application level—no standard specifies an API for it—the naïve code has some portability problems because on some platforms the length of file name components is limited to 30 characters or so. Gnulib handles that.
Similarly, Gnulib has a facility for executing a command in a
subprocess. It is at the same time a portability enhancement (it
works on GNU, Unix, and Windows, compared to the classical
fork
/exec
idiom which is not portable to Windows), as well
as an application aid: it takes care of redirecting stdin and/or
stdout if desired, and emits an error message if the subprocess
failed.
Next: Modules, Previous: Portability and Application Code, Up: Philosophy [Contents][Index]
Gnulib supports a number of platforms that we call the “reasonable portability targets”. This class consists of widespread operating systems, for three years after their last availability, or—for proprietary operating systems—as long as the vendor provides commercial support for it. Already existing Gnulib code for older operating systems is usually left in place for longer than these three years. So it comes that programs that use Gnulib run pretty well also on these older operating systems.
Some operating systems are not very widespread, but are Free Software and are actively developed. Such platforms are also supported by Gnulib, if that OS’s developers community keeps in touch with the Gnulib developers, by providing bug reports, analyses, or patches. For such platforms, Gnulib supports only the versions of the last year or the last few months, depending on the maturity of said OS project, the number of its users, and how often these users upgrade.
Niche operating systems are generally unsupported by Gnulib, unless some of their developers or users contribute support to Gnulib.
The degree of support Gnulib guarantees for a platform depends on the amount of testing it gets from volunteers. Platforms on which Gnulib is frequently tested are the best supported. Then come platforms with occasional testing, then platforms which are rarely tested. Usually, we fix bugs when they are reported. Except that some rarely tested platforms are also low priority; bug fixes for these platforms can take longer.
As of 2016, the list of supported platforms is the following:
mgetgroups
, getugroups
, idcache
,
userspec
, openpty
, login_tty
, forkpty
,
pt_chown
, grantpt
, pty
, savewd
,
mkancesdirs
, mkdir-p
, euidaccess
, faccessat
.
The versions of Windows that are supported are Windows XP and newer.
Only the latest version of mingw is tested; older versions are not supported.
suacomp
library
(http://sourceforge.net/projects/suacomp/) in version 0.6.8 or newer.
Gnulib supports these operating systems only in an unvirtualized environment.
When you run an OS inside a virtual machine, you have to be aware that the
virtual machine can bring in bugs of its own. For example, floating-point
operations on Solaris can behave slightly differently in QEMU than on real
hardware. And Haiku’s bash
program misbehaves in VirtualBox 3,
whereas it behaves fine in VirtualBox 4.
Similarly, running native Windows binaries on GNU/Linux under WINE is rarely tested and low priority: WINE has a set of behaviours and bugs that is slightly different from native Windows.
The following platforms are not supported by Gnulib. The cost of supporting them would exceed the benefit because they are rarely used, or poorly documented, or have been supplanted by other platforms, or diverge too much from POSIX, or some combination of these and other factors. Please don’t bother sending us patches for them.
Next: Various Kinds of Modules, Previous: Target Platforms, Up: Philosophy [Contents][Index]
Gnulib is divided into modules. Every module implements a single facility. Modules can depend on other modules.
A module consists of a number of files and a module description. The
files are copied by gnulib-tool
into the package that will use it,
usually verbatim, without changes. Source code files (.h, .c files)
reside in the lib/ subdirectory. Autoconf macro files reside in
the m4/ subdirectory. Build scripts reside in the
build-aux/ subdirectory.
The module description contains the list of files; gnulib-tool
copies these files. It contains the module’s
dependencies; gnulib-tool
installs them as well. It also
contains the autoconf macro invocation (usually a single line or
nothing at all); gnulib-tool
ensures this is invoked from the
package’s configure.ac file. And also a Makefile.am
snippet; gnulib-tool
collects these into a Makefile.am
for the tailored Gnulib part. The module description and include file
specification are for documentation purposes; they are combined into
MODULES.html.
The module system serves two purposes:
getopt_long
function—this is a common way to implement parsing
of command line options in a way that complies with the GNU standards—needs
the source code (lib/getopt.c and others), the autoconf macro
which detects whether the system’s libc already has this function (in
m4/getopt.m4), and a few Makefile.am lines that create the
substitute getopt.h if not. These three pieces belong together.
They cannot be used without each other. The module description and
gnulib-tool
ensure that they are copied altogether into the
destination package.
In other words, the module is the elementary unit of code in Gnulib, comparable to a class in object-oriented languages like Java or C#.
The module system is the basis of gnulib-tool
. When
gnulib-tool
copies a part of Gnulib into a package, it first
compiles a module list, starting with the requested modules and adding all
the dependencies, and then collects the files, configure.ac
snippets and Makefile.am snippets.
Next: Collaborative Development, Previous: Modules, Up: Philosophy [Contents][Index]
There are modules of various kinds in Gnulib. For a complete list of the modules, see in MODULES.html.
When a function is not implemented by a system, the Gnulib module provides an implementation under the same name. Examples are the ‘snprintf’ and ‘readlink’ modules.
Similarly, when a function is not correctly implemented by a system, Gnulib provides a replacement. For functions, we use the pattern
#if !HAVE_WORKING_FOO # define foo rpl_foo #endif
and implement the foo
function under the name rpl_foo
. This
renaming is needed to avoid conflicts at compile time (in case the system
header files declare foo
) and at link/run time (because the code
making use of foo
could end up residing in a shared library, and
the executable program using this library could be defining foo
itself).
For header files, such as stdbool.h
or stdint.h
, we provide
the substitute only if the system doesn’t provide a correct one. The
template of this replacement is distributed in a slightly different name,
with ‘.in’ inserted before the ‘.h’ extension, so that on
systems which do provide a correct
header file the system’s one is used.
These are sometimes POSIX functions with GNU extensions also found in glibc—examples: ‘getopt’, ‘fnmatch’—and often new APIs—for example, for all functions that allocate memory in one way or the other, we have variants which also include the error checking against the out-of-memory condition.
Examples are a module for copying a file—the portability problems
relate to the copying of the file’s modification time, access rights,
and extended attributes—or a module for extracting the tail
component of a file name—here the portability to native Windows
requires a different API than the classical POSIX basename
function.
Examples are an error reporting function, a module that allows output of numbers with K/M/G suffixes, or cryptographic facilities.
Examples are data structures like ‘list’, or abstract output stream
classes that work around the fact that an application cannot implement an
stdio FILE
with its logic. Here, while staying in C, we use
implementation techniques like tables of function pointers, known from the
C++ language or from the Linux kernel.
Examples are the ‘iconv’ module, which interfaces to the
iconv
facility, regardless whether it is contained in libc or in
an external libiconv
. Or the ‘readline’ module, which
interfaces to the GNU readline library.
An example is the ‘maintainer-makefile’ module, which provides extra Makefile tags for maintaining a package.
Next: Copyright, Previous: Various Kinds of Modules, Up: Philosophy [Contents][Index]
Gnulib is maintained collaboratively. The mailing list is
<bug-gnulib at gnu dot org>
. Be warned that some people on the
list may be very active at some times and unresponsive at other times.
Every module has one or more maintainers. While issues are discussed collaboratively on the list, the maintainer of a module nevertheless has a veto right regarding changes in his module.
All patches should be posted the list, regardless whether they are proposed patches or whether they are committed immediately by the maintainer of the particular module. The purpose is not only to inform the other users of the module, but mainly to allow peer review. It is not uncommon that several people contribute comments or spot bugs after a patch was proposed.
Conversely, if you are using Gnulib, and a patch is posted that affects one of the modules that your package uses, you have an interest in proofreading the patch.
Next: Steady Development, Previous: Collaborative Development, Up: Philosophy [Contents][Index]
Most modules are under the GPL. Some, mostly modules which can reasonably be used in libraries, are under LGPL. The source files always say "GPL", but the real license specification is in the module description file. If the module description file says "GPL", it means "GPLv3+" (GPLv3 or newer, at the licensee’s choice); if it says "LGPL", it means "LGPLv3+" (LGPLv3 or newer, at the licensee’s choice).
More precisely, the license specification in the module description file applies to the files in lib/ and build-aux/. Different licenses apply to files in special directories:
Module description files are under this copyright:
Copyright © 20XX–20YY Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, in any medium, are permitted without royalty provided the copyright notice and this notice are preserved.
Autoconf macro files are under this copyright:
Copyright © 20XX–20YY Free Software Foundation, Inc.
This file is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved.
If a license statement is not present in a test module, the test files are under GPL. Even if the corresponding source module is under LGPL, this is not a problem, since compiled tests are not installed by “make install”.
Documentation files are under this copyright:
Copyright © 2004–20YY Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
If you want to use some Gnulib modules under LGPL, you can do so by
passing the option ‘--lgpl’ to gnulib-tool
. This will
replace the GPL header with an LGPL header while copying the source
files to your package. Similarly, if you want some Gnulib modules
under LGPLv2+ (Lesser GPL version 2.1 or newer), you can do so by
passing the option ‘--lgpl=2’ to gnulib-tool
.
Keep in mind that when you submit patches to files in Gnulib, you should license them under a compatible license. This means that sometimes the contribution will have to be LGPL, if the original file is available under LGPL. You can find out about it by looking for a "License: LGPL" information in the corresponding module description.
Next: Openness, Previous: Copyright, Up: Philosophy [Contents][Index]
Gnulib modules are continually adapted, to match new practices, to be consistent with newly added modules, or simply as a response to build failure reports. Gnulib is available in two qualities:
If you are willing to report an occasional regression, we recommend to use the newest version always, except in periods of major changes. Most Gnulib users do this. If you prefer stable releases, please use the newest stable release.
Previous: Steady Development, Up: Philosophy [Contents][Index]
Gnulib is open in the sense that we gladly accept contributions if they are generally useful, well engineered, and if the contributors have signed the obligatory papers with the FSF.
The module system is open in the sense that a package using Gnulib can
gnulib-tool
.
This is achieved by the ‘--local-dir’ option of gnulib-tool
(see Extending Gnulib).
Next: Writing modules, Previous: Philosophy, Up: Top [Contents][Index]
The gnulib-tool
command is the recommended way to import
Gnulib modules. It is possible to borrow Gnulib modules in a package
without using gnulib-tool
, relying only on the
meta-information stored in the modules/* files, but with a
growing number of modules this becomes tedious. gnulib-tool
simplifies the management of source files, Makefile.ams and
configure.ac in packages incorporating Gnulib modules.
gnulib-tool is not installed in a standard directory that is
contained in the PATH
variable. It needs to be run directly in
the directory that contains the Gnulib source code. You can do this
either by specifying the absolute filename of gnulib-tool, or
you can also use a symbolic link from a place inside your PATH
to the gnulib-tool file of your preferred and most up-to-date
Gnulib checkout, like this:
$ ln -s $HOME/gnu/src/gnulib.git/gnulib-tool $HOME/bin/gnulib-tool
Run ‘gnulib-tool --help’ for information. To get familiar with
gnulib-tool
without affecting your sources, you can also try
some commands with the option ‘--dry-run’; then
gnulib-tool
will only report which actions it would perform in
a real run without changing anything.
• Which modules?: | Determining the needed set of Gnulib modules | |
• Initial import: | First import of Gnulib modules. | |
• Modified imports: | Changing the import specification. | |
• Simple update: | Tracking Gnulib development. | |
• Source changes: | Impact of Gnulib on your source files. | |
• Multiple instances: | Using Gnulib for both a library and a binary | |
• gettextize and autopoint: | Caveat: gettextize and autopoint users!
| |
• Localization: | Handling Gnulib’s own message translations. | |
• VCS Issues: | Integration with Version Control Systems. | |
• Unit tests: | Bundling the unit tests of the Gnulib modules. | |
• Conditional dependencies: | Avoiding unnecessary checks and compilations. |
Next: Initial import, Up: Invoking gnulib-tool [Contents][Index]
There are three ways of finding the names of Gnulib modules that you can use in your package:
Next: Modified imports, Previous: Which modules?, Up: Invoking gnulib-tool [Contents][Index]
Gnulib assumes that your project uses Autoconf. When using Gnulib, you will need to have Autoconf among your build tools.
Unless you use gnulib-tool
’s --gnu-make option,
Gnulib also assumes that your project uses Automake at least in a
subdirectory of your project. While the use of Automake in your
project’s top level directory is an easy way to fulfil the Makefile
conventions of the GNU coding standards, Gnulib does not require it.
Invoking ‘gnulib-tool --import’ will copy source files, create a Makefile.am to build them, generate a file gnulib-comp.m4 with Autoconf M4 macro declarations used by configure.ac, and generate a file gnulib-cache.m4 containing the cached specification of how Gnulib is used.
Our example will be a library that uses Autoconf, Automake and
Libtool. It calls strdup
, and you wish to use gnulib to make
the package portable to C99 and C11 (which don’t have strdup
).
~/src/libfoo$ gnulib-tool --import strdup Module list with included dependencies: absolute-header extensions strdup string File list: lib/dummy.c lib/strdup.c lib/string.in.h m4/absolute-header.m4 m4/extensions.m4 m4/gnulib-common.m4 m4/strdup.m4 m4/string_h.m4 Creating directory ./lib Creating directory ./m4 Copying file lib/dummy.c Copying file lib/strdup.c Copying file lib/string.in.h Copying file m4/absolute-header.m4 Copying file m4/extensions.m4 Copying file m4/gnulib-common.m4 Copying file m4/gnulib-tool.m4 Copying file m4/strdup.m4 Copying file m4/string_h.m4 Creating lib/Makefile.am Creating m4/gnulib-cache.m4 Creating m4/gnulib-comp.m4 Finished. You may need to add #include directives for the following .h files. #include <string.h> Don't forget to - add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac, - mention "lib" in SUBDIRS in Makefile.am, - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am, - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC, - invoke gl_INIT in ./configure.ac. ~/src/libfoo$
By default, the source code is copied into lib/ and the M4
macros in m4/. You can override these paths by using
--source-base=DIRECTORY
and --m4-base=DIRECTORY
. Some
modules also provide other files necessary for building. These files
are copied into the directory specified by ‘AC_CONFIG_AUX_DIR’ in
configure.ac or by the --aux-dir=DIRECTORY
option. If
neither is specified, the current directory is assumed.
gnulib-tool
can make symbolic links instead of copying the
source files. The option to specify for this is ‘--symlink’, or
‘-s’ for short. This can be useful to save a few kilobytes of disk
space. But it is likely to introduce bugs when gnulib
is updated;
it is more reliable to use ‘gnulib-tool --update’ (see below)
to update to newer versions of gnulib
. Furthermore it requires
extra effort to create self-contained tarballs, and it may disturb some
mechanism the maintainer applies to the sources. For these reasons,
this option is generally discouraged.
gnulib-tool
will overwrite any pre-existing files, in
particular Makefile.am. It is also possible to separate the
generated Makefile.am content (for building the gnulib library)
into a separate file, say gnulib.mk, that can be included by your
handwritten Makefile.am, but this is a more advanced use of
gnulib-tool
.
Consequently, it is a good idea to choose directories that are not
already used by your projects, to separate gnulib imported files from
your own files. This approach is also useful if you want to avoid
conflicts between other tools (e.g., gettextize
that also copy
M4 files into your package. Simon Josefsson successfully uses a source
base of gl/, and a M4 base of gl/m4/, in several
packages.
After the ‘--import’ option on the command line comes the list of Gnulib modules that you want to incorporate in your package. The names of the modules coincide with the filenames in Gnulib’s modules/ directory.
Some Gnulib modules depend on other Gnulib modules. gnulib-tool
will automatically add the needed modules as well; you need not list
them explicitly. gnulib-tool
will also memorize which dependent
modules it has added, so that when someday a dependency is dropped, the
implicitly added module is dropped as well (unless you have explicitly
requested that module).
If you want to cut a dependency, i.e., not add a module although one of your requested modules depends on it, you may use the option ‘--avoid=module’ to do so. Multiple uses of this option are possible. Of course, you will then need to implement the same interface as the removed module.
A few manual steps are required to finish the initial import.
gnulib-tool
printed a summary of these steps.
First, you must ensure Autoconf can find the macro definitions in
gnulib-comp.m4. Use the ACLOCAL_AMFLAGS
specifier in
your top-level Makefile.am file, as in:
ACLOCAL_AMFLAGS = -I m4
You are now ready to call the M4 macros in gnulib-comp.m4
from
configure.ac. The macro gl_EARLY
must be called as soon
as possible after verifying that the C compiler is working.
Typically, this is immediately after AC_PROG_CC
, as in:
... AC_PROG_CC gl_EARLY ...
If you are using AC_PROG_CC_STDC
, the macro gl_EARLY
must
be called after it, like this:
... AC_PROG_CC AC_PROG_CC_STDC gl_EARLY ...
The core part of the gnulib checks are done by the macro
gl_INIT
. Place it further down in the file, typically where
you normally check for header files or functions. It must come after
other checks which may affect the compiler invocation, such as
AC_MINIX
. For example:
... # For gnulib. gl_INIT ...
gl_INIT
will in turn call the macros related with the
gnulib functions, be it specific gnulib macros, like gl_FUNC_ALLOCA
or Autoconf or Automake macros like AC_FUNC_ALLOCA
or
AM_FUNC_GETLINE
. So there is no need to call those macros yourself
when you use the corresponding gnulib modules.
You must also make sure that the gnulib library is built. Add the
Makefile
in the gnulib source base directory to
AC_CONFIG_FILES
, as in:
AC_CONFIG_FILES(... lib/Makefile ...)
You must also make sure that make
will recurse into the gnulib
directory. To achieve this, add the gnulib source base directory to a
SUBDIRS
Makefile.am statement, as in:
SUBDIRS = lib
or if you, more likely, already have a few entries in SUBDIRS
,
you can add something like:
SUBDIRS += lib
Finally, you have to add compiler and linker flags in the appropriate source directories, so that you can make use of the gnulib library. Since some modules (‘getopt’, for example) may copy files into the build directory, top_builddir/lib is needed as well as top_srcdir/lib. For example:
... AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib ... LDADD = lib/libgnu.a ...
Don’t forget to #include
the various header files. In this
example, you would need to make sure that ‘#include <string.h>’
is evaluated when compiling all source code files, that want to make
use of strdup
.
In the usual case where Autoconf is creating a config.h file, you should include config.h first, before any other include file. That way, for example, if config.h defines ‘restrict’ to be the empty string on a non-C99 host, or a macro like ‘_FILE_OFFSET_BITS’ that affects the layout of data structures, the definition is consistent for all include files. Also, on some platforms macros like ‘_FILE_OFFSET_BITS’ and ‘_GNU_SOURCE’ may be ineffective, or may have only a limited effect, if defined after the first system header file is included.
Finally, note that you cannot use AC_LIBOBJ
or
AC_REPLACE_FUNCS
in your configure.ac and expect the
resulting object files to be automatically added to lib/libgnu.a.
This is because your AC_LIBOBJ
and AC_REPLACE_FUNCS
invocations
from configure.ac augment a variable @LIBOBJS@
(and/or
@LTLIBOBJS@
if using Libtool), whereas lib/libgnu.a
is built from the contents of a different variable, usually
@gl_LIBOBJS@
(or @gl_LTLIBOBJS@
if using Libtool).
Next: Simple update, Previous: Initial import, Up: Invoking gnulib-tool [Contents][Index]
You can at any moment decide to use Gnulib differently than the last time.
There are two ways to change how Gnulib is used. Which one you’ll use,
depends on where you keep track of options and module names that you pass
to gnulib-tool
.
gnulib-tool
again, with modified options and more or fewer module names.
gnulib-tool
remembers which modules were used last time. If you
want to rely on gnulib-tool
’s own memory of the last used
options and module names, you can use the commands
gnulib-tool --add-import
and
gnulib-tool --remove-import
.
So, if you only want to use more Gnulib modules, simply invoke
gnulib-tool --add-import new-modules
. The list of
modules that you pass after ‘--add-import’ is added to the
previous list of modules.
Similarly, if you want to use fewer Gnulib modules, simply invoke
gnulib-tool --remove-import unneeded-modules
. The list
of modules that you pass after ‘--remove-import’ is removed
from the previous list of modules. Note that if a module is then still
needed as dependency of other modules, it will be used nevertheless.
If you want to really not use a module any more, regardless of
whether other modules may need it, you need to use the ‘--avoid’
option.
For other changes, such as different choices of ‘--lib’, ‘--source-base’ or ‘--aux-dir’, the normal way is to modify manually the file gnulib-cache.m4 in the M4 macros directory, then launch ‘gnulib-tool --add-import’.
The only change for which this doesn’t work is a change of the
‘--m4-base’ directory. Because, when you pass a different value of
‘--m4-base’, gnulib-tool
will not find the previous
gnulib-cache.m4 file any more. A possible solution is to
manually copy the gnulib-cache.m4 into the new M4 macro directory.
In the gnulib-cache.m4 file, the macros have the following meaning:
gl_MODULES
The argument is a space separated list of the requested modules, not including dependencies.
gl_AVOID
The argument is a space separated list of modules that should not be used, even if they occur as dependencies. Corresponds to the ‘--avoid’ command line argument.
gl_SOURCE_BASE
The argument is the relative file name of the directory containing the gnulib source files (mostly *.c and *.h files). Corresponds to the ‘--source-base’ command line argument.
gl_M4_BASE
The argument is the relative file name of the directory containing the gnulib M4 macros (*.m4 files). Corresponds to the ‘--m4-base’ command line argument.
gl_TESTS_BASE
The argument is the relative file name of the directory containing the gnulib unit test files. Corresponds to the ‘--tests-base’ command line argument.
gl_LIB
The argument is the name of the library to be created. Corresponds to the ‘--lib’ command line argument.
gl_LGPL
The presence of this macro without arguments corresponds to the ‘--lgpl’ command line argument. The presence of this macro with an argument (whose value must be 2 or 3) corresponds to the ‘--lgpl=arg’ command line argument.
gl_LIBTOOL
The presence of this macro corresponds to the ‘--libtool’ command line argument and to the absence of the ‘--no-libtool’ command line argument. It takes no arguments.
gl_MACRO_PREFIX
The argument is the prefix to use for macros in the gnulib-comp.m4 file. Corresponds to the ‘--macro-prefix’ command line argument.
Next: Source changes, Previous: Modified imports, Up: Invoking gnulib-tool [Contents][Index]
When you want to update to a more recent version of Gnulib, without changing the list of modules or other parameters, a simple call does it:
$ gnulib-tool --add-import
This will create, update or remove files, as needed.
Note: From time to time, changes are made in Gnulib that are not backward compatible. When updating to a more recent Gnulib, you should consult Gnulib’s NEWS file to check whether the incompatible changes affect your project.
Next: Multiple instances, Previous: Simple update, Up: Invoking gnulib-tool [Contents][Index]
Gnulib contains some header file overrides. This means that when building on systems with deficient header files in /usr/include/, it may create files named string.h, stdlib.h, stdint.h or similar in the build directory. In the other source directories of your package you will usually pass ‘-I’ options to the compiler, so that these Gnulib substitutes are visible and take precedence over the files in /usr/include/.
These Gnulib substitute header files rely on <config.h> being already included. Furthermore <config.h> must be the first include in every compilation unit. This means that to all your source files and likely also to all your tests source files you need to add an ‘#include <config.h>’ at the top. Which source files are affected? Exactly those whose compilation includes a ‘-I’ option that refers to the Gnulib library directory.
This is annoying, but inevitable: On many systems, <config.h> is
used to set system dependent flags (such as _GNU_SOURCE
on GNU systems),
and these flags have no effect after any system header file has been included.
Next: gettextize and autopoint, Previous: Source changes, Up: Invoking gnulib-tool [Contents][Index]
Your project might build both a library and some accompanying binaries
in the same source tree. In that case you might want to use different
modules for the library than for the binaries. Typically the binaries
might want to make use of getopt-posix
or version-etc
,
while the library wants to stay clear of these modules for technical
or licensing reasons.
Let’s assume that your project contains a lib directory where the source of the library resides and a src directory for the sources of the binaries as follows.
. |-- configure.ac |-- lib | |-- foo.c | `-- Makefile.am |-- Makefile.am `-- src |-- bar.c `-- Makefile.am
You can now add two instances of Gnulib to your project in separate source trees:
~/src/libfoo$ gnulib-tool --import --lib=libgnu --source-base=gnulib \ --m4-base=gnulib/m4 --macro-prefix=gl strndup ~/src/libfoo$ gnulib-tool --import --lib=libgnutools \ --source-base=src/gnulib --m4-base=src/gnulib/m4 \ --macro-prefix=gl_tools getopt-gnu
The first one will import the module strndup
in gnulib
and the second one will import getopt-gnu
in src/gnulib
and you will end up with the following source tree (many files omitted
in the interest of brevity):
. |-- configure.ac |-- gnulib | |-- m4 | |-- strndup.c |-- lib | |-- foo.c | `-- Makefile.am |-- Makefile.am `-- src |-- bar.c |-- gnulib | |-- getopt.c | |-- getopt.in.h | |-- m4 `-- Makefile.am
Integration with your code is basically the same as outlined in
Initial import with the one exception that you have to add both
the macro gl_EARLY
and the macro gl_tools_EARLY
to your
configure.ac (and of course also both macros gl_INIT
and
gl_tools_INIT
). Obviously the name of the second macro is
dependent on the value of the --macro-prefix option in your
gnulib-tool
invocation.
... AC_PROG_CC gl_EARLY gl_tools_EARLY ... # For gnulib. gl_INIT gl_tools_INIT ...
Also as outlined in Initial import you will have to add compiler and linker flags. For the library you might have to add something along the line of the following to your Makefile.am:
... AM_CPPFLAGS = -I$(top_srcdir)/gnulib -I$(top_builddir)/gnulib ... libfoo_la_LIBADD = $(top_builddir)/gnulib/libgnu.la ...
Correspondingly for the binary you will have to add something along the lines of to the following:
... AM_CPPFLAGS = -I$(top_srcdir)/src/gnulib -I$(top_builddir)/src/gnulib ... LIBADD = $(top_builddir)/src/gnulib/libgnutools.la ...
The name of the library that you have pass in the linker option
depends on the --lib option in gnulib-tool
invocation.
Next: Localization, Previous: Multiple instances, Up: Invoking gnulib-tool [Contents][Index]
gettextize
and autopoint
usersThe programs gettextize
and autopoint
, part of
GNU gettext
, import or update the internationalization infrastructure.
Some of this infrastructure, namely ca. 20 Autoconf macro files and the
config.rpath file, is also contained in Gnulib and may be imported
by gnulib-tool
. The use of gettextize
or autopoint
will therefore overwrite some of the files that gnulib-tool
has
imported, and vice versa.
Avoiding to use gettextize
(manually, as package maintainer) or
autopoint
(as part of a script like autoreconf
or
autogen.sh
) is not the solution: These programs also import the
infrastructure in the po/ and optionally in the intl/ directory.
The copies of the conflicting files in Gnulib are more up-to-date than
the copies brought in by gettextize
and autopoint
. When a
new gettext
release is made, the copies of the files in Gnulib will
be updated immediately.
The choice of which version of gettext to require depends on the needs of your package. For a package that wants to comply to GNU Coding Standards, the steps are:
gettextize
, always use the gettextize
from the
matching GNU gettext release. For the most recent Gnulib checkout, this is
the newest release found on http://ftp.gnu.org/gnu/gettext/. For an
older Gnulib snapshot, it is the release that was the most recent release
at the time the Gnulib snapshot was taken.
gettextize
, invoke gnulib-tool
and import
the gettext
module. Also, copy the latest version of gnulib’s
build-aux/po/Makefile.in.in to your po/ directory (this
is done for you if you use gnulib’s bootstrap script).
*** error: gettext infrastructure mismatch:
using a Makefile.in.in from gettext version ...
but the Autoconf macros are from gettext version ...
,
it means that a new GNU gettext release was made, and its Autoconf macros
were integrated into Gnulib and now mismatch the po/ infrastructure.
In this case, fetch and install the new GNU gettext release and run
gettextize
followed by gnulib-tool
.
On the other hand, if your package is not as concerned with compliance to the latest standards, but instead favors development on stable environments, the steps are:
gettext
that you intend to
support during development (at this time, gnulib recommends going no
older than version 0.17). Run autopoint
(not
gettextize
) to copy infrastructure into place (newer versions
of gettext will install the older infrastructure that you requested).
gnulib-tool
, and import the gettext-h
module.
Regardless of which approach you used to get the infrastructure in place, the following steps must then be used to preserve that infrastructure (gnulib’s bootstrap script follows these rules):
autopoint
, invoke gnulib-tool
afterwards.
autoreconf
after gnulib-tool
, make sure to
not invoke autopoint
a second time, by setting the AUTOPOINT
environment variable, like this:
$ env AUTOPOINT=true autoreconf --install
Next: VCS Issues, Previous: gettextize and autopoint, Up: Invoking gnulib-tool [Contents][Index]
Gnulib provides some functions that emit translatable messages using GNU
gettext
. The ‘gnulib’ domain at the
Translation Project collects
translations of these messages, which you should incorporate into your
own programs.
There are two basic ways to achieve this. The first, and older, method is to list all the source files you use from Gnulib in your own po/POTFILES.in file. This will cause all the relevant translatable strings to be included in your POT file. When you send this POT file to the Translation Project, translators will normally fill in the translations of the Gnulib strings from their “translation memory”, and send you back updated PO files.
However, this process is error-prone: you might forget to list some source files, or the translator might not be using a translation memory and provide a different translation than another translator, or the translation might not be kept in sync between Gnulib and your package. It is also slow and causes substantial extra work, because a human translator must be in the loop for each language and you will need to incorporate their work on request.
For these reasons, a new method was designed and is now recommended. If
you pass the --po-base=directory
and --po-domain=domain
options to gnulib-tool
, then gnulib-tool
will create a
separate directory with its own POTFILES.in, and fetch current
translations directly from the Translation Project (using
rsync
or wget
, whichever is available).
The POT file in this directory will be called
domain-gnulib.pot, depending on the domain you gave to the
--po-domain
option (typically the same as the package name).
This causes these translations to reside in a separate message domain,
so that they do not clash either with the translations for the main part
of your package nor with those of other packages on the system that use
possibly different versions of Gnulib.
When you use these options, the functions in Gnulib are built
in such a way that they will always use this domain regardless of the
default domain set by textdomain
.
In order to use this method, you must—in each program that might use Gnulib code—add an extra line to the part of the program that initializes locale-dependent behavior. Where you would normally write something like:
setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE);
you should add an additional bindtextdomain
call to inform
gettext of where the MO files for the extra message domain may be found:
bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
(This example assumes that the domain that you specified
to gnulib-tool
is the same as the value of the PACKAGE
preprocessor macro.)
Since you do not change the textdomain
call, the default message
domain for your program remains the same and your own use of gettext
functions will not be affected.
Next: Unit tests, Previous: Localization, Up: Invoking gnulib-tool [Contents][Index]
If a project stores its source files in a version control system (VCS), such as CVS, Subversion, or Git, one needs to decide which files to commit.
In principle, all files created by gnulib-tool
, except
gnulib-cache.m4, can be treated like generated source files,
like for example a parser.c file generated from
parser.y. Alternatively, they can be considered source files
and updated manually.
Here are the three different approaches in common use. Each has its place, and you should use whichever best suits your particular project and development methods.
gnulib-tool
generated files should all be
committed. In this case, you should pass the option
‘--no-vc-files’ to gnulib-tool
, which avoids alteration of
VCS-related files such as .gitignore.
Gnulib also contains files generated by make
(and removed by
make clean
), using information determined by
configure
. For a Gnulib source file of the form
lib/foo.in.h, the corresponding lib/foo.h is such a
make
-generated file. These should not be checked
into the VCS, but instead added to .gitignore or equivalent.
gnulib-tool
. The command for restoring the omitted files
depends on it:
gnulib-cache.m4
, such as
autogen.sh, bootstrap, bootstrap.conf, or similar,
the restoration command is the entire gnulib-tool ... --import ...
invocation with all options and module names.
gnulib-tool
’s memory of the last used
options and module names, then the file gnulib-cache.m4 in the M4
macros directory must be added to the VCS, and the restoration command
is:
$ gnulib-tool --update
The ‘--update’ option operates much like the ‘--add-import’ option, but it does not offer the possibility to change the way Gnulib is used. Also it does not report in the ChangeLogs the files that it had to add because they were missing.
Gnulib includes the file build-aux/bootstrap to aid a developer in using this setup. Furthermore, in projects that use git for version control, it is possible to use a git submodule containing the precise commit of the gnulib repository, so that each developer running bootstrap will get the same version of all gnulib-provided files. The location of the submodule can be chosen to fit the package’s needs; here’s how to initially create the submodule in the directory .gnulib:
$ dir=.gnulib $ git submodule add -- git://git.sv.gnu.org/gnulib.git $dir $ git config alias.syncsub "submodule foreach git pull origin master"
Thereafter, bootstrap can run this command to update the submodule to the recorded checkout level:
git submodule update --init $dir
and a developer can use this sequence to update to a newer version of gnulib:
$ git syncsub $ git add $dir $ ./bootstrap
Makefile.in
generated by Automake. This
increases the size and complexity of the repository, but can help
occasional contributors by not requiring them to have a full Gnulib
checkout to do a build, and all developers by ensuring that all
developers are working with the same version of Gnulib in the
repository. It also supports multiple Gnulib instances within a
project. It remains important not to commit the
make
-generated files, as described above.
Next: Conditional dependencies, Previous: VCS Issues, Up: Invoking gnulib-tool [Contents][Index]
You can bundle the unit tests of the Gnulib modules together with your
package, through the ‘--with-tests’ option. Together with
‘--with-tests’, you also specify the directory for these tests
through the ‘--tests-base’ option. Of course, you need to add this
directory to the SUBDIRS
variable in the Makefile.am
of
the parent directory.
The advantage of having the unit tests bundled is that when your program has a problem on a particular platform, running the unit tests may help determine quickly if the problem is on Gnulib’s side or on your package’s side. Also, it helps verifying Gnulib’s portability, of course.
The unit tests will be compiled and run when the user runs ‘make check’. When the user runs only ‘make’, the unit tests will not be compiled.
In the SUBDIRS
variable, it is useful to put the Gnulib tests directory
after the directory containing the other tests, not before:
SUBDIRS = gnulib-lib src man tests gnulib-tests
This will ensure that on platforms where there are test failures in either directory, users will see and report the failures from the tests of your program.
Note: In packages which use more than one invocation of gnulib-tool
in the scope of the same configure.ac
, you cannot use
‘--with-tests’. You will have to use a separate configure.ac
in this case.
Previous: Unit tests, Up: Invoking gnulib-tool [Contents][Index]
In some cases, a module is needed by another module only on specific
platforms. But when a module is present, its Autoconf checks are always
executed, and its Makefile.am
additions are always enabled. So
it can happen that some Autoconf checks are executed and some source files
are compiled, although no other module needs them on this particular
platform, just in case some other module would need them.
The option ‘--conditional-dependencies’ enables an optimization of
configure checks and Makefile.am
snippets that avoids this. With
this option, whether a module is considered “present” is no longer decided
when gnulib-tool
is invoked, but later, when configure
is run.
This applies to modules that were added as dependencies while
gnulib-tool
was run; modules that were passed on the command line
explicitly are always “present”.
For example, the timegm
module needs, on platforms
where the system’s timegm
function is missing or buggy, a replacement
that is based on a function mktime_internal
. The module
mktime-internal
that provides this function provides it on all
platforms. So, by default, the file mktime-internal.c will be
compiled on all platforms, even on glibc and BSD systems which have a
working timegm
function. When the option
‘--conditional-dependencies’ is given, on the other hand, and if
mktime-internal
was not explicitly required on the command line,
the file mktime-internal.c will only be compiled on the platforms
where the timegm
needs them.
Conditional dependencies are specified in the module description by putting
the condition on the same line as the dependent module, enclosed in brackets.
The condition is a boolean shell expression that can assume that the
configure.ac
snippet from the module description has already been
executed. In the example above, the dependency from timegm
to
mktime-internal
is written like this:
Depends-on: ... mktime-internal [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1] ...
Note: The option ‘--conditional-dependencies’ cannot be used together
with the option ‘--with-tests’. It also cannot be used when a package
uses gnulib-tool
for several subdirectories, with different values
of ‘--source-base’, in the scope of a single configure.ac
file.
Next: Extending Gnulib, Previous: Invoking gnulib-tool, Up: Top [Contents][Index]
This chapter explains how to write modules of your own, either to extend Gnulib for your own package (see Extending Gnulib), or for inclusion in gnulib proper.
The guidelines in this chapter do not necessarily need to be followed for
using gnulib-tool
. They merely represent a set of good practices.
Following them will result in a good structure of your modules and in
consistency with gnulib.
• Source code files: | ||
• Header files: | ||
• Implementation files: | ||
• Specification: | ||
• Module description: | ||
• Autoconf macros: | ||
• Unit test modules: | ||
• Incompatible changes: |
Next: Header files, Up: Writing modules [Contents][Index]
Every API (C functions or variables) provided should be declared in a header file (.h file) and implemented in one or more implementation files (.c files). The separation has the effect that users of your module need to read only the contents of the .h file and the module description in order to understand what the module is about and how to use it—not the entire implementation. Furthermore, users of your module don’t need to repeat the declarations of the functions in their code, and are likely to receive notification through compiler errors if you make incompatible changes to the API (like, adding a parameter or changing the return type of a function).
Next: Implementation files, Previous: Source code files, Up: Writing modules [Contents][Index]
The .h file should declare the C functions and variables that the module provides.
The .h file should be stand-alone. That is, it does not require other .h files to be included before. Rather, it includes all necessary .h files by itself.
It is a tradition to use CPP tricks to avoid parsing the same header file more than once, which might cause warnings. The trick is to wrap the content of the header file (say, foo.h) in a block, as in:
#ifndef FOO_H # define FOO_H ... body of header file goes here ... #endif /* FOO_H */
Whether to use FOO_H
or _FOO_H
is a matter of taste and
style. The C99 and C11 standards reserve all identifiers that begin with an
underscore and either an uppercase letter or another underscore, for
any use. Thus, in theory, an application might not safely assume that
_FOO_H
has not already been defined by a library. On the other
hand, using FOO_H
will likely lead the higher risk of
collisions with other symbols (e.g., KEY_H
, XK_H
, BPF_H
,
which are CPP macro constants, or COFF_LONG_H
, which is a CPP
macro function). Your preference may depend on whether you consider
the header file under discussion as part of the application (which has
its own namespace for CPP symbols) or a supporting library (that
shouldn’t interfere with the application’s CPP symbol namespace).
Adapting C header files for use in C++ applications can use another CPP trick, as in:
# ifdef __cplusplus extern "C" { # endif ... body of header file goes here ... # ifdef __cplusplus } # endif
The idea here is that __cplusplus
is defined only by C++
implementations, which will wrap the header file in an ‘extern "C"’
block. Again, whether to use this trick is a matter of taste and
style. While the above can be seen as harmless, it could be argued
that the header file is written in C, and any C++ application using it
should explicitly use the ‘extern "C"’ block itself. Your
preference might depend on whether you consider the API exported by
your header file as something available for C programs only, or for C
and C++ programs alike.
Note that putting a #include
in an extern "C" { ... }
block yields a syntax error in C++ mode on some platforms (e.g., glibc
systems with g++ v3.3 to v4.2, AIX, OSF/1, IRIX). For this reason, it
is recommended to place the #include
before the extern
"C"
block.
Next: Specification, Previous: Header files, Up: Writing modules [Contents][Index]
The .c file or files implement the functions and variables declared in the .h file.
Every implementation file must start with ‘#include <config.h>’.
This is necessary for activating the preprocessor macros that are defined
on behalf of the Autoconf macros. Some of these preprocessor macros,
such as _GNU_SOURCE
, would have no effect if defined after a system
header file has already been included.
Then comes the ‘#include "..."’ specifying the header file that is being implemented. Putting this right after ‘#include <config.h>’ has the effect that it verifies that the header file is self-contained.
Then come the system and application headers. It is customary to put all the system headers before all application headers, so as to minimize the risk that a preprocessor macro defined in an application header confuses the system headers on some platforms.
In summary:
Next: Module description, Previous: Implementation files, Up: Writing modules [Contents][Index]
The specification of a function should answer at least the following questions:
Where to put the specification describing exported functions? Three practices are used in gnulib:
In any case, the specification should appear in just one place, unless you can ensure that the multiple copies will always remain identical.
The advantage of putting it in the header file is that the user only has to read the include file normally never needs to peek into the implementation file(s).
The advantage of putting it in the implementation file is that when reviewing or changing the implementation, you have both elements side by side.
The advantage of texinfo formatted documentation is that it is easily published in HTML or Info format.
Currently (as of 2010), half of gnulib uses the first practice, nearly half of gnulib uses the second practice, and a small minority uses the texinfo practice.
Next: Autoconf macros, Previous: Specification, Up: Writing modules [Contents][Index]
For the module description, you can start from an existing module’s description, or from a blank one: module/TEMPLATE for a normal module, or module/TEMPLATE-TESTS for a unit test module. Some more fields are possible but rarely used. Use module/TEMPLATE-EXTENDED if you want to use one of them.
Module descriptions have the following fields. Absent fields are equivalent to fields with empty contents.
This field should contain a concise description of the module’s functionality. One sentence is enough. For example, if it defines a single function ‘frob’, the description can be ‘frob() function: frobnication.’ Gnulib’s documentation generator will automatically convert the first part to a hyperlink when it has this form.
This field is either empty/absent, or contains the word ‘obsolete’. In
the latter case, gnulib-tool
will, unless the option
--with-obsolete
is given, omit it when it used as a dependency. It is
good practice to also notify the user about an obsolete module. This is done
by putting into the ‘Notice’ section (see below) text like
‘This module is obsolete.’
This field contains text that gnulib-tool
will show to the user
when the module is used. This can be a status indicator like
‘This module is obsolete.’ or additional advice. Do not abuse this
field.
This field is either empty/absent, or contains the word ‘all’. It
describes to which Makefile.am
the module is applied. By default,
a normal module is applied to source_base/Makefile.am
(normally lib/Makefile.am
), whereas a module ending in -tests
is applied to tests_base/Makefile.am
(normally
tests/Makefile.am
). If this field is ‘all’, it is applied to
both Makefile.am
s. This is useful for modules which provide
Makefile.am macros rather than compiled source code.
This field contains a newline separated list of the files that are part of
the module. gnulib-tool
copies these files into the package that
uses the module.
This list is typically ordered by importance: First comes the header file, then the implementation files, then other files.
It is possible to have the same file mentioned in multiple modules. That is, if the maintainers of that module agree on the purpose and future of said file.
This field contains a newline separated list of the modules that are required
for the proper working of this module. gnulib-tool
includes each
required module automatically, unless it is specified with option
--avoid
or it is marked as obsolete and the option
--with-obsolete
is not given.
A test modules foo-tests
implicitly depends on the corresponding non-test
module foo
. foo
implicitly depends on foo-tests
if the
latter exists and if the option --with-tests
has been given.
Tests modules can depend on non-tests modules. Non-tests modules should not depend on tests modules. (Recall that tests modules are built in a separate directory.)
Each listed required module may be declared a conditional dependency. This
is indicated by placing the condition for the dependency on the same line,
enclosed in brackets, after the name of the required module. The condition
is a shell expression that is run after the module’s configure.ac
statements. For example:
strtoull [test $ac_cv_func_strtoumax = no]
Lines starting with #
are recognized as comments and are ignored.
This field contains configure.ac stuff (Autoconf macro invocations and
shell statements) that are logically placed early in the configure.ac
file: right after the AC_PROG_CC
invocation. This section is adequate
for statements that modify CPPFLAGS
, as these can affect the results of
other Autoconf macros.
This field contains configure.ac stuff (Autoconf macro invocations and shell statements).
It is forbidden to add items to the CPPFLAGS
variable here, other than
temporarily, as these could affect the results of other Autoconf macros.
We avoid adding items to the LIBS
variable, other than temporarily.
Instead, the module can export an Autoconf-substituted variable that contains
link options. The user of the module can then decide to which executables
to apply which link options. Recall that a package can build executables of
different kinds and purposes; having all executables link against all
libraries is inappropriate.
If the statements in this section grow larger than a couple of lines, we
recommend moving them to a .m4
file of their own.
This field contains Makefile.am
statements. Variables like
lib_SOURCES
are transformed to match the name of the library
being built in that directory. For example, lib_SOURCES
may become
libgnu_a_SOURCES
(for a plain library) or libgnu_la_SOURCES
(for a libtool library). Therefore, the normal way of having an
implementation file lib/foo.c
compiled unconditionally is to write
lib_SOURCES += foo.c
This field contains the preprocessor statements that users of the module need to add to their source code files. Typically it’s a single include statement. A shorthand is allowed: You don’t need to write the word “#include”, just the name of the include file in the way it will appear in an include statement. Example:
"foo.h"
This field contains the set of libraries that are needed when linking
libraries or executables that use this module. Often this will be
written as a reference to a Makefile variable. Please write them
one per line, so that gnulib-tool
can remove duplicates
when presenting a summary to the user.
Example:
$(POW_LIBM) $(LTLIBICONV) when linking with libtool, $(LIBICONV) otherwise
This field specifies the license that governs the source code parts of this module. See Copyright for details.
This field specifies the persons who have a definitive say about proposed
changes to this module. You don’t need to mention email addresses here:
they can be inferred from the ChangeLog
file.
Please put at least one person here. We don’t like unmaintained modules.
Next: Unit test modules, Previous: Module description, Up: Writing modules [Contents][Index]
For a module foo
, an Autoconf macro file m4/foo.m4 is typically
created when the Autoconf macro invocations for the module are longer than
one or two lines.
The name of the main entry point into this Autoconf macro file is typically
gl_FOO
. For modules outside Gnulib that are not likely to be moved
into Gnulib, please use a prefix specific to your package: gt_
for
GNU gettext, cu_
for GNU coreutils, etc.
For modules that define a function foo
, the entry point is called
gl_FUNC_FOO
instead of gl_FOO
. For modules that provide a
header file with multiple functions, say foo.h
, the entry point is
called gl_FOO_H
or gl_HEADER_FOO_H
. This convention is useful
because sometimes a header and a function name coincide (for example,
fcntl
and fcntl.h
).
For modules that provide a replacement, it is useful to split the Autoconf
macro into two macro definitions: one that detects whether the replacement
is needed and requests the replacement using AC_LIBOBJ
(this is the
entry point, say gl_FUNC_FOO
), and one that arranges for the macros
needed by the replacement code lib/foo.c
(typically called
gl_PREREQ_FOO
). The reason of this separation is
lib/foo.c
, all you have to review
is the Depends-on
section of the module description and the
gl_PREREQ_FOO
macro in the Autoconf macro file.
Next: Incompatible changes, Previous: Autoconf macros, Up: Writing modules [Contents][Index]
A unit test that is a simple C program usually has a module description as simple as this:
Files: tests/test-foo.c tests/macros.h Depends-on: configure.ac: Makefile.am: TESTS += test-foo check_PROGRAMS += test-foo
The test program tests/test-foo.c often has the following structure:
ASSERT
macro.
The body of the test, then, contains many ASSERT
invocations. When
a test fails, the ASSERT
macro prints the line number of the failing
statement, thus giving you, the developer, an idea of which part of the test
failed, even when you don’t have access to the machine where the test failed
and the reporting user cannot run a debugger.
Sometimes it is convenient to write part of the test as a shell script. (For example, in areas related to process control or interprocess communication, or when different locales should be tried.) In these cases, the typical module description is like this:
Files: tests/test-foo.sh tests/test-foo.c tests/macros.h Depends-on: configure.ac: Makefile.am: TESTS += test-foo.sh TESTS_ENVIRONMENT += FOO_BAR='@FOO_BAR@' check_PROGRAMS += test-foo
Here, the TESTS_ENVIRONMENT
variable can be used to pass values
determined by configure
or by the Makefile
to the shell
script, as environment variables. The Autoconf values EXEEXT
and srcdir
are already provided as environment variables,
through an initial value of TESTS_ENVIRONMENT
that
gnulib-tool
puts in place.
Regardless of the specific form of the unit test, the following guidelines should be respected:
ASSERT
macro already does so.
fputs ("Skipping test: multithreading not enabled\n", stderr); return 77;
Such a message helps detecting bugs in the autoconf macros: A simple message ‘SKIP: test-foo’ does not sufficiently catch the attention of the user.
Previous: Unit test modules, Up: Writing modules [Contents][Index]
Incompatible changes to Gnulib modules should be mentioned in Gnulib’s NEWS file. Incompatible changes here mean that existing source code may not compile or work any more.
We don’t mean changes in the binary interface (ABI), since
Next: Miscellaneous Notes, Previous: Writing modules, Up: Top [Contents][Index]
Gnulib modules are intended to be suitable for widespread use. Most problems with Gnulib can and should be fixed in a generic way, so that all of Gnulib’s users can benefit from the change. But occasionally a problem arises that is difficult or undesirable to fix generically, or a project that uses Gnulib may need to work around an issue before the Gnulib maintainers commit a final fix. Maintainers may also want to add their own pools of modules to projects as Gnulib “staging areas.”
The obvious way to make local changes to Gnulib modules is to use
gnulib-tool
to check out pristine modules, then to modify
the results in-place. This works well enough for short-lived
experiments. It is harder to keep modified versions of Gnulib modules
for a long time, even though Git (or another distributed version
control systems) can help out a lot with this during the development
process.
Git, however, doesn’t address the distribution issue. When a package
“foobar” needs a modified version of, say, stdint.in.h, it
either has to put a comment into foobar/autogen.sh saying
“Attention! This doesn’t work with a pristine Gnulib, you need this
and that patch after checking out Gnulib,” or it has to use the
‘--avoid=stdint’ option and provide the modified stdint
module in a different directory.
The --local-dir option to gnulib-tool
solves this
problem. It allows the package to override or augment Gnulib. This
means:
gnulib-tool
option ‘--makefile-name’.)
In a release tarball, you can distribute the contents of this --local-dir directory that will be combinable with newer versions of Gnulib, barring incompatible changes to Gnulib.
If the ‘--local-dir=directory’ option is specified, then
gnulib-tool
looks in directory whenever it
reads a file from the Gnulib directory. Suppose gnulib-tool
is looking for file. Then:
gnulib-tool
uses the file from Gnulib after applying the diff
using the patch
program.
gnulib-tool
uses the file included in Gnulib.
Please make wise use of this option. It also allows you to easily hold back modifications you make to Gnulib macros in cases it may be better to share them.
Next: POSIX Substitutes Library, Previous: Extending Gnulib, Up: Top [Contents][Index]
• Out of memory handling: | ||
• Obsolete modules: | ||
• Extra tests modules: | ||
• Modules that modify the way other modules work: | ||
• A C++ namespace for gnulib: | A different way of using Gnulib in C++ | |
• Library version handling: | ||
• Windows sockets: | ||
• Libtool and Windows: | ||
• License Texinfo sources: | ||
• Build robot for gnulib: |
Next: Obsolete modules, Up: Miscellaneous Notes [Contents][Index]
The gnulib API does not have a standard error code for the out of memory error condition. Instead of adding a non-standard error code, gnulib has chosen to adopt a different strategy. Out of memory handling happens in rare situations, but performing the out of memory error handling after almost all API function invocations pollute your source code and might make it harder to spot more serious problems. The strategy chosen improves code readability and robustness.
For most applications, aborting the application with an error message when the out of memory situation occurs is the best that can be wished for. This is how the library behaves by default (using the ‘xalloc-die’ module).
However, we realize that some applications may not want to abort
execution in any situation. Gnulib supports a hook to let the
application regain control and perform its own cleanups when an out of
memory situation has occurred. The application can define a function
(having a void
prototype, i.e., no return value and no
parameters) and set the library variable
xalloc_die
to that function. The variable should be
declared as follows.
extern void (*xalloc_die) (void);
Gnulib will invoke this function if an out of memory error occurs. Note that the function should not return. Of course, care must be taken to not allocate more memory, as that will likely also fail.
Next: Extra tests modules, Previous: Out of memory handling, Up: Miscellaneous Notes [Contents][Index]
Modules can be marked obsolete. This means that the problems they fix
don’t occur any more on the platforms that are reasonable porting targets
now. gnulib-tool
warns when obsolete modules are mentioned on the
command line, and by default ignores dependencies from modules to obsolete
modules. When you pass the option --with-obsolete
to
gnulib-tool
, dependencies to obsolete modules will be included,
however, unless blocked through an --avoid
option. This option
is useful if your package should be portable even to very old platforms.
In order to mark a module obsolete, you need to add this to the module description:
Status: obsolete Notice: This module is obsolete.
Next: Modules that modify the way other modules work, Previous: Obsolete modules, Up: Miscellaneous Notes [Contents][Index]
Test modules can be marked with some special status attributes. When a
test module has such an attribute, gnulib-tool --import
will not
include it by default.
The supported status attributes are:
c++-test
Indicates that the test is testing C++ interoperability. Such a test is useful in a C++ or mixed C/C++ package, but is useless in a C package.
longrunning-test
Indicates that the test takes a long time to compile or execute (more than five minutes or so). Such a test is better avoided in a release that is made for the general public.
privileged-test
Indicates that the test will request special privileges, for example, ask for the superuser password. Such a test may hang when run non-interactively and is therefore better avoided in a release that is made for the general public.
unportable-test
Indicates that the test is known to fail on some systems, and that there is no workaround about it. Such a test is better avoided in a release that is made for the general public.
gnulib-tool --import --with-tests
will not include tests marked with
these attributes by default. When gnulib-tool
is invoked with one
of the options --with-c++-tests
, --with-longrunning-tests
,
--with-privileged-tests
, --with-unportable-tests
, it
will include tests despite the corresponding special status attribute.
When gnulib-tool
receives the option --with-all-tests
,
it will include all tests regardless of their status attributes.
gnulib-tool --create-testdir --with-tests
and
gnulib-tool --create-megatestdir --with-tests
by default include all
tests of modules specified on the command line, regardless of their status
attributes. Tests of modules occurring as dependencies are not included
by default if they have one of these status attributes. The options
--with-c++-tests
, --with-longrunning-tests
,
--with-privileged-tests
, --with-unportable-tests
are
recognized here as well. Additionally, gnulib-tool
also
understands the options --without-c++-tests
,
--without-longrunning-tests
, --without-privileged-tests
,
--without-unportable-tests
.
In order to mark a module with a status attribute, you need to add it to the module description, like this:
Status: longrunning-test
If only a part of a test deserves a particular status attribute, you
can split the module into a primary and a secondary test module,
say foo-tests
and foo-extra-tests
. Then add a dependency
from foo-tests
to foo-extra-tests
, and mark the
foo-extra-tests
with the particular status attribute.
Next: A C++ namespace for gnulib, Previous: Extra tests modules, Up: Miscellaneous Notes [Contents][Index]
The normal way to design modules is that each module has its own code, and the module dependencies provide the facilities on which this code can rely. But sometimes it is necessary to use more advanced techniques. For example:
n
against zero when you call malloc (n)
.
Be aware that these advanced techniques likely cause breakage in the
situation of multiple gnulib-tool
invocations in the scope of a
single configure
file. This is because the question “is module
B present?” does not have a unique answer in such situations.
gnulib-tool
has support for these techniques in the situation of
--create-testdir --single-configure
, which basically has two
gnulib-tool
invocations, one for a set of modules that end up in
gllib
, and one for the set of modules that end up in
gltests
. But you should be aware that this does not cover the
general situation.
Which technique to use, depends on the answer to the question: “If my
module occurs among the modules of gltests
, should it have an
effect on the modules in gllib
?”
If the answer is “no”, your module description should invoke the
Autoconf macro gl_MODULE_INDICATOR
. This Autoconf macro takes
one argument: the name of your module. The effect of
gl_MODULE_INDICATOR([my-module])
is to define, in
config.h
, a C macro GNULIB_MY_MODULE
that indicates
whether your macro is considered to be present. This works even when
your macro is used in gltests
: GNULIB_MY_MODULE
will then evaluate to 1 in gltests
but to 0 in gllib
.
If the answer is “yes”, you have two techniques available. The first
one is to invoke a similar Autoconf macro, named
gl_MODULE_INDICATOR_FOR_TESTS
. It works similarly. However,
when your macro is used in gltests
, GNULIB_MY_MODULE
will evaluate to 1 both in gltests
and in gllib
.
The second one is to define a shell variable in the configure
file that tells whether your module is present, through use of
m4_divert_text
. The Autoconf macros of a dependency module will
initialize this shell variable, through
‘m4_divert_text([DEFAULTS], [my_shell_var=no])’. The
Autoconf macros of your module will override this value, through
‘m4_divert_text([INIT_PREPARE], [my_shell_var=yes])’. Then
you can use my_shell_var
in the Autoconf macros of both
modules. You can find more details about this technique in the Gnulib
module getopt-gnu
.
Reminder: These techniques are advanced. They have the potential to cause lots of headaches if you apply them incorrectly.
Next: Library version handling, Previous: Modules that modify the way other modules work, Up: Miscellaneous Notes [Contents][Index]
The function definitions provided by Gnulib (.c
code) are meant
to be compiled by a C compiler. The header files (.h
files),
on the other hand, can be used in either C or C++.
By default, when used in a C++ compilation unit, the .h
files
declare the same symbols and overrides as in C mode, except that functions
defined by Gnulib or by the system are declared as ‘extern "C"’.
It is also possible to indicate to Gnulib to provide many of its symbols
in a dedicated C++ namespace. If you define the macro
GNULIB_NAMESPACE
to an identifier, many functions will be defined
in the namespace specified by the identifier instead of the global
namespace. For example, after you have defined
#define GNULIB_NAMESPACE gnulib
at the beginning of a compilation unit, Gnulib’s <fcntl.h>
header
file will make available the open
function as gnulib::open
.
The symbol open
will still refer to the system’s open
function,
with its platform specific bugs and limitations.
The symbols provided in the Gnulib namespace are those for which the
corresponding header file contains a _GL_CXXALIAS_RPL
or
_GL_CXXALIAS_SYS
macro invocation.
The benefits of this namespace mode are:
open
has to be overridden, Gnulib normally does
#define open rpl_open
. If your package has a class with a member
open
, for example a class foo
with a method foo::open
,
then if you define this member in a compilation unit that includes
<fcntl.h>
and use it in a compilation unit that does not include
<fcntl.h>
, or vice versa, you will get a link error. Worse: You
will not notice this problem on the platform where the system’s open
function works fine. This problem goes away in namespace mode.
gnulib::open
in your code, and you forgot to request the module
‘open’ from Gnulib, you will get a compilation error (regardless of
the platform).
The drawback of this namespace mode is that the system provided symbols in
the global namespace are still present, even when they contain bugs that
Gnulib fixes. For example, if you call open (...)
in your code,
it will invoke the possibly buggy system function, even if you have
requested the module ‘open’ from gnulib-tool.
You can turn on the namespace mode in some compilation units and keep it turned off in others. This can be useful if your package consists of an application layer that does not need to invoke POSIX functions and an operating system interface layer that contains all the OS function calls. In such a situation, you will want to turn on the namespace mode for the application layer—to avoid many preprocessor macro definitions—and turn it off for the OS interface layer—to avoid the drawback of the namespace mode, mentioned above.
Next: Windows sockets, Previous: A C++ namespace for gnulib, Up: Miscellaneous Notes [Contents][Index]
The module ‘check-version’ can be useful when your gnulib
application is a system library. You will typically wrap the call to
the check_version
function through a library API, your library
header file may contain:
#define STRINGPREP_VERSION "0.5.18" ... extern const char *stringprep_check_version (const char *req_version);
To avoid ELF symbol collisions with other libraries that use the ‘check-version’ module, add to config.h through a AC_DEFINE something like:
AC_DEFINE(check_version, stringprep_check_version, [Rename check_version.])
The stringprep_check_version
function will thus be implemented
by the check_version
module.
There are two uses of the interface. The first is a way to provide for applications to find out the version number of the library it uses. The application may contain diagnostic code such as:
printf ("Stringprep version: header %s library %s", STRINGPREP_VERSION, stringprep_check_version (NULL));
Separating the library and header file version can be useful when searching for version mismatch related problems.
The second uses is as a rudimentary test of proper library version, by making sure the application get a library version that is the same, or newer, than the header file used when building the application. This doesn’t catch all problems, libraries may change backwards incompatibly in later versions, but enable applications to require a certain minimum version before it may proceed.
Typical uses look like:
/* Check version of libgcrypt. */ if (!gcry_check_version (GCRYPT_VERSION)) die ("version mismatch\n");
Next: Libtool and Windows, Previous: Library version handling, Up: Miscellaneous Notes [Contents][Index]
There are several issues when building applications that should work under Windows. The most problematic part is for applications that use sockets.
Hopefully, we can add helpful notes to this section that will help you port your application to Windows using gnulib.
This was written for the getaddrinfo module, but may be applicable to other functions too.
The getaddrinfo function exists in ws2tcpip.h and -lws2_32 on Windows
XP. The function declaration is present if WINVER >= 0x0501
.
Windows 2000 does not have getaddrinfo in its WS2_32.DLL.
Thus, if you want to assume Windows XP or later, you can add AC_DEFINE(WINVER, 0x0501) to avoid compiling the (partial) getaddrinfo implementation.
If you want to support Windows 2000, don’t do anything. The replacement function will open WS2_32.DLL during run-time to see if there is a getaddrinfo function available, and use it when available.
Next: License Texinfo sources, Previous: Windows sockets, Up: Miscellaneous Notes [Contents][Index]
If you want it to be possible to cross-compile your program to MinGW
and you use Libtool, you need to use the win32-dll
option of
LT_INIT
. In other words, put:
LT_INIT([win32-dll])
in your configure.ac. This sets the correct names for the
OBJDUMP
, DLLTOOL
, and AS
tools for the build.
If you are building a library, you will also need to pass
-no-undefined
to make sure Libtool produces a DLL for your
library. From a Makefile.am:
libgsasl_la_LDFLAGS += -no-undefined
Next: Build robot for gnulib, Previous: Libtool and Windows, Up: Miscellaneous Notes [Contents][Index]
Gnulib provides copies of the GNU GPL, GNU LGPL, and GNU FDL licenses
in Texinfo form. (The master location is
http://www.gnu.org/licenses/). These Texinfo documents do not
have any node names and structures built into them; for your manual,
you should @include
them in an appropriate @node
.
The conventional name for the GPL node is ‘Copying’ and for the FDL ‘GNU Free Documentation License’. The LGPL doesn’t seem to have a conventional node name.
Of course the license texts themselves should not be changed at all.
Previous: License Texinfo sources, Up: Miscellaneous Notes [Contents][Index]
To simplify testing on a wide set of platforms, gnulib is built on many platforms every day and the results are uploaded to:
http://autobuild.josefsson.org/gnulib/
If you wish to help the gnulib development effort with build logs for your favorite platform, you may perform these steps:
On a machine with GNU development tools installed and with a gnulib git checkout, use
gnulib-tool --create-megatestdir --with-tests --dir=...
Note: The created directory uses ca. 512 MB on disk.
Transfer this directory to a build machine (HP-UX, Cygwin, or whatever). Often it is easier to transfer one file, and this can be achieved by running, inside the directory the following commands:
./configure make dist
And then transferring the dummy-0.tar.gz file.
On the build machine, run ./do-autobuild (or "nohup ./do-autobuild"). It creates a directory logs/ with a log file for each module.
Submit each log file to Simon’s site, either through a
mail `echo gnulib__at__autobuild.josefsson.org | sed -e s/__at__/@/`
or through netcat
autobuild-submit logs/*
Next: Header File Substitutes, Previous: Miscellaneous Notes, Up: Top [Contents][Index]
This section shows a radically different way to use Gnulib.
You can extract the ISO C / POSIX substitutes part of gnulib by running the command
gnulib-tool --create-testdir --source-base=lib \ --dir=/tmp/posixlib `posix-modules`
The command ‘posix-modules’ is found in the same directory as
gnulib-tool
.
The resulting directory can be built on a particular platform,
independently of the program being ported. Then you can configure and
build any program, by setting CPPFLAGS
and LDFLAGS
at
configure time accordingly: set CPPFLAGS="-I.../posixlib/lib"
, plus
any essential type definitions and flags that you find in
.../posixlib/config.h
, and set
LDFLAGS=".../posixlib/lib/libgnu.a"
.
This way of using Gnulib is useful when you don’t want to modify the program’s
source code, or when the program uses a mix between C and C++ sources
(requiring separate builds of the posixlib
for the C compiler and
for the C++ compiler).
Next: Function Substitutes, Previous: POSIX Substitutes Library, Up: Top [Contents][Index]
This chapter describes which header files specified by ISO C or POSIX are substituted by Gnulib, which portability pitfalls are fixed by Gnulib, and which (known) portability problems are not worked around by Gnulib.
The notation “Gnulib module: —” means that Gnulib does not provide a
module providing a substitute for the header file. When the list
“Portability problems not fixed by Gnulib” is empty, such a module is
not needed: No portability problems are known. Otherwise, it indicates
that such a module would be useful but is not available: No one so far
found this header file important enough to contribute a substitute for it.
If you need this particular header file, you may write to
<bug-gnulib at gnu dot org>
.
Next: arpa/inet.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/aio.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: assert.h, Previous: aio.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/arpa_inet.h.html
Gnulib module: arpa_inet
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: complex.h, Previous: arpa/inet.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html
Gnulib module: assert-h
See also the Gnulib module assert
.
Portability problems fixed by Gnulib:
static_assert
, and the C11
_Static_assert
, are not supported by many platforms.
For example, GCC versions before 4.6.0 do not support _Static_assert
,
and G++ versions through at least 4.6.0 do not support static_assert
.
Portability problems not fixed by Gnulib:
_Static_assert
and C++11 static_assert
are keywords that can be used without including <assert.h>
.
The Gnulib substitutes are macros that require including <assert.h>
.
static_assert
and _Static_assert
can also
be used within a struct
or union
specifier, in place of
an ordinary declaration of a member of the struct or union. The
Gnulib substitute can be used only as an ordinary declaration.
assert
can be applied to any scalar expression.
In C89, the argument to assert
is of type int
.
Next: cpio.h, Previous: assert.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/complex.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctype.h, Previous: complex.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/cpio.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dirent.h, Previous: cpio.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html
Gnulib module: ctype
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dlfcn.h, Previous: ctype.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
Gnulib module: dirent
Portability problems fixed by Gnulib:
ino_t
is missing on some platforms:
glibc 2.8 and others.
Portability problems not fixed by Gnulib:
Next: errno.h, Previous: dirent.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fcntl.h, Previous: dlfcn.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
Gnulib module: errno
Portability problems fixed by Gnulib:
EOVERFLOW
, ENOLINK
, EMULTIHOP
are not defined
on some platforms:
OpenBSD 4.0, OSF/1 5.1, mingw, MSVC 9.
ECANCELED
is not defined on some platforms:
OpenBSD 4.0, Cygwin, mingw, MSVC 9.
ENOMSG
, EIDRM
, EPROTO
, EBADMSG
,
ENOTSUP
are not defined on some platforms:
OpenBSD 4.0, mingw, MSVC 9.
ESTALE
is not defined on some platforms:
mingw, MSVC 9, Interix 3.5.
EDQUOT
is not defined on some platforms:
NonStop Kernel, mingw, MSVC 9.
ENETRESET
, ECONNABORTED
are not defined on some
platforms:
Minix 3.1.8, mingw, MSVC 9.
EWOULDBLOCK
, ETXTBSY
, ELOOP
, ENOTSOCK
,
EDESTADDRREQ
, EMSGSIZE
, EPROTOTYPE
, ENOPROTOOPT
,
EPROTONOSUPPORT
, EOPNOTSUPP
, EAFNOSUPPORT
,
EADDRINUSE
, EADDRNOTAVAIL
, ENETDOWN
, ENETUNREACH
,
ECONNRESET
, ENOBUFS
, EISCONN
, ENOTCONN
,
ETIMEDOUT
, ECONNREFUSED
, EHOSTUNREACH
, EALREADY
,
EINPROGRESS
are not defined on some platforms:
mingw, MSVC 9.
EOWNERDEAD
, ENOTRECOVERABLE
are not defined on
some platforms:
glibc/Linux 2.3.6, glibc/Hurd 2.15, glibc/kFreeBSD 2.15,
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw without pthreads-win32, MSVC 9, Interix 3.5, BeOS.
EILSEQ
is not defined on some platforms:
LynxOS 178 2.2.2.
Portability problems not fixed by Gnulib:
Next: fenv.h, Previous: errno.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
Gnulib module: fcntl-h
Portability problems fixed by Gnulib:
pid_t
is not defined on some platforms:
MSVC 9.
mode_t
is not defined on some platforms:
MSVC 9.
int
on some platforms:
AIX 7.1 with XL C 12.1.
int
on some
platforms:
Solaris 11 2011-11.
Portability problems not fixed by Gnulib:
Next: float.h, Previous: fcntl.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmtmsg.h, Previous: fenv.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/float.h.html
Gnulib module: float
Portability problems fixed by Gnulib:
int
to long double
in incorrect on some
platforms:
glibc 2.7 on Linux/SPARC64.
LDBL_*
macros are incorrect on some platforms:
On OpenBSD 4.0, MirBSD 10, and BeOS, they are the same as the values of the
DBL_*
macros, although ‘long double’ is a larger type than
‘double’.
On FreeBSD/x86 6.4, they represent the incorrect 53-bit precision assumptions
in the compiler, not the real 64-bit precision at runtime.
On Linux/PowerPC with GCC 4.4, on AIX 7.1 with GCC 4.2, and on IRIX 6.5,
they don’t reflect the “double double” representation of long double
correctly.
Portability problems not fixed by Gnulib:
FLT_ROUNDS
is a constant expression and does not represent
the current rounding mode on some platforms:
glibc 2.11, HP-UX 11, mingw.
Next: fnmatch.h, Previous: float.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/fmtmsg.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ftw.h, Previous: fmtmsg.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/fnmatch.h.html
Gnulib module: fnmatch-posix or fnmatch-gnu
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: glob.h, Previous: fnmatch.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/ftw.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: grp.h, Previous: ftw.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/glob.h.html
Gnulib module: glob
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: iconv.h, Previous: glob.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/grp.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: inttypes.h, Previous: grp.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/iconv.h.html
Gnulib module: iconv
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: iso646.h, Previous: iconv.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html
Gnulib module: inttypes
Portability problems fixed by Gnulib:
imaxabs
and imaxdiv
are missing on some
platforms:
NetBSD 3.0, OpenBSD 3.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, BeOS.
strtoimax
and strtoumax
are missing on some
platforms:
OpenBSD 3.8, AIX 4.3.2, AIX 5.1 (missing only strtoumax
), OSF/1 5.1.
__STDC_FORMAT_MACROS
to make visible the declarations of format
macros such as PRIdMAX
.
Portability problems not fixed by Gnulib:
Next: langinfo.h, Previous: inttypes.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/iso646.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: libgen.h, Previous: iso646.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html
Gnulib module: langinfo
Portability problems fixed by Gnulib:
CODESET
is not defined on some platforms:
glibc 2.0.6, OpenBSD 3.8.
ERA
, ERA_D_FMT
, ERA_D_T_FMT
,
ERA_T_FMT
, ALT_DIGITS
are not defined on some platforms:
OpenBSD 3.8.
T_FMT_AMPM
, YESEXPR
, NOEXPR
are not
defined on some platforms:
IRIX 5.3.
Portability problems not fixed by Gnulib:
Next: limits.h, Previous: langinfo.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/libgen.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
The Gnulib module dirname
provides similar API, with functions
base_name
and dir_name
that also work with Windows file names.
Next: locale.h, Previous: libgen.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
Gnulib module: gethostname
Portability problems fixed by Gnulib:
HOST_NAME_MAX
macro is not defined on some platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
CHAR_WIDTH
are not defined on some platforms:
glibc 2.24, many others.
Portability problems not fixed by Gnulib:
LLONG_MIN
, LLONG_MAX
, ULLONG_MAX
are not
defined on some platforms:
AIX 5.1, HP-UX 11, IRIX 6.5, OpenVMS, OSF/1 5.1 with gcc.
WORD_BIT
, LONG_BIT
are not defined on some platforms:
glibc 2.11 without -D_GNU_SOURCE
, Cygwin, mingw, MSVC 9.
SSIZE_MAX
has the wrong type,
albeit with the correct value:
32-bit glibc 2.24 (on some architectures), Cygwin 2.5.2.
SSIZE_MAX
is not defined on some platforms:
MSVC 9.
For PATH_MAX
, Gnulib provides a module pathmax
with a header
file "pathmax.h"
. It defines PATH_MAX
to a constant on
platforms with a file name length limit.
Next: math.h, Previous: limits.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html
Gnulib module: locale
Portability problems fixed by Gnulib:
locale_t
type is not defined on some platforms:
glibc 2.11, Mac OS X 10.5.
struct lconv
type does not contain any members on some platforms:
Android.
struct lconv
type does not contain the members
int_p_cs_precedes
, int_p_sign_posn
, int_p_sep_by_space
,
int_n_cs_precedes
, int_n_sign_posn
, int_n_sep_by_space
on some platforms:
glibc, OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
Next: monetary.h, Previous: locale.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html
Gnulib module: math
Portability problems fixed by Gnulib:
int
to long double
in incorrect on some
platforms:
glibc 2.7 on Linux/SPARC64.
NAN
is not defined on some platforms:
OpenBSD 4.0, AIX 5.1, IRIX 6.5, OSF/1 5.1.
NAN
is not exposed outside of C99 compilation on some
platforms:
glibc.
NAN
and HUGE_VAL
expand to a function address
rather than a floating point constant on some platforms:
Solaris 10.
HUGE_VALF
and HUGE_VALL
are not defined on some
platforms:
glibc/HPPA, glibc/SPARC, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
FP_ILOGB0
and FP_ILOGBNAN
are not defined on some
platforms:
NetBSD 5.1, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
Portability problems not fixed by Gnulib:
NAN
is not a compile time constant with some compilers:
OSF/1 with Compaq (ex-DEC) C 6.4.
math_errhandling
is not defined on some platforms:
glibc 2.11, OpenBSD 4.9, NetBSD 5.1, UP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.7.9, mingw, MSVC 9.
Next: mqueue.h, Previous: math.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/monetary.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ndbm.h, Previous: monetary.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: net/if.h, Previous: mqueue.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/ndbm.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: netdb.h, Previous: ndbm.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html
Gnulib module: net_if
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: netinet/in.h, Previous: net/if.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/netdb.h.html
Gnulib module: netdb
Portability problems fixed by Gnulib:
socklen_t
on some platforms:
HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
AI_ALL
, AI_V4MAPPED
,
AI_ADDRCONFIG
on some platforms:
NetBSD 5.0.
Portability problems not fixed by Gnulib:
Next: netinet/tcp.h, Previous: netdb.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
Gnulib module: netinet_in
Portability problems fixed by Gnulib:
<sys/types.h>
to be included first):
OpenBSD 4.6.
Portability problems not fixed by Gnulib:
Next: nl_types.h, Previous: netinet/in.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/netinet_tcp.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: poll.h, Previous: netinet/tcp.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: pthread.h, Previous: nl_types.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html
Gnulib module: poll-h
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
nfds_t
on some platforms:
IRIX 5.3.
Next: pwd.h, Previous: poll.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html
Gnulib module: pthread
Portability problems fixed by Gnulib:
strtok_r
and
gmtime_r
:
mingw 3.0.
Portability problems not fixed by Gnulib:
Next: regex.h, Previous: pthread.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/pwd.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sched.h, Previous: pwd.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html
Gnulib module: regex
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
<sys/types.h>
to be included first.
Next: search.h, Previous: regex.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html
Gnulib module: sched
Portability problems fixed by Gnulib:
pid_t
on some platforms:
glibc 2.11, Mac OS X 10.5.
struct sched_param
is not defined on some platforms:
Haiku.
SCHED_FIFO
, SCHED_RR
, SCHED_OTHER
are not defined on
some platforms:
Haiku.
Portability problems not fixed by Gnulib:
Next: semaphore.h, Previous: sched.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/search.h.html
Gnulib module: search
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: setjmp.h, Previous: search.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/semaphore.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: signal.h, Previous: semaphore.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/setjmp.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: spawn.h, Previous: setjmp.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html
Gnulib module: signal-h
Portability problems fixed by Gnulib:
volatile sig_atomic_t
is rejected by older compilers on some
platforms:
AIX.
sigset_t
is missing on some platforms:
MSVC 9.
sigset_t
is only declared in <sys/types.h> on some platforms:
mingw.
struct sigaction
and siginfo_t
are missing on some
platforms:
mingw, MSVC 9.
struct sigaction
lacks the sa_sigaction
member on some
platforms:
Irix 5.3, Interix 3.5.
pid_t
is not defined on some platforms:
MSVC 9.
SIGPIPE
is not defined on some platforms:
mingw, MSVC 9.
SA_NODEFER
is not defined on some platforms:
Interix 3.5.
SA_RESETHAND
and SA_RESTART
are not defined
on some platforms:
NonStop.
sighandler_t
(a GNU extension) is not defined on most non-glibc
platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
Portability problems not fixed by Gnulib:
SIGRTMIN
and SIGRTMAX
expand to an expression of type
long
instead of int
on some platforms:
OSF/1 5.1.
SIGBUS
is set to the same value as SIGSEGV
,
rather than being a distinct signal, on some platforms:
Haiku.
Next: stdalign.h, Previous: signal.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html
Gnulib module: spawn
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: stdarg.h, Previous: spawn.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
Not in POSIX yet, but we expect it will be.
ISO C11 (latest free draft
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf)
sections 6.5.3.4, 6.7.5, 7.15.
C++11 (latest free draft
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf)
section 18.10.
Gnulib module: stdalign
Portability problems fixed by Gnulib:
<stdalign.h>
does not define alignof
/_Alignof
.
alignof
and _Alignof
macros return too large values for
the types double
and long long
in GCC 4.7.0.
Portability problems not fixed by Gnulib:
alignof
/_Alignof
must be a
parenthesized type. Recent versions of GCC support an extension in
which the operand can also be a unary expression, as with
sizeof
. The Gnulib substitute does not support this extension.
alignof
/_Alignof
cannot be a structure type containing a
flexible array member.
_Alignas
and alignas
are not always supported;
on platforms lacking support, the
macro __alignas_is_defined
is not defined.
Supported compilers include GCC, IBM C, Sun C 5.9 and later,
and MSVC 7.0 and later.
alignas
/_Alignas
of auto
variables (i.e.,
variables on the stack). They diagnose and ignore the alignment: Sun
C 5.11.
_Alignas
/alignas
that are greater than 8: mingw.
_Alignas
/alignas
to be a single integer constant, not an expression: MSVC 7.0 through
at least 10.0.
_Alignas
/alignas
. This compiler bug causes the Gnulib
module stdalign-tests
to fail. The Sun Studio Developer Bug
Report Review Team assigned the internal review ID 2125432 (dated
2011-11-01) to this issue.
<stdalign.h>
must be #included before _Alignas
and
_Alignof
can be used.
_Alignas
and _Alignof
are reserved words;
they might be macros.
Next: stdbool.h, Previous: stdalign.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdarg.h.html
Gnulib module: stdarg
Portability problems fixed by Gnulib:
va_copy
to work.
Portability problems not fixed by Gnulib:
Next: stddef.h, Previous: stdarg.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdbool.h.html
Gnulib module: stdbool
Portability problems fixed by Gnulib:
true
incorrectly on some platforms:
OpenBSD 4.7 with gcc 2.95.
Portability problems not fixed by Gnulib:
<stdbool.h>
is included, or if
the program is intended to be compiled by a C++ compiler.
_Bool
is a typedef; it might be a macro.
Next: stdint.h, Previous: stdbool.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html
Gnulib module: stddef
Portability problems fixed by Gnulib:
max_align_t
, which was added in C11.
wchar_t
.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
offsetof
macro that cannot be used in
arbitrary expressions:
Solaris 11 2011-11
This problem can be worked around by parenthesizing the
offsetof
expression in the unlikely case you use it with
sizeof
or ‘[]’.
Next: stdio.h, Previous: stddef.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html
Gnulib module: stdint
Portability problems fixed by Gnulib:
SIG_ATOMIC_MIN
and SIG_ATOMIC_MAX
are incorrect
on some platforms:
FreeBSD 6.2 / ia64.
WINT_MAX
is incorrect on some platforms:
mingw.
INT8_MAX
, UINT8_MAX
etc. are not usable in
preprocessor expressions on some platforms:
HP-UX 11.23.
INTPTR_MAX
and UINTPTR_MAX
, although correctly
defined in <stdint.h>
, are replaced by empty values when
<limits.h>
or <inttypes.h>
gets included later on some platforms:
Solaris 9 with GCC 4.5 or newer.
WCHAR_MIN
and WCHAR_MAX
are not defined in
<stdint.h>
(only in <wchar.h>
) on some platforms:
Dragonfly, BSDI.
__STDC_CONSTANT_MACROS
to make visible the definitions of
constant macros such as INTMAX_C
, and one must define
__STDC_LIMIT_MACROS
to make visible the definitions of limit
macros such as INTMAX_MAX
.
SIZE_MAX
has the wrong type,
albeit with the correct value:
32-bit glibc 2.24 (on s390 architecture), Mac OS X 10.7.
INTMAX_WIDTH
are not defined on some platforms:
glibc 2.24, many others.
Portability problems not fixed by Gnulib:
{uint,int}_fast{8,16,32,64}_t
may not correspond to the fastest
types available on the system.
Other <stdint.h>
substitutes may define these types differently,
so public header files should avoid these types.
long int
.
For example, as of 2007, Sun C mishandles #if LLONG_MIN < 0
on
a platform with 32-bit long int
and 64-bit long long int
.
Some older preprocessors mishandle constants ending in LL
.
To work around these problems, compute the value of expressions like
LONG_MAX < LLONG_MAX
at configure
-time rather than at
#if
-time.
The stdint.h module uses #include_next
. If you wish to install
the generated stdint.h file under another name, typically in order to
be able to use some of the types defined by stdint.h in your public
header file, you could use the following Makefile.am-snippet:
BUILT_SOURCES += idn-int.h DISTCLEANFILES += idn-int.h nodist_include_HEADERS += idn-int.h idn-int.h: if test -n "$(STDINT_H)"; then \ sed -e s/include_next/include/ gl/stdint.h > idn-int.h; \ else \ echo '#include <stdint.h>' > idn-int.h; \ fi
Next: stdlib.h, Previous: stdint.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
Gnulib module: stdio
Portability problems fixed by Gnulib:
off_t
is missing on some platforms:
glibc 2.8, eglibc 2.11.2 and others.
ssize_t
is missing on some platforms:
glibc 2.8, Mac OS X 10.5, Solaris 10, MSVC 9, and others.
va_list
is missing on some platforms:
glibc 2.8, OpenBSD 4.0, Solaris 11 2011-11, and others.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
Next: stdnoreturn.h, Previous: stdio.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html
Gnulib module: stdlib, system-posix
Portability problems fixed by the Gnulib module stdlib
:
EXIT_SUCCESS
and EXIT_FAILURE
are not defined on
some platforms.
EXIT_FAILURE
is incorrectly defined on Tandem/NSK.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems fixed by the Gnulib module system-posix
:
WIFSIGNALED
, WIFEXITED
, WIFSTOPPED
,
WTERMSIG
, WEXITSTATUS
, WNOHANG
, WUNTRACED
,
WSTOPSIG
are not defined in this header file (only in
<sys/wait.h>
) on some platforms:
MirBSD 10.
Portability problems not fixed by Gnulib:
WEXITSTATUS
require an lvalue
argument on some platforms.
Mac OS X 10.5.
Next: string.h, Previous: stdlib.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
Not in POSIX yet, but we expect it will be.
ISO C11 (latest free draft
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf)
sections 7.23.
Gnulib module: stdnoreturn
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
<stdnoreturn.h>
should be #included before ‘_Noreturn’ is used.
_Noreturn
is a reserved word;
it might be a macro.
lint
is defined, standard headers define
_Noreturn
(and therefore noreturn
) to be a macro that
expands to the empty token sequence on some platforms:
Cygwin 2.5.1, FreeBSD 10.3.
noreturn
expands to the empty token sequence, to avoid
problems with standard headers that use __declspec (noreturn)
directly. Although the resulting code operates correctly, the
compiler is not informed whether noreturn
functions do not
return, so it may generate incorrect warnings at compile-time, or code
that is slightly less optimized. This problem does not occur with
_Noreturn
.
-Werror=old-style-declaration
requires _Noreturn
or noreturn
before the returned type
in a declaration, and therefore rejects valid but unusually-worded
declarations such as void _Noreturn foo (void);
.
Next: strings.h, Previous: stdnoreturn.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html
Gnulib module: string
Portability problems fixed by Gnulib:
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
Next: stropts.h, Previous: string.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html
Gnulib module: strings
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/ipc.h, Previous: strings.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/mman.h, Previous: stropts.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/msg.h, Previous: sys/ipc.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_mman.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/resource.h, Previous: sys/mman.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_msg.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/select.h, Previous: sys/msg.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_resource.h.html
Gnulib module: sys_resource
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
RLIM_SAVED_CUR
or RLIM_SAVED_MAX
.
Next: sys/sem.h, Previous: sys/resource.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html
Gnulib module: sys_select
Portability problems fixed by Gnulib:
<sys/types.h>
to be included first.
struct timeval
on some platforms:
OSF/1 4.0.
<string.h>
before FD_ZERO
can be used—on some platforms:
AIX 7.1, Solaris 11 2011-11.
Portability problems not fixed by Gnulib:
Next: sys/shm.h, Previous: sys/select.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_sem.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/socket.h, Previous: sys/sem.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_shm.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/stat.h, Previous: sys/shm.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
Gnulib module: sys_socket
Portability problems fixed by Gnulib:
<sys/types.h>
to be included first.
socklen_t
on some platforms:
HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
struct iovec
on some platforms:
OpenBSD 4.4.
SHUT_RD
, SHUT_WR
,
SHUT_RDWR
macros on some platforms, despite having the shutdown
functions:
emx+gcc.
struct sockaddr_storage
type does not have a member ss_family
on some platforms:
AIX 7.1.
Portability problems not fixed by Gnulib:
msg_control
and
msg_controllen
members of struct msghdr
on some
platforms. This can be detected by the absence of the
CMSG_FIRSTHDR
macro:
gnulib replacement header, old BSD
Next: sys/statvfs.h, Previous: sys/socket.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
Gnulib module: sys_stat
Portability problems fixed by Gnulib:
mode_t
is not defined on some platforms:
MSVC 9.
S_IFMT
or S_IFIFO
, are missing on some
platforms.
S_ISBLK
, S_ISCHR
, S_ISDIR
, S_ISFIFO
,
S_ISLNK
, S_ISREG
, S_ISSOCK
are broken on some platforms.
S_ISDOOR
, that are not defined
on other platforms.
lstat
and mkdir
are not declared on some platforms:
mingw, MSVC 9.
UTIME_NOW
and UTIME_OMIT
are missing on some
platforms.
struct stat
does not include st_atim
,
st_mtim
, or st_ctim
members. Use the gnulib module
‘stat-time’ for accessors to portably get at subsecond resolution.
Portability problems not fixed by Gnulib:
S_IFBLK
is missing on some platforms:
MSVC 9.
st_ino
is always 0.
st_ino
is an array of three ino_t
values,
not a single value.
st_ino
and use the Gnulib same-inode
module to
compare nonzero values. For example, SAME_INODE (a, b)
is true if the struct stat
values a
and
b
are known to represent the same file, (a.st_ino &&
!SAME_INODE (a, b))
is true if they are known to represent different
files, and !a.st_ino
is true if it is not known whether they
represent different files.
st_dev
and st_ino
values, even when st_ino
is nonzero:
st_dev
exceeds 255, or if a local
st_ino
exceeds 16777215.
One partial workaround is to compare other file metadata such as
st_mode
and st_mtime
to detect this bug, but this
approach does not work on files whose metadata are being changed by
other programs.
st_size
contains bogus information for
symlinks; use the Gnulib module areadlink-with-size
for a
better way to get symlink contents.
Next: sys/time.h, Previous: sys/stat.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_statvfs.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/timeb.h, Previous: sys/statvfs.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html
Gnulib module: sys_time
Portability problems fixed by Gnulib:
tv_sec
type that is
narrower than time_t
on some native Windows platforms:
mingw64 in 64-bit mode,
mingw64 in 32-bit mode when __MINGW_USE_VC2005_COMPAT
is defined,
MSVC 9 in 64-bit mode,
MSVC 9 in 32-bit mode when _USE_32BIT_TIME_T
is not defined.
Portability problems not fixed by Gnulib:
tv_sec
type that is
wider than time_t
:
OpenBSD 5.1 in 64-bit mode.
Next: sys/times.h, Previous: sys/time.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/susv3xbd/sys/timeb.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/types.h, Previous: sys/timeb.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_times.h.html
Gnulib module: sys_times
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/uio.h, Previous: sys/times.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
Gnulib module: sys_types
Portability problems fixed by Gnulib:
pid_t
is not defined on some platforms:
MSVC 9.
size_t
is not defined in this file on some platforms:
MSVC 9.
ssize_t
is not defined on some platforms:
MSVC 9.
mode_t
is not defined on some platforms:
MSVC 9.
major
, minor
, and
makedev
through this header; however, when
sys/sysmacros.h exists, that file should also be included to
avoid deprecation warnings from the versions in this header:
glibc 2.25.
Portability problems not fixed by Gnulib:
blksize_t
and suseconds_t
are signed integer types that are wider than long
:
glibc x32
This module, together with the module largefile
, also defines the type
off_t
to a 64-bit integer type on some platforms:
mingw (except mingw64), MSVC 9.
Next: sys/un.h, Previous: sys/types.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html
Gnulib module: sys_uio
Portability problems fixed by Gnulib:
<sys/types.h>
to be
included first) on some platforms:
OpenBSD 4.4.
Portability problems not fixed by Gnulib:
Next: sys/utsname.h, Previous: sys/uio.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_un.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: sys/wait.h, Previous: sys/un.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_utsname.h.html
Gnulib module: sys_utsname
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: syslog.h, Previous: sys/utsname.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
Gnulib module: sys_wait
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
WEXITSTATUS
require an lvalue
argument on some platforms.
Mac OS X 10.5.
Next: tar.h, Previous: sys/wait.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/syslog.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: termios.h, Previous: syslog.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/tar.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: tgmath.h, Previous: tar.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
Gnulib module: termios
Portability problems fixed by Gnulib:
pid_t
on all platforms:
glibc on some architectures, FreeBSD 6.4, OpenBSD 4.9, Cygwin 1.7.11.
Portability problems not fixed by Gnulib:
struct termios
, cc_t
, speed_t
, tcflag_t
are not defined on some platforms:
mingw, MSVC 9.
Next: time.h, Previous: termios.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/tgmath.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: trace.h, Previous: tgmath.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
Gnulib module: time
Portability problems fixed by Gnulib:
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
tv_nsec
member of struct timespec
is not of type long
, but is of type long long
instead:
glibc x32
Next: uchar.h, Previous: time.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/trace.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ucontext.h, Previous: trace.h, Up: Header File Substitutes [Contents][Index]
Defines the types char16_t
, char32_t
and declares the
functions mbrtoc16
, c16rtomb
, mbrtoc32
,
c32rtomb
.
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ulimit.h, Previous: uchar.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/susv3xbd/ucontext.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: unistd.h, Previous: ucontext.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/ulimit.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: utime.h, Previous: ulimit.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html
Gnulib module: unistd
Portability problems fixed by Gnulib:
_exit
function is not declared in this file on some platforms:
mingw.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
Next: utmpx.h, Previous: unistd.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/utime.h.html
Gnulib module: utime-h
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: wchar.h, Previous: utime.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/utmpx.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: wctype.h, Previous: utmpx.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html
Gnulib module: wchar
Portability problems fixed by Gnulib:
wint_t
and macro WEOF
are missing on some platforms:
IRIX 5.3.
wint_t
is incorrect on some platforms:
MSVC 9.
NULL
macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
Portability problems not fixed by Gnulib:
Next: wordexp.h, Previous: wchar.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html
Gnulib module: wctype-h
Portability problems fixed by Gnulib:
wint_t
and macro WEOF
are missing on some platforms:
IRIX 5.3.
wint_t
is incorrect on some platforms:
MSVC 9.
isw*
are missing on some platforms:
FreeBSD 4.11.
iswblank
is declared but not defined on some platforms:
IRIX 6.5.30.
isw*
are actually defined as macros that don’t work,
on IRIX 5.3.
multibyte
, as macros
on some platforms:
Solaris 2.6.
Portability problems not fixed by Gnulib:
Previous: wctype.h, Up: Header File Substitutes [Contents][Index]
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/basedefs/wordexp.h.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: Legacy Function Substitutes, Previous: Header File Substitutes, Up: Top [Contents][Index]
This chapter describes which functions and function-like macros specified by ISO C or POSIX are substituted by Gnulib, which portability pitfalls are fixed by Gnulib, and which (known) portability problems are not worked around by Gnulib.
The notation “Gnulib module: —” means that Gnulib does not provide a
module providing a substitute for the function. When the list
“Portability problems not fixed by Gnulib” is empty, such a module is
not needed: No portability problems are known. Otherwise, it indicates
that such a module would be useful but is not available: No one so far
found this function important enough to contribute a substitute for it.
If you need this particular function, you may write to
<bug-gnulib at gnu dot org>
.
Next: FD_ISSET, Up: Function Substitutes [Contents][Index]
FD_CLR
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/FD_CLR.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: FD_SET, Previous: FD_CLR, Up: Function Substitutes [Contents][Index]
FD_ISSET
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/FD_ISSET.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: FD_ZERO, Previous: FD_ISSET, Up: Function Substitutes [Contents][Index]
FD_SET
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/FD_SET.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: _Exit, Previous: FD_SET, Up: Function Substitutes [Contents][Index]
FD_ZERO
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/FD_ZERO.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: _exit, Previous: FD_ZERO, Up: Function Substitutes [Contents][Index]
_Exit
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_Exit.html
Gnulib module: _Exit
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: _longjmp, Previous: _Exit, Up: Function Substitutes [Contents][Index]
_exit
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_exit.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: _setjmp, Previous: _exit, Up: Function Substitutes [Contents][Index]
_longjmp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_longjmp.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Note: A future revision of POSIX later than the 2008/2009 one may drop the
functions _setjmp
and _longjmp
. Still, in 2008, on all
systems which have _setjmp
, it is the fastest way to save the
registers but not the signal mask (up to 30 times faster than setjmp
on some systems).
Next: _tolower, Previous: _longjmp, Up: Function Substitutes [Contents][Index]
_setjmp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_setjmp.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Note: A future revision of POSIX later than the 2008/2009 one may drop the
functions _setjmp
and _longjmp
. Still, in 2008, on all
systems which have _setjmp
, it is the fastest way to save the
registers but not the signal mask (up to 30 times faster than setjmp
on some systems).
Next: _toupper, Previous: _setjmp, Up: Function Substitutes [Contents][Index]
_tolower
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_tolower.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: a64l, Previous: _tolower, Up: Function Substitutes [Contents][Index]
_toupper
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/_toupper.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: abort, Previous: _toupper, Up: Function Substitutes [Contents][Index]
a64l
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/a64l.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: abs, Previous: a64l, Up: Function Substitutes [Contents][Index]
abort
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/abort.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: accept, Previous: abort, Up: Function Substitutes [Contents][Index]
abs
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/abs.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: access, Previous: abs, Up: Function Substitutes [Contents][Index]
accept
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/accept.html
Gnulib module: accept
Portability problems fixed by Gnulib:
accept
function cannot be used in calls to read
,
write
, and close
; you have to use recv
, send
,
closesocket
in these cases instead.
accept
are not placed in errno
, and WSAGetLastError
must be
used instead.
Portability problems not fixed by Gnulib:
accept
function cannot be used
in calls to read
, write
, and close
; you have to use
recv
, send
, closesocket
in these cases instead.
socklen_t
type; in this case this function’s
third argument type is ‘int *’.
Next: acos, Previous: accept, Up: Function Substitutes [Contents][Index]
access
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/access.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Other problems of this function:
stat
versus lstat
). If you need this option, use
the Gnulib module faccessat
with the AT_EACCESS
flag.
Next: acosf, Previous: access, Up: Function Substitutes [Contents][Index]
acos
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acos.html
Gnulib module: acos
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: acosh, Previous: acos, Up: Function Substitutes [Contents][Index]
acosf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acosf.html
Gnulib module: acosf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: acoshf, Previous: acosf, Up: Function Substitutes [Contents][Index]
acosh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acosh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: acoshl, Previous: acosh, Up: Function Substitutes [Contents][Index]
acoshf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acoshf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: acosl, Previous: acoshf, Up: Function Substitutes [Contents][Index]
acoshl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acoshl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: aio_cancel, Previous: acoshl, Up: Function Substitutes [Contents][Index]
acosl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/acosl.html
Gnulib module: acosl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: aio_error, Previous: acosl, Up: Function Substitutes [Contents][Index]
aio_cancel
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_cancel.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aio_fsync, Previous: aio_cancel, Up: Function Substitutes [Contents][Index]
aio_error
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_error.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aio_read, Previous: aio_error, Up: Function Substitutes [Contents][Index]
aio_fsync
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_fsync.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aio_return, Previous: aio_fsync, Up: Function Substitutes [Contents][Index]
aio_read
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_read.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aio_suspend, Previous: aio_read, Up: Function Substitutes [Contents][Index]
aio_return
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_return.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aio_write, Previous: aio_return, Up: Function Substitutes [Contents][Index]
aio_suspend
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_suspend.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: alarm, Previous: aio_suspend, Up: Function Substitutes [Contents][Index]
aio_write
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/aio_write.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: aligned_alloc, Previous: aio_write, Up: Function Substitutes [Contents][Index]
alarm
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/alarm.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
<io.h>
header on some platforms:
mingw (2012 or newer).
Next: alphasort, Previous: alarm, Up: Function Substitutes [Contents][Index]
aligned_alloc
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asctime, Previous: aligned_alloc, Up: Function Substitutes [Contents][Index]
alphasort
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/alphasort.html
Gnulib module: alphasort
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
const void *
on some platforms:
glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5.
void *
on some platforms:
AIX 5.1.
Next: asctime_r, Previous: alphasort, Up: Function Substitutes [Contents][Index]
asctime
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asctime.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asin, Previous: asctime, Up: Function Substitutes [Contents][Index]
asctime_r
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asctime_r.html
Gnulib module: extensions
Portability problems fixed by Gnulib:
_POSIX_PTHREAD_SEMANTICS
is not defined).
Portability problems not fixed by Gnulib:
Next: asinf, Previous: asctime_r, Up: Function Substitutes [Contents][Index]
asin
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asin.html
Gnulib module: asin
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asinh, Previous: asin, Up: Function Substitutes [Contents][Index]
asinf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asinf.html
Gnulib module: asinf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asinhf, Previous: asinf, Up: Function Substitutes [Contents][Index]
asinh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asinh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asinhl, Previous: asinh, Up: Function Substitutes [Contents][Index]
asinhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asinhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: asinl, Previous: asinhf, Up: Function Substitutes [Contents][Index]
asinhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asinhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: assert, Previous: asinhl, Up: Function Substitutes [Contents][Index]
asinl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/asinl.html
Gnulib module: asinl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atan, Previous: asinl, Up: Function Substitutes [Contents][Index]
assert
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/assert.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Extension: Gnulib offers a module ‘assert’ that allows the installer to disable assertions through a ‘configure’ option: ‘--disable-assert’.
Next: atan2, Previous: assert, Up: Function Substitutes [Contents][Index]
atan
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atan.html
Gnulib module: atan
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atan2f, Previous: atan, Up: Function Substitutes [Contents][Index]
atan2
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atan2.html
Gnulib module: atan2
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atan2l, Previous: atan2, Up: Function Substitutes [Contents][Index]
atan2f
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atan2f.html
Gnulib module: atan2f
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atanf, Previous: atan2f, Up: Function Substitutes [Contents][Index]
atan2l
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atan2l.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atanh, Previous: atan2l, Up: Function Substitutes [Contents][Index]
atanf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atanf.html
Gnulib module: atanf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atanhf, Previous: atanf, Up: Function Substitutes [Contents][Index]
atanh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atanh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atanhl, Previous: atanh, Up: Function Substitutes [Contents][Index]
atanhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atanhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atanl, Previous: atanhf, Up: Function Substitutes [Contents][Index]
atanhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atanhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atexit, Previous: atanhl, Up: Function Substitutes [Contents][Index]
atanl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atanl.html
Gnulib module: atanl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atof, Previous: atanl, Up: Function Substitutes [Contents][Index]
atexit
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atexit.html
Gnulib module: atexit
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atoi, Previous: atexit, Up: Function Substitutes [Contents][Index]
atof
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atof.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atol, Previous: atof, Up: Function Substitutes [Contents][Index]
atoi
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atoi.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: atoll, Previous: atoi, Up: Function Substitutes [Contents][Index]
atol
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atol.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: basename, Previous: atol, Up: Function Substitutes [Contents][Index]
atoll
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/atoll.html
Gnulib module: atoll
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: bind, Previous: atoll, Up: Function Substitutes [Contents][Index]
basename
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/basename.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
basename
: the POSIX version and
the GNU version.
basename
assumes file names in POSIX syntax; it does not work with file
names in Windows syntax.
The Gnulib module dirname
provides similar API, with function
base_name
, that also works with Windows file names.
Next: bsearch, Previous: basename, Up: Function Substitutes [Contents][Index]
bind
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/bind.html
Gnulib module: bind
Portability problems fixed by Gnulib:
bind
are not placed in errno
, and WSAGetLastError
must be
used instead.
Portability problems not fixed by Gnulib:
Next: btowc, Previous: bind, Up: Function Substitutes [Contents][Index]
bsearch
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/bsearch.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: c16rtomb, Previous: bsearch, Up: Function Substitutes [Contents][Index]
btowc
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/btowc.html
Gnulib module: btowc
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
wchar_t
is a 16-bit type and therefore cannot
accommodate all Unicode characters.
mbrtowc
and can return WEOF
:
glibc 2.23, MirOS BSD #10.
Next: c32rtomb, Previous: btowc, Up: Function Substitutes [Contents][Index]
c16rtomb
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cabs, Previous: c16rtomb, Up: Function Substitutes [Contents][Index]
c32rtomb
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cabsf, Previous: c32rtomb, Up: Function Substitutes [Contents][Index]
cabs
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cabs.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cabsl, Previous: cabs, Up: Function Substitutes [Contents][Index]
cabsf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cabsf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacos, Previous: cabsf, Up: Function Substitutes [Contents][Index]
cabsl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cabsl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacosf, Previous: cabsl, Up: Function Substitutes [Contents][Index]
cacos
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacos.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacosh, Previous: cacos, Up: Function Substitutes [Contents][Index]
cacosf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacosf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacoshf, Previous: cacosf, Up: Function Substitutes [Contents][Index]
cacosh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacosh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacoshl, Previous: cacosh, Up: Function Substitutes [Contents][Index]
cacoshf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacoshf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cacosl, Previous: cacoshf, Up: Function Substitutes [Contents][Index]
cacoshl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacoshl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: calloc, Previous: cacoshl, Up: Function Substitutes [Contents][Index]
cacosl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cacosl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: carg, Previous: cacosl, Up: Function Substitutes [Contents][Index]
calloc
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/calloc.html
Gnulib module: calloc-posix
Portability problems fixed by Gnulib:
errno
to ENOMEM
on
some platforms:
mingw, MSVC 9.
Portability problems not fixed by Gnulib:
Extension: Gnulib provides a module ‘calloc-gnu’ that substitutes a
calloc
implementation that behaves more like the glibc implementation.
Next: cargf, Previous: calloc, Up: Function Substitutes [Contents][Index]
carg
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/carg.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cargl, Previous: carg, Up: Function Substitutes [Contents][Index]
cargf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cargf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casin, Previous: cargf, Up: Function Substitutes [Contents][Index]
cargl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cargl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casinf, Previous: cargl, Up: Function Substitutes [Contents][Index]
casin
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casin.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casinh, Previous: casin, Up: Function Substitutes [Contents][Index]
casinf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casinf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casinhf, Previous: casinf, Up: Function Substitutes [Contents][Index]
casinh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casinh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casinhl, Previous: casinh, Up: Function Substitutes [Contents][Index]
casinhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casinhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: casinl, Previous: casinhf, Up: Function Substitutes [Contents][Index]
casinhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casinhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catan, Previous: casinhl, Up: Function Substitutes [Contents][Index]
casinl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/casinl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catanf, Previous: casinl, Up: Function Substitutes [Contents][Index]
catan
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catan.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catanh, Previous: catan, Up: Function Substitutes [Contents][Index]
catanf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catanf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catanhf, Previous: catanf, Up: Function Substitutes [Contents][Index]
catanh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catanh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catanhl, Previous: catanh, Up: Function Substitutes [Contents][Index]
catanhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catanhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catanl, Previous: catanhf, Up: Function Substitutes [Contents][Index]
catanhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catanhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catclose, Previous: catanhl, Up: Function Substitutes [Contents][Index]
catanl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catanl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catgets, Previous: catanl, Up: Function Substitutes [Contents][Index]
catclose
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catclose.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: catopen, Previous: catclose, Up: Function Substitutes [Contents][Index]
catgets
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catgets.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cbrt, Previous: catgets, Up: Function Substitutes [Contents][Index]
catopen
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/catopen.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cbrtf, Previous: catopen, Up: Function Substitutes [Contents][Index]
cbrt
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cbrt.html
Gnulib module: cbrt
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cbrtl, Previous: cbrt, Up: Function Substitutes [Contents][Index]
cbrtf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cbrtf.html
Gnulib module: cbrtf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ccos, Previous: cbrtf, Up: Function Substitutes [Contents][Index]
cbrtl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cbrtl.html
Gnulib module: cbrtl or cbrtl-ieee
Portability problems fixed by either Gnulib module cbrtl
or cbrtl-ieee
Portability problems fixed by Gnulib module cbrtl-ieee
:
Portability problems not fixed by Gnulib:
Next: ccosf, Previous: cbrtl, Up: Function Substitutes [Contents][Index]
ccos
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccos.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ccosh, Previous: ccos, Up: Function Substitutes [Contents][Index]
ccosf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccosf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ccoshf, Previous: ccosf, Up: Function Substitutes [Contents][Index]
ccosh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccosh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ccoshl, Previous: ccosh, Up: Function Substitutes [Contents][Index]
ccoshf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccoshf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ccosl, Previous: ccoshf, Up: Function Substitutes [Contents][Index]
ccoshl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccoshl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ceil, Previous: ccoshl, Up: Function Substitutes [Contents][Index]
ccosl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ccosl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ceilf, Previous: ccosl, Up: Function Substitutes [Contents][Index]
ceil
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ceil.html
Gnulib module: ceil or ceil-ieee
Portability problems fixed by either Gnulib module ceil
or ceil-ieee
:
Portability problems fixed by Gnulib module ceil-ieee
:
Portability problems not fixed by Gnulib:
Next: ceill, Previous: ceil, Up: Function Substitutes [Contents][Index]
ceilf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ceilf.html
Gnulib module: ceilf or ceilf-ieee
Portability problems fixed by either Gnulib module ceilf
or ceilf-ieee
:
Portability problems fixed by Gnulib module ceilf-ieee
:
Portability problems not fixed by Gnulib:
Next: cexp, Previous: ceilf, Up: Function Substitutes [Contents][Index]
ceill
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ceill.html
Gnulib module: ceill or ceill-ieee
Portability problems fixed by either Gnulib module ceill
or ceill-ieee
:
Portability problems fixed by Gnulib module ceill-ieee
:
Portability problems not fixed by Gnulib:
Next: cexpf, Previous: ceill, Up: Function Substitutes [Contents][Index]
cexp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cexp.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cexpl, Previous: cexp, Up: Function Substitutes [Contents][Index]
cexpf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cexpf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cfgetispeed, Previous: cexpf, Up: Function Substitutes [Contents][Index]
cexpl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cexpl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cfgetospeed, Previous: cexpl, Up: Function Substitutes [Contents][Index]
cfgetispeed
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cfgetispeed.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cfsetispeed, Previous: cfgetispeed, Up: Function Substitutes [Contents][Index]
cfgetospeed
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cfgetospeed.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cfsetospeed, Previous: cfgetospeed, Up: Function Substitutes [Contents][Index]
cfsetispeed
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cfsetispeed.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: chdir, Previous: cfsetispeed, Up: Function Substitutes [Contents][Index]
cfsetospeed
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cfsetospeed.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: chmod, Previous: cfsetospeed, Up: Function Substitutes [Contents][Index]
chdir
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/chdir.html
Gnulib module: —
Portability problems fixed by Gnulib:
<io.h>
or
<direct.h>
) on some platforms:
mingw, MSVC 9.
Portability problems not fixed by Gnulib:
Next: chown, Previous: chdir, Up: Function Substitutes [Contents][Index]
chmod
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/chmod.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cimag, Previous: chmod, Up: Function Substitutes [Contents][Index]
chown
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/chown.html
Gnulib module: chown
Portability problems fixed by Gnulib:
chown("link-to-file/",uid,gid)
:
FreeBSD 7.2, AIX 7.1, Solaris 9.
lchown
.
ENOSYS
:
mingw, MSVC 9.
Portability problems not fixed by Gnulib:
Next: cimagf, Previous: chown, Up: Function Substitutes [Contents][Index]
cimag
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cimag.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cimagl, Previous: cimag, Up: Function Substitutes [Contents][Index]
cimagf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cimagf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clearerr, Previous: cimagf, Up: Function Substitutes [Contents][Index]
cimagl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cimagl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock, Previous: cimagl, Up: Function Substitutes [Contents][Index]
clearerr
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clearerr.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock_getcpuclockid, Previous: clearerr, Up: Function Substitutes [Contents][Index]
clock
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock_getres, Previous: clock, Up: Function Substitutes [Contents][Index]
clock_getcpuclockid
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock_gettime, Previous: clock_getcpuclockid, Up: Function Substitutes [Contents][Index]
clock_getres
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock_nanosleep, Previous: clock_getres, Up: Function Substitutes [Contents][Index]
clock_gettime
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clock_settime, Previous: clock_gettime, Up: Function Substitutes [Contents][Index]
clock_nanosleep
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clog, Previous: clock_nanosleep, Up: Function Substitutes [Contents][Index]
clock_settime
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clock_settime.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clogf, Previous: clock_settime, Up: Function Substitutes [Contents][Index]
clog
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clog.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: clogl, Previous: clog, Up: Function Substitutes [Contents][Index]
clogf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clogf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: close, Previous: clogf, Up: Function Substitutes [Contents][Index]
clogl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/clogl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: closedir, Previous: clogl, Up: Function Substitutes [Contents][Index]
close
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/close.html
Gnulib module: close
Portability problems fixed by Gnulib:
socket
and accept
do not return file descriptors that can be closed by close
.
Instead, closesocket
must be used.
Portability problems not fixed by Gnulib:
socket
and accept
do not return file descriptors
that can be closed by close
. Instead, closesocket
must be
used.
Next: closelog, Previous: close, Up: Function Substitutes [Contents][Index]
closedir
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/closedir.html
Gnulib module: closedir
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: confstr, Previous: closedir, Up: Function Substitutes [Contents][Index]
closelog
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/closelog.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: conj, Previous: closelog, Up: Function Substitutes [Contents][Index]
confstr
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/confstr.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: conjf, Previous: confstr, Up: Function Substitutes [Contents][Index]
conj
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/conj.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: conjl, Previous: conj, Up: Function Substitutes [Contents][Index]
conjf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/conjf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: connect, Previous: conjf, Up: Function Substitutes [Contents][Index]
conjl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/conjl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: copysign, Previous: conjl, Up: Function Substitutes [Contents][Index]
connect
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/connect.html
Gnulib module: connect
Portability problems fixed by Gnulib:
connect
are not placed in errno
, and
WSAGetLastError
must be used instead.
Portability problems not fixed by Gnulib:
Next: copysignf, Previous: connect, Up: Function Substitutes [Contents][Index]
copysign
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/copysign.html
Gnulib module: copysign
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: copysignl, Previous: copysign, Up: Function Substitutes [Contents][Index]
copysignf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/copysignf.html
Gnulib module: copysignf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cos, Previous: copysignf, Up: Function Substitutes [Contents][Index]
copysignl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/copysignl.html
Gnulib module: copysignl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cosf, Previous: copysignl, Up: Function Substitutes [Contents][Index]
cos
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cos.html
Gnulib module: cos
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cosh, Previous: cos, Up: Function Substitutes [Contents][Index]
cosf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cosf.html
Gnulib module: cosf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: coshf, Previous: cosf, Up: Function Substitutes [Contents][Index]
cosh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cosh.html
Gnulib module: cosh
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: coshl, Previous: cosh, Up: Function Substitutes [Contents][Index]
coshf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/coshf.html
Gnulib module: coshf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cosl, Previous: coshf, Up: Function Substitutes [Contents][Index]
coshl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/coshl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cpow, Previous: coshl, Up: Function Substitutes [Contents][Index]
cosl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cosl.html
Gnulib module: cosl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cpowf, Previous: cosl, Up: Function Substitutes [Contents][Index]
cpow
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cpow.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cpowl, Previous: cpow, Up: Function Substitutes [Contents][Index]
cpowf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cpowf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cproj, Previous: cpowf, Up: Function Substitutes [Contents][Index]
cpowl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cpowl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cprojf, Previous: cpowl, Up: Function Substitutes [Contents][Index]
cproj
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cproj.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: cprojl, Previous: cproj, Up: Function Substitutes [Contents][Index]
cprojf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cprojf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: creal, Previous: cprojf, Up: Function Substitutes [Contents][Index]
cprojl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/cprojl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: crealf, Previous: cprojl, Up: Function Substitutes [Contents][Index]
creal
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/creal.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: creall, Previous: creal, Up: Function Substitutes [Contents][Index]
crealf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/crealf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: creat, Previous: crealf, Up: Function Substitutes [Contents][Index]
creall
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/creall.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: crypt, Previous: creall, Up: Function Substitutes [Contents][Index]
creat
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/creat.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
O_TEXT
mode. If you
need a file handle in O_BINARY
mode, you need to use the function
open
instead.
off_t
is a 32-bit type, creat
may not work
correctly to create files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
Next: csin, Previous: creat, Up: Function Substitutes [Contents][Index]
crypt
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/crypt.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
<unistd.h>
(without -D_GNU_SOURCE
) on some platforms:
glibc (at least 2.11–2.13).
Next: csinf, Previous: crypt, Up: Function Substitutes [Contents][Index]
csin
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csin.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csinh, Previous: csin, Up: Function Substitutes [Contents][Index]
csinf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csinf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csinhf, Previous: csinf, Up: Function Substitutes [Contents][Index]
csinh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csinh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csinhl, Previous: csinh, Up: Function Substitutes [Contents][Index]
csinhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csinhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csinl, Previous: csinhf, Up: Function Substitutes [Contents][Index]
csinhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csinhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csqrt, Previous: csinhl, Up: Function Substitutes [Contents][Index]
csinl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csinl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csqrtf, Previous: csinl, Up: Function Substitutes [Contents][Index]
csqrt
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csqrt.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: csqrtl, Previous: csqrt, Up: Function Substitutes [Contents][Index]
csqrtf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csqrtf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctan, Previous: csqrtf, Up: Function Substitutes [Contents][Index]
csqrtl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/csqrtl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctanf, Previous: csqrtl, Up: Function Substitutes [Contents][Index]
ctan
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctan.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctanh, Previous: ctan, Up: Function Substitutes [Contents][Index]
ctanf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctanf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctanhf, Previous: ctanf, Up: Function Substitutes [Contents][Index]
ctanh
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctanh.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctanhl, Previous: ctanh, Up: Function Substitutes [Contents][Index]
ctanhf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctanhf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctanl, Previous: ctanhf, Up: Function Substitutes [Contents][Index]
ctanhl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctanhl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctermid, Previous: ctanhl, Up: Function Substitutes [Contents][Index]
ctanl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctanl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctime, Previous: ctanl, Up: Function Substitutes [Contents][Index]
ctermid
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctermid.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ctime_r, Previous: ctermid, Up: Function Substitutes [Contents][Index]
ctime
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctime.html
Gnulib module: ctime
Portability problems fixed by Gnulib:
TZ
has been set by Cygwin.
Portability problems not fixed by Gnulib:
ctime
function need not be reentrant, and consequently is
not required to be thread safe. Implementations of ctime
typically write the timestamp into static buffer. If two threads
call ctime
at roughly the same time, you might end up with the
wrong date in one of the threads, or some undefined string. There is
a re-entrant interface ctime_r
.
A more flexible function is strftime
. However, note that it is
locale dependent.
Next: daylight, Previous: ctime, Up: Function Substitutes [Contents][Index]
ctime_r
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ctime_r.html
Gnulib module: extensions
Portability problems fixed by Gnulib:
_POSIX_PTHREAD_SEMANTICS
is not defined).
Portability problems not fixed by Gnulib:
ctime_r
takes a pre-allocated buffer and length of the buffer,
and returns NULL
on errors.
The input buffer should be at least 26 bytes in size. The output
string is locale-independent. However, years can have more than 4
digits if time_t
is sufficiently wide, so the length of the
required output buffer is not easy to determine. Increasing the
buffer size when ctime_r
returns NULL
is not necessarily
sufficient. The NULL
return value could mean some other error
condition, which will not go away by increasing the buffer size.
A more flexible function is strftime
. However, note that it is
locale dependent.
Next: dbm_clearerr, Previous: ctime_r, Up: Function Substitutes [Contents][Index]
daylight
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/daylight.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
A more portable way of getting the UTC offset is to use
strftime
with the %z
format. See strftime.
Next: dbm_close, Previous: daylight, Up: Function Substitutes [Contents][Index]
dbm_clearerr
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_delete, Previous: dbm_clearerr, Up: Function Substitutes [Contents][Index]
dbm_close
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_close.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_error, Previous: dbm_close, Up: Function Substitutes [Contents][Index]
dbm_delete
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_delete.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_fetch, Previous: dbm_delete, Up: Function Substitutes [Contents][Index]
dbm_error
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_error.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_firstkey, Previous: dbm_error, Up: Function Substitutes [Contents][Index]
dbm_fetch
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_fetch.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_nextkey, Previous: dbm_fetch, Up: Function Substitutes [Contents][Index]
dbm_firstkey
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_firstkey.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_open, Previous: dbm_firstkey, Up: Function Substitutes [Contents][Index]
dbm_nextkey
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_nextkey.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dbm_store, Previous: dbm_nextkey, Up: Function Substitutes [Contents][Index]
dbm_open
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_open.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: difftime, Previous: dbm_open, Up: Function Substitutes [Contents][Index]
dbm_store
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dbm_store.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dirfd, Previous: dbm_store, Up: Function Substitutes [Contents][Index]
difftime
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/difftime.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dirname, Previous: difftime, Up: Function Substitutes [Contents][Index]
dirfd
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dirfd.html
Gnulib module: dirfd
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
With the dirfd
module, this functions always sets errno
when it
fails. (POSIX does not require that dirfd
sets errno
when it
fails.)
Next: div, Previous: dirfd, Up: Function Substitutes [Contents][Index]
dirname
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dirname.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
dirname
assumes file names in POSIX syntax; it does not work with file
names in Windows syntax.
The Gnulib module dirname
provides similar API, with functions
dir_name
and mdir_name
, that also works with Windows
file names.
Next: dlclose, Previous: dirname, Up: Function Substitutes [Contents][Index]
div
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/div.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dlerror, Previous: div, Up: Function Substitutes [Contents][Index]
dlclose
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dlclose.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dlopen, Previous: dlclose, Up: Function Substitutes [Contents][Index]
dlerror
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dlerror.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dlsym, Previous: dlerror, Up: Function Substitutes [Contents][Index]
dlopen
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dlopen.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dprintf, Previous: dlopen, Up: Function Substitutes [Contents][Index]
dlsym
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dlsym.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: drand48, Previous: dlsym, Up: Function Substitutes [Contents][Index]
dprintf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Gnulib module: dprintf or dprintf-posix
Portability problems fixed by either Gnulib module dprintf
or dprintf-posix
:
Portability problems fixed by Gnulib module dprintf-posix
:
Portability problems not fixed by Gnulib:
errno
or the
stream error indicator on attempts to write to a read-only stream:
Cygwin 1.7.9.
Next: dup, Previous: dprintf, Up: Function Substitutes [Contents][Index]
drand48
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/drand48.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: dup2, Previous: drand48, Up: Function Substitutes [Contents][Index]
dup
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dup.html
Gnulib module: dup
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: duplocale, Previous: dup, Up: Function Substitutes [Contents][Index]
dup2
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/dup2.html
Gnulib module: dup2 or dup2-obsolete
Portability problems fixed by either Gnulib module dup2
or dup2-obsolete
:
EINVAL
when duplicating an fd to itself:
Android.
FD_CLOEXEC
flag when duplicating an fd
to itself on some platforms:
Haiku.
dup2 (1, 1)
on some platforms:
Cygwin 1.5.x.
-EBADF
instead of -1
on some platforms:
Linux releases between July 2008 and May 2009 (versions 2.6.27 to 2.6.29).
EMFILE
instead of EBADF
for
large targets, which interferes with using
dup2(fd,fd)==fd)
as the minimal EBADF
filter:
AIX 7.1, FreeBSD 6.1, Cygwin 1.5.
Portability problems fixed by Gnulib module dup2-obsolete
:
Portability problems not fixed by Gnulib:
Next: encrypt, Previous: dup2, Up: Function Substitutes [Contents][Index]
duplocale
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/duplocale.html
Gnulib module: duplocale
Portability problems fixed by Gnulib:
LC_GLOBAL_LOCALE
is not supported on some platforms:
glibc 2.11, AIX 7.1.
Portability problems not fixed by Gnulib:
Next: endgrent, Previous: duplocale, Up: Function Substitutes [Contents][Index]
encrypt
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/encrypt.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
<unistd.h>
(without -D_GNU_SOURCE
) on some platforms:
glibc (at least 2.11–2.13).
Next: endhostent, Previous: encrypt, Up: Function Substitutes [Contents][Index]
endgrent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endgrent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: endnetent, Previous: endgrent, Up: Function Substitutes [Contents][Index]
endhostent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endhostent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: endprotoent, Previous: endhostent, Up: Function Substitutes [Contents][Index]
endnetent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endnetent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: endpwent, Previous: endnetent, Up: Function Substitutes [Contents][Index]
endprotoent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endprotoent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: endservent, Previous: endprotoent, Up: Function Substitutes [Contents][Index]
endpwent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endpwent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: endutxent, Previous: endpwent, Up: Function Substitutes [Contents][Index]
endservent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endservent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: environ, Previous: endservent, Up: Function Substitutes [Contents][Index]
endutxent
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/endutxent.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erand48, Previous: endutxent, Up: Function Substitutes [Contents][Index]
environ
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/environ.html
Gnulib module: environ
Portability problems fixed by Gnulib:
extern char **environ;
to get the variable declared. This does not work any more, however, in shared libraries on Mac OS X 10.5. Here is a workaround: Instead, one can use
#include <crt_externs.h> #define environ (*_NSGetEnviron())
This works at all versions of Mac OS X.
Portability problems not fixed by Gnulib:
Next: erf, Previous: environ, Up: Function Substitutes [Contents][Index]
erand48
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erand48.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erfc, Previous: erand48, Up: Function Substitutes [Contents][Index]
erf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erf.html
Gnulib module: erf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erfcf, Previous: erf, Up: Function Substitutes [Contents][Index]
erfc
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erfc.html
Gnulib module: erfc
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erfcl, Previous: erfc, Up: Function Substitutes [Contents][Index]
erfcf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erfcf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erff, Previous: erfcf, Up: Function Substitutes [Contents][Index]
erfcl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erfcl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: erfl, Previous: erfcl, Up: Function Substitutes [Contents][Index]
erff
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erff.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: errno, Previous: erff, Up: Function Substitutes [Contents][Index]
erfl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/erfl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: execl, Previous: erfl, Up: Function Substitutes [Contents][Index]
errno
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/errno.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
errno
; their error code is
available through WSAGetLastError()
instead.
Next: execle, Previous: errno, Up: Function Substitutes [Contents][Index]
execl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execl.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: execlp, Previous: execl, Up: Function Substitutes [Contents][Index]
execle
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execle.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: execv, Previous: execle, Up: Function Substitutes [Contents][Index]
execlp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execlp.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: execve, Previous: execlp, Up: Function Substitutes [Contents][Index]
execv
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execv.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: execvp, Previous: execv, Up: Function Substitutes [Contents][Index]
execve
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execve.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: exit, Previous: execve, Up: Function Substitutes [Contents][Index]
execvp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/execvp.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: exp, Previous: execvp, Up: Function Substitutes [Contents][Index]
exit
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/exit.html
Gnulib module: stdlib
Portability problems fixed by Gnulib:
EXIT_SUCCESS
and EXIT_FAILURE
,
see stdlib.h.
Portability problems not fixed by Gnulib:
Next: exp2, Previous: exit, Up: Function Substitutes [Contents][Index]
exp
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/exp.html
Gnulib module: exp
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: exp2f, Previous: exp, Up: Function Substitutes [Contents][Index]
exp2
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/exp2.html
Gnulib module: exp2
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: exp2l, Previous: exp2, Up: Function Substitutes [Contents][Index]
exp2f
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/exp2f.html
Gnulib module: exp2f
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: expf, Previous: exp2f, Up: Function Substitutes [Contents][Index]
exp2l
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/exp2l.html
Gnulib module: exp2l or exp2l-ieee
Portability problems fixed by either Gnulib module exp2l
or exp2l-ieee
:
Portability problems fixed by Gnulib module exp2l-ieee
:
Portability problems not fixed by Gnulib:
Next: expl, Previous: exp2l, Up: Function Substitutes [Contents][Index]
expf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/expf.html
Gnulib module: expf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: expm1, Previous: expf, Up: Function Substitutes [Contents][Index]
expl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/expl.html
Gnulib module: expl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: expm1f, Previous: expl, Up: Function Substitutes [Contents][Index]
expm1
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/expm1.html
Gnulib module: expm1 or expm1-ieee
Portability problems fixed by either Gnulib module expm1
or expm1-ieee
:
Portability problems fixed by Gnulib module expm1-ieee
:
Portability problems not fixed by Gnulib:
Next: expm1l, Previous: expm1, Up: Function Substitutes [Contents][Index]
expm1f
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/expm1f.html
Gnulib module: expm1f
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fabs, Previous: expm1f, Up: Function Substitutes [Contents][Index]
expm1l
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/expm1l.html
Gnulib module: expm1l
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fabsf, Previous: expm1l, Up: Function Substitutes [Contents][Index]
fabs
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fabs.html
Gnulib module: fabs
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fabsl, Previous: fabs, Up: Function Substitutes [Contents][Index]
fabsf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fabsf.html
Gnulib module: fabsf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: faccessat, Previous: fabsf, Up: Function Substitutes [Contents][Index]
fabsl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fabsl.html
Gnulib module: fabsl
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fattach, Previous: fabsl, Up: Function Substitutes [Contents][Index]
faccessat
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/faccessat.html
Gnulib module: faccessat
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Other problems of this function:
Next: fchdir, Previous: faccessat, Up: Function Substitutes [Contents][Index]
fattach
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fattach.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fchmod, Previous: fattach, Up: Function Substitutes [Contents][Index]
fchdir
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fchdir.html
Gnulib module: fchdir
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fchmodat, Previous: fchdir, Up: Function Substitutes [Contents][Index]
fchmod
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fchmod.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fchown, Previous: fchmod, Up: Function Substitutes [Contents][Index]
fchmodat
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fchmodat.html
Gnulib module: fchmodat
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
fchmodat(…,AT_SYMLINK_NOFOLLOW)
may fail with EOPNOTSUPP
when called on a symlink, but some
platforms, as well as the gnulib replacement, fail for any use of
AT_SYMLINK_NOFOLLOW even if the target was not a symlink:
glibc, Cygwin.
Next: fchownat, Previous: fchmodat, Up: Function Substitutes [Contents][Index]
fchown
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fchown.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fclose, Previous: fchown, Up: Function Substitutes [Contents][Index]
fchownat
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fchownat.html
Gnulib module: fchownat
Portability problems fixed by Gnulib:
fchown(dir,"link-to-file/",uid,gid,flag)
:
Solaris 9.
AT_SYMLINK_NOFOLLOW
:
Linux kernel 2.6.17.
lchown
is unsupported, or fail altogether if
chown
is unsupported.
Portability problems not fixed by Gnulib:
Next: fcntl, Previous: fchownat, Up: Function Substitutes [Contents][Index]
fclose
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fclose.html
Gnulib module: fclose
Portability problems fixed by Gnulib:
socket
and accept
followed by fdopen
do not return streams that can be closed by
fclose
.
Portability problems not fixed by Gnulib:
errno
upon failure.
Next: fdatasync, Previous: fclose, Up: Function Substitutes [Contents][Index]
fcntl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
Gnulib module: fcntl
Portability problems fixed by Gnulib:
F_DUPFD_CLOEXEC
on some
platforms:
glibc with Linux kernels before 2.6.24,
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 7.1, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.1, Interix 3.5,
BeOS.
Note that the gnulib replacement code is functional but not atomic.
F_DUPFD
action of this function does not reject
out-of-range targets properly on some platforms:
AIX 7.1, Cygwin 1.5.x, Haiku.
F_DUPFD
action of this function mistakenly clears
FD_CLOEXEC on the source descriptor on some platforms:
Haiku.
Portability problems not fixed by Gnulib:
F_SETFD
,
F_GETFL
, F_SETFL
, F_GETOWN
, F_SETOWN
,
F_GETLK
, F_SETLK
, and F_SETLKW
on some platforms:
mingw, MSVC 9.
Next: fdetach, Previous: fcntl, Up: Function Substitutes [Contents][Index]
fdatasync
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html
Gnulib module: fdatasync
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fdim, Previous: fdatasync, Up: Function Substitutes [Contents][Index]
fdetach
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdetach.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fdimf, Previous: fdetach, Up: Function Substitutes [Contents][Index]
fdim
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdim.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fdiml, Previous: fdim, Up: Function Substitutes [Contents][Index]
fdimf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdimf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fdopen, Previous: fdimf, Up: Function Substitutes [Contents][Index]
fdiml
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdiml.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fdopendir, Previous: fdiml, Up: Function Substitutes [Contents][Index]
fdopen
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdopen.html
Gnulib module: fdopen
Portability problems fixed by Gnulib:
errno
upon failure.
Portability problems not fixed by Gnulib:
Next: feclearexcept, Previous: fdopen, Up: Function Substitutes [Contents][Index]
fdopendir
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html
Gnulib module: fdopendir
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fegetenv, Previous: fdopendir, Up: Function Substitutes [Contents][Index]
feclearexcept
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/feclearexcept.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fegetexceptflag, Previous: feclearexcept, Up: Function Substitutes [Contents][Index]
fegetenv
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fegetenv.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fegetround, Previous: fegetenv, Up: Function Substitutes [Contents][Index]
fegetexceptflag
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fegetexceptflag.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: feholdexcept, Previous: fegetexceptflag, Up: Function Substitutes [Contents][Index]
fegetround
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fegetround.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: feof, Previous: fegetround, Up: Function Substitutes [Contents][Index]
feholdexcept
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/feholdexcept.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: feraiseexcept, Previous: feholdexcept, Up: Function Substitutes [Contents][Index]
feof
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/feof.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ferror, Previous: feof, Up: Function Substitutes [Contents][Index]
feraiseexcept
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/feraiseexcept.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fesetenv, Previous: feraiseexcept, Up: Function Substitutes [Contents][Index]
ferror
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ferror.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fesetexceptflag, Previous: ferror, Up: Function Substitutes [Contents][Index]
fesetenv
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fesetenv.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fesetround, Previous: fesetenv, Up: Function Substitutes [Contents][Index]
fesetexceptflag
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fesetexceptflag.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fetestexcept, Previous: fesetexceptflag, Up: Function Substitutes [Contents][Index]
fesetround
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fesetround.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: feupdateenv, Previous: fesetround, Up: Function Substitutes [Contents][Index]
fetestexcept
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fetestexcept.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fexecve, Previous: fetestexcept, Up: Function Substitutes [Contents][Index]
feupdateenv
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/feupdateenv.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fflush, Previous: feupdateenv, Up: Function Substitutes [Contents][Index]
fexecve
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: ffs, Previous: fexecve, Up: Function Substitutes [Contents][Index]
fflush
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fflush.html
Gnulib module: fflush
Portability problems fixed by Gnulib:
fflush
followed by fseek
or fseeko
, applied to an input
stream, should have the effect of positioning the underlying file descriptor.
It doesn’t do this on some platforms.
fflush
on an input stream changes the position of the stream to the
end of the previous buffer, on some platforms: mingw, MSVC 9.
fflush
on an input stream right after ungetc
does not discard
the ungetc
buffer, on some platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin 1.5.25-10.
Portability problems not fixed by Gnulib:
fflush
, ftell
, ftello
, fgetpos
behave incorrectly
on input streams that are opened in O_TEXT
mode and whose contents
contains Unix line terminators (LF), on some platforms: mingw, MSVC 9.
errno
upon failure.
MSVC_INVALID_PARAMETER_HANDLING
is
HAIRY_LIBRARY_HANDLING
or SANE_LIBRARY_HANDLING
,
on some platforms:
MSVC 9.
fflush
on an input stream right after ungetc
does not discard
the ungetc
buffer, on some platforms:
AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, mingw, MSVC 9.
Next: fgetc, Previous: fflush, Up: Function Substitutes [Contents][Index]
ffs
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/ffs.html
Gnulib module: ffs
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fgetpos, Previous: ffs, Up: Function Substitutes [Contents][Index]
fgetc
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fgetc.html
Gnulib module: stdio, nonblocking
Portability problems fixed by Gnulib module stdio
, together with module nonblocking
:
errno
being set to EINVAL
instead of EAGAIN
on
some platforms:
mingw, MSVC 9.
Portability problems not fixed by Gnulib:
feof
would return nonzero. However, on some systems this
function attempts to read from the underlying file descriptor even if
the stream’s end-of-file indicator is set. These systems include
glibc and default Solaris.
errno
upon failure.
MSVC_INVALID_PARAMETER_HANDLING
is
HAIRY_LIBRARY_HANDLING
or SANE_LIBRARY_HANDLING
,
on some platforms:
MSVC 9.
Next: fgets, Previous: fgetc, Up: Function Substitutes [Contents][Index]
fgetpos
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fgetpos.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
fflush
, ftell
, ftello
, fgetpos
behave incorrectly
on input streams that are opened in O_TEXT
mode and whose contents
contains Unix line terminators (LF), on some platforms: mingw, MSVC 9.
off_t
is a 32-bit type, this function may not
work correctly on files larger than 2 GB. The fix is to use the
AC_SYS_LARGEFILE
macro.
off_t
is a 64-bit type, but fseeko
is
not present, stream operations on files larger than 2 GB silently do
the wrong thing. This affects BSD/OS, which is mostly obsolete.
Next: fgetwc, Previous: fgetpos, Up: Function Substitutes [Contents][Index]
fgets
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fgets.html
Gnulib module: stdio, nonblocking
Portability problems fixed by Gnulib module stdio
, together with module nonblocking
:
errno
being set to EINVAL
instead of EAGAIN
on
some platforms:
mingw, MSVC 9.
Portability problems not fixed by Gnulib:
feof
would return nonzero. However, on some systems this
function attempts to read from the underlying file descriptor even if
the stream’s end-of-file indicator is set. These systems include
glibc and default Solaris.
errno
upon failure.
Next: fgetws, Previous: fgets, Up: Function Substitutes [Contents][Index]
fgetwc
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fgetwc.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
wchar_t
is a 16-bit type and therefore cannot
accommodate all Unicode characters.
Next: fileno, Previous: fgetwc, Up: Function Substitutes [Contents][Index]
fgetws
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fgetws.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
wchar_t
is a 16-bit type and therefore cannot
accommodate all Unicode characters.
Next: flockfile, Previous: fgetws, Up: Function Substitutes [Contents][Index]
fileno
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fileno.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: floor, Previous: fileno, Up: Function Substitutes [Contents][Index]
flockfile
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/flockfile.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: floorf, Previous: flockfile, Up: Function Substitutes [Contents][Index]
floor
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/floor.html
Gnulib module: floor or floor-ieee
Portability problems fixed by either Gnulib module floor
or floor-ieee
:
Portability problems fixed by Gnulib module floor-ieee
:
Portability problems not fixed by Gnulib:
Next: floorl, Previous: floor, Up: Function Substitutes [Contents][Index]
floorf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/floorf.html
Gnulib module: floorf or floorf-ieee
Portability problems fixed by either Gnulib module floorf
or floorf-ieee
:
Portability problems fixed by Gnulib module floorf-ieee
:
Portability problems not fixed by Gnulib:
Next: fma, Previous: floorf, Up: Function Substitutes [Contents][Index]
floorl
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/floorl.html
Gnulib module: floorl or floorl-ieee
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmaf, Previous: floorl, Up: Function Substitutes [Contents][Index]
fma
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fma.html
Gnulib module: fma
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmal, Previous: fma, Up: Function Substitutes [Contents][Index]
fmaf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fmaf.html
Gnulib module: fmaf
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmax, Previous: fmaf, Up: Function Substitutes [Contents][Index]
fmal
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fmal.html
Gnulib module: fmal
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmaxf, Previous: fmal, Up: Function Substitutes [Contents][Index]
fmax
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fmax.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Next: fmaxl, Previous: fmax, Up: Function Substitutes [Contents][Index]
fmaxf
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/fmaxf.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not