@section Portability of Standard Functions
@cindex functions
+@c Copyright (C) 2006 Free Software Foundation, Inc.
+
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.2 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+@c Texts. A copy of the license is included in the ``GNU Free
+@c Documentation License'' file as part of this distribution.
+
Many standard library functions have portability limitations, although
they are specified in the
@uref{http://www.opengroup.org/susv3, Posix standard}. In this section,
include @file{<libintl.h>} from GNU gettext; it redefines this function so that
it is POSIX compliant.
-On Windows, this function doesn't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item fputc
@itemx fputs
fail with @code{EINVAL}, instead of returning a truncated host name.
@item getopt
-The default behaviour of the glibc implementation of @code{getopt} allows
+The default behavior of the glibc implementation of @code{getopt} allows
mixing option and non-option arguments on the command line in any order.
Other implementations, such as the one in Cygwin, enforce strict POSIX
compliance: they require that the option arguments precede the non-option
correctly report the size of files or block devices larger than 2 GB. The fix
is to use the @code{AC_SYS_LARGEFILE} macro.
+On Windows systems (excluding Cygwin), symlinks are not supported, so
+@code{lstat} does not exist. The fix is to define lstat to use stat.
+
@item mbrtowc
@itemx mbsrtowcs
@itemx mbstowcs
include @file{<libintl.h>} from GNU gettext; it redefines this function so that
it is POSIX compliant.
-On Windows, this function doesn't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item pthread_create
On Linux/glibc systems before the advent of NPTL, signals could only be
except that @code{SIG_IGN} for @code{SIGCHLD} has the effect that the children
execution times are not accounted in the @code{times} function.
On some systems (BSD? SystemV? Linux?), you need to use the @code{sigaction}
-flag @code{SA_NOCLDWAIT} in order to obtain this behaviour.
+flag @code{SA_NOCLDWAIT} in order to obtain this behavior.
@item sigaltstack
@code{sigaltstack} doesn't work on HP-UX 11/IA-64 and OpenBSD 3.6/Sparc64.
reinstalling itself as a handler. On BSD systems and glibc systems, on the
other hand, when the signal is triggered, the kernel blocks the signal
before invoking the handler. This is saner, but POSIX still allows either
-behaviour. To avoid this problem, use @code{sigaction} instead of
+behavior. To avoid this problem, use @code{sigaction} instead of
@code{signal}.
@item sigtimedwait
include @file{<libintl.h>} from GNU gettext; it redefines this function so that
it is POSIX compliant.
-On Windows, this function doesn't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item socket
On BeOS, the descriptors returned by the @code{socket} function can not be used
include @file{<libintl.h>} from GNU gettext; it redefines this function so that
it is POSIX compliant.
-On Windows, this function doesn't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item sscanf
On Windows systems (excluding Cygwin), this function does not set @code{errno}
include @file{<libintl.h>} from GNU gettext; it redefines this function so that
it is POSIX compliant.
-On Windows, this function doesn't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item vfscanf
On Windows systems (excluding Cygwin), this function does not set @code{errno}
include @file{<libintl.h>} from GNU gettext; it redefines these functions so
that they are POSIX compliant.
-On Windows, these functions don't support the @code{'} flag and the @code{hh},
-@code{ll}, @code{j}, @code{t}, @code{z} size specifiers.
+On Windows systems (excluding Cygwin), this function doesn't support
+the @code{'} flag and the @code{hh}, @code{ll}, @code{j}, @code{t},
+@code{z} size specifiers.
@item vscanf
@item vsscanf