Update.
1997-10-15 06:56 Ulrich Drepper <drepper@cygnus.com> * Rules: Remove ruls to magically install <subdir>.h headers. Reported by Mark Kettenis <kettenis@phys.uva.nl>. * glibcbug.in: Fix @gnu.ai.mit.edu -> @gnu.org. * version.c: Likewise. * catgets/gencat.c: Likewise. * db2/makedb.c: Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * libc.map: Move _IO_list_all back to GLIBC_2.0. * elf/rtld.c: Provide name of running program to _dl_new_object. * Rules: Implement shared-only-sources. * include/libc-symbols.h: Define default_symbol_version. * libio/Makefile (shared-only-sources): Define. * libio/freopen.c: Define as default version. * libio/iofopen.c: Likewise. * libio/genops.c: Define _IO_list_all here. * libio/stdfiles.c: Create linked list with public names. * libio/oldstdfiles.c: Likewise. * stdio-common/printf.c: Optimize. * stdio-common/scanf.c: Optimize. * sysdeps/generic/setfpucw.c: Include #include <...> not "...". * sysdeps/i386/i486/bits/string.h: Add optimized versions of index and rindex. 1997-10-14 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/arith.texi: Spelling fixes. * manual/conf.texi: Likewise. * manual/creature.texi: Likewise. * manual/filesys.texi: Likewise. * manual/intro.texi: Likewise. * manual/llio.texi: Likewise. * manual/math.texi: Likewise. * manual/message.texi: Likewise. * manual/pattern.texi: Likewise. * manual/search.texi: Likewise. * manual/signal.texi: Likewise. * manual/socket.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/string.texi: Likewise. * manual/time.texi: Likewise. * manual/users.texi: Likewise. 1997-10-13 05:25 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/sys/mman.h: Use __ptr_t instead of __caddr_t. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/mach/hurd/mmap.c: Likewise. * sysdeps/generic/mmap.c: Likewise. * sysdeps/unix/bsd/sun/sunos4/mmap.c: Likewise. * sysdeps/mach/munmap.c: Likewise. * sysdeps/generic/munmap.c: Likewise. * sysdeps/mach/mprotect.c: Likewise. * sysdeps/generic/mprotect.c: Likewise. * sysdeps/generic/msync.c: Likewise. * sysdeps/generic/madvise.c: Likewise. * sysdeps/unix/sysv/linux/madvise.c: Include stub version from generic subdir. 1997-10-12 20:27 Zack Weinberg <zack@rabi.phys.columbia.edu> * sysdeps/stub (all files): Moved to sysdeps/generic. * all files using stub_warning: Include <stub-tag.h>. * include/stub-tag.h: New file, marks stubs in .d files. * Makerules: Look for stub-tag.h, not sysdeps/stub, when building <gnu/stubs.h>. * configure.in: Don't add sysdeps/stub to $sysnames. * sysdeps/unix/Makefile: Look for generic headers, not stub headers. * sysdeps/generic/Makefile: Likewise. * manual/maint.texi: Delete references to sysdeps/stub. * INSTALL: Rebuilt. * configure: Rebuilt.
This commit is contained in:
parent
1ea89a402d
commit
f2ea0f5b0d
89
ChangeLog
89
ChangeLog
|
@ -1,3 +1,92 @@
|
||||||
|
1997-10-15 06:56 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* Rules: Remove ruls to magically install <subdir>.h headers.
|
||||||
|
Reported by Mark Kettenis <kettenis@phys.uva.nl>.
|
||||||
|
|
||||||
|
* glibcbug.in: Fix @gnu.ai.mit.edu -> @gnu.org.
|
||||||
|
* version.c: Likewise.
|
||||||
|
* catgets/gencat.c: Likewise.
|
||||||
|
* db2/makedb.c: Likewise.
|
||||||
|
* locale/programs/locale.c: Likewise.
|
||||||
|
* locale/programs/localedef.c: Likewise.
|
||||||
|
|
||||||
|
* libc.map: Move _IO_list_all back to GLIBC_2.0.
|
||||||
|
|
||||||
|
* elf/rtld.c: Provide name of running program to _dl_new_object.
|
||||||
|
|
||||||
|
* Rules: Implement shared-only-sources.
|
||||||
|
* include/libc-symbols.h: Define default_symbol_version.
|
||||||
|
* libio/Makefile (shared-only-sources): Define.
|
||||||
|
* libio/freopen.c: Define as default version.
|
||||||
|
* libio/iofopen.c: Likewise.
|
||||||
|
* libio/genops.c: Define _IO_list_all here.
|
||||||
|
* libio/stdfiles.c: Create linked list with public names.
|
||||||
|
* libio/oldstdfiles.c: Likewise.
|
||||||
|
|
||||||
|
* stdio-common/printf.c: Optimize.
|
||||||
|
* stdio-common/scanf.c: Optimize.
|
||||||
|
|
||||||
|
* sysdeps/generic/setfpucw.c: Include #include <...> not "...".
|
||||||
|
|
||||||
|
* sysdeps/i386/i486/bits/string.h: Add optimized versions of index and
|
||||||
|
rindex.
|
||||||
|
|
||||||
|
1997-10-14 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* manual/arith.texi: Spelling fixes.
|
||||||
|
* manual/conf.texi: Likewise.
|
||||||
|
* manual/creature.texi: Likewise.
|
||||||
|
* manual/filesys.texi: Likewise.
|
||||||
|
* manual/intro.texi: Likewise.
|
||||||
|
* manual/llio.texi: Likewise.
|
||||||
|
* manual/math.texi: Likewise.
|
||||||
|
* manual/message.texi: Likewise.
|
||||||
|
* manual/pattern.texi: Likewise.
|
||||||
|
* manual/search.texi: Likewise.
|
||||||
|
* manual/signal.texi: Likewise.
|
||||||
|
* manual/socket.texi: Likewise.
|
||||||
|
* manual/startup.texi: Likewise.
|
||||||
|
* manual/stdio.texi: Likewise.
|
||||||
|
* manual/string.texi: Likewise.
|
||||||
|
* manual/time.texi: Likewise.
|
||||||
|
* manual/users.texi: Likewise.
|
||||||
|
|
||||||
|
1997-10-13 05:25 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/generic/sys/mman.h: Use __ptr_t instead of __caddr_t.
|
||||||
|
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
|
||||||
|
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
|
||||||
|
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
|
||||||
|
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
|
||||||
|
* sysdeps/mach/hurd/mmap.c: Likewise.
|
||||||
|
* sysdeps/generic/mmap.c: Likewise.
|
||||||
|
* sysdeps/unix/bsd/sun/sunos4/mmap.c: Likewise.
|
||||||
|
* sysdeps/mach/munmap.c: Likewise.
|
||||||
|
* sysdeps/generic/munmap.c: Likewise.
|
||||||
|
* sysdeps/mach/mprotect.c: Likewise.
|
||||||
|
* sysdeps/generic/mprotect.c: Likewise.
|
||||||
|
* sysdeps/generic/msync.c: Likewise.
|
||||||
|
* sysdeps/generic/madvise.c: Likewise.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/madvise.c: Include stub version from generic
|
||||||
|
subdir.
|
||||||
|
|
||||||
|
1997-10-12 20:27 Zack Weinberg <zack@rabi.phys.columbia.edu>
|
||||||
|
|
||||||
|
* sysdeps/stub (all files): Moved to sysdeps/generic.
|
||||||
|
* all files using stub_warning: Include <stub-tag.h>.
|
||||||
|
* include/stub-tag.h: New file, marks stubs in .d files.
|
||||||
|
* Makerules: Look for stub-tag.h, not sysdeps/stub, when building
|
||||||
|
<gnu/stubs.h>.
|
||||||
|
* configure.in: Don't add sysdeps/stub to $sysnames.
|
||||||
|
* sysdeps/unix/Makefile: Look for generic headers, not stub
|
||||||
|
headers.
|
||||||
|
* sysdeps/generic/Makefile: Likewise.
|
||||||
|
* manual/maint.texi: Delete references to sysdeps/stub.
|
||||||
|
* INSTALL: Rebuilt.
|
||||||
|
* configure: Rebuilt.
|
||||||
|
|
||||||
1997-10-13 03:14 Ulrich Drepper <drepper@cygnus.com>
|
1997-10-13 03:14 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* libc.map: Move _IO_fopen, fopen, _IO_stdin_, _IO_stdout_,
|
* libc.map: Move _IO_fopen, fopen, _IO_stdin_, _IO_stdout_,
|
||||||
|
|
187
INSTALL
187
INSTALL
|
@ -21,28 +21,19 @@ the chosen configuration before proceeding.
|
||||||
Here are some options that you should specify (if appropriate) when
|
Here are some options that you should specify (if appropriate) when
|
||||||
you run `configure':
|
you run `configure':
|
||||||
|
|
||||||
`--with-gnu-ld'
|
`--with-binutils=DIRECTORY'
|
||||||
Use this option if you plan to use GNU `ld' to link programs with
|
Use the binutils (assembler and linker) in `DIRECTORY', not the
|
||||||
the GNU C Library. (We strongly recommend that you do.) This
|
ones the C compiler would default to. You could use this option if
|
||||||
option enables use of features that exist only in GNU `ld'; so if
|
the default binutils on your system cannot deal with all the
|
||||||
you configure for GNU `ld' you must use GNU `ld' *every time* you
|
constructs in the GNU C library. (`configure' will detect the
|
||||||
link with the GNU C Library, and when building it.
|
problem and suppress these constructs, so the library will still
|
||||||
|
be usable, but functionality may be lost--for example, you can not
|
||||||
`--with-gnu-as'
|
build a shared libc with old binutils.)
|
||||||
Use this option if you plan to use the GNU assembler, `gas', when
|
|
||||||
building the GNU C Library. On some systems, the library may not
|
|
||||||
build properly if you do *not* use `gas'.
|
|
||||||
|
|
||||||
`--with-gnu-binutils'
|
|
||||||
This option implies both `--with-gnu-ld' and `--with-gnu-as'. On
|
|
||||||
systems where GNU tools are the system tools, there is no need to
|
|
||||||
specify this option. These include GNU, GNU/Linux, and free BSD
|
|
||||||
systems.
|
|
||||||
|
|
||||||
`--without-fp'
|
`--without-fp'
|
||||||
`--nfp'
|
`--nfp'
|
||||||
Use this option if your computer lacks hardware floating-point
|
Use this option if your computer lacks hardware floating-point
|
||||||
support.
|
support and your operating system does not emulate an FPU.
|
||||||
|
|
||||||
`--prefix=DIRECTORY'
|
`--prefix=DIRECTORY'
|
||||||
Install machine-independent data files in subdirectories of
|
Install machine-independent data files in subdirectories of
|
||||||
|
@ -112,7 +103,7 @@ and define in that file the parameters you want to specify.
|
||||||
`configparms' should *not* be an edited copy of `Makeconfig'; specify
|
`configparms' should *not* be an edited copy of `Makeconfig'; specify
|
||||||
only the parameters that you want to override. To see how to set these
|
only the parameters that you want to override. To see how to set these
|
||||||
parameters, find the section of `Makeconfig' that says "These are the
|
parameters, find the section of `Makeconfig' that says "These are the
|
||||||
configuration variables." Then for each parameter that you want to
|
configuration variables." Then for each parameter that you want to
|
||||||
change, copy the definition from `Makeconfig' to your new `configparms'
|
change, copy the definition from `Makeconfig' to your new `configparms'
|
||||||
file, and change the value as appropriate for your system.
|
file, and change the value as appropriate for your system.
|
||||||
|
|
||||||
|
@ -218,6 +209,7 @@ following patterns:
|
||||||
iX86-ANYTHING-linux
|
iX86-ANYTHING-linux
|
||||||
m68k-ANYTHING-linux
|
m68k-ANYTHING-linux
|
||||||
powerpc-ANYTHING-linux
|
powerpc-ANYTHING-linux
|
||||||
|
sparc64-ANYTHING-linux
|
||||||
|
|
||||||
Former releases of this library (version 1.09.1 and perhaps earlier
|
Former releases of this library (version 1.09.1 and perhaps earlier
|
||||||
versions) used to run on the following configurations:
|
versions) used to run on the following configurations:
|
||||||
|
@ -443,27 +435,36 @@ and `unix/Implies' contains:
|
||||||
|
|
||||||
So the final list is `unix/bsd/vax unix/bsd unix/inet unix posix'.
|
So the final list is `unix/bsd/vax unix/bsd unix/inet unix posix'.
|
||||||
|
|
||||||
`sysdeps' has two "special" subdirectories, called `generic' and
|
`sysdeps' has a "special" subdirectory called `generic'. It is
|
||||||
`stub'. These two are always implicitly appended to the list of
|
always implicitly appended to the list of subdirectories, so you
|
||||||
subdirectories (in that order), so you needn't put them in an `Implies'
|
needn't put it in an `Implies' file, and you should not create any
|
||||||
file, and you should not create any subdirectories under them intended
|
subdirectories under it intended to be new specific categories.
|
||||||
to be new specific categories. `generic' is for things that can be
|
`generic' serves two purposes. First, the makefiles do not bother to
|
||||||
implemented in machine-independent C, using only other
|
look for a system-dependent version of a file that's not in `generic'.
|
||||||
machine-independent functions in the C library. `stub' is for "stub"
|
This means that any system-dependent source file must have an analogue
|
||||||
versions of functions which cannot be implemented on a particular
|
in `generic', even if the routines defined by that file are not
|
||||||
machine or operating system. The stub functions always return an
|
implemented on other platforms. Second. the `generic' version of a
|
||||||
error, and set `errno' to `ENOSYS' (Function not implemented). *Note
|
system-dependent file is used if the makefiles do not find a version
|
||||||
Error Reporting::.
|
specific to the system you're compiling for.
|
||||||
|
|
||||||
A source file is known to be system-dependent by its having a
|
If it is possible to implement the routines in a `generic' file in
|
||||||
version in `generic' or `stub'; every generally-available function whose
|
machine-independent C, using only other machine-independent functions in
|
||||||
implementation is system-dependent in should have either a generic or
|
the C library, then you should do so. Otherwise, make them stubs. A
|
||||||
stub implementation (there is no point in having both). Some rare
|
"stub" function is a function which cannot be implemented on a
|
||||||
functions are only useful on specific systems and aren't defined at all
|
particular machine or operating system. Stub functions always return an
|
||||||
on others; these do not appear anywhere in the system-independent
|
error, and set `errno' to `ENOSYS' (Function not implemented). *Note
|
||||||
source code or makefiles (including the `generic' and `stub'
|
Error Reporting::. If you define a stub function, you must place the
|
||||||
directories), only in the system-dependent `Makefile' in the specific
|
statement `stub_warning(FUNCTION)', where FUNCTION is the name of your
|
||||||
system's subdirectory.
|
function, after its definition; also, you must include the file
|
||||||
|
`<stub-tag.h>' into your file. This causes the function to be listed
|
||||||
|
in the installed `<gnu/stubs.h>', and makes GNU ld warn when the
|
||||||
|
function is used.
|
||||||
|
|
||||||
|
Some rare functions are only useful on specific systems and aren't
|
||||||
|
defined at all on others; these do not appear anywhere in the
|
||||||
|
system-independent source code or makefiles (including the `generic'
|
||||||
|
and `stub' directories), only in the system-dependent `Makefile' in the
|
||||||
|
specific system's subdirectory.
|
||||||
|
|
||||||
If you come across a file that is in one of the main source
|
If you come across a file that is in one of the main source
|
||||||
directories (`string', `stdio', etc.), and you want to write a machine-
|
directories (`string', `stdio', etc.), and you want to write a machine-
|
||||||
|
@ -640,10 +641,8 @@ machine should go in `sysdeps/MACHINE/fpu'.
|
||||||
hierarchy that are not for particular machine architectures.
|
hierarchy that are not for particular machine architectures.
|
||||||
|
|
||||||
`generic'
|
`generic'
|
||||||
`stub'
|
As described above (*note Porting::.), this is the subdirectory
|
||||||
As described above (*note Porting::.), these are the two
|
that every configuration implicitly uses after all others.
|
||||||
subdirectories that every configuration implicitly uses after all
|
|
||||||
others.
|
|
||||||
|
|
||||||
`ieee754'
|
`ieee754'
|
||||||
This directory is for code using the IEEE 754 floating-point
|
This directory is for code using the IEEE 754 floating-point
|
||||||
|
@ -971,3 +970,105 @@ parts of the library were contributed or worked on by other people.
|
||||||
extensions that they make and grant Carnegie Mellon the
|
extensions that they make and grant Carnegie Mellon the
|
||||||
rights to redistribute these changes.
|
rights to redistribute these changes.
|
||||||
|
|
||||||
|
* The code for the database library `libdb' comes from the 2.3
|
||||||
|
release of Berkeley DB. That code is under the same copyright as
|
||||||
|
4.4 BSD and also:
|
||||||
|
|
||||||
|
Copyright (C) 1990, 1993, 1994, 1995, 1996, 1997
|
||||||
|
Sleepycat Software. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or
|
||||||
|
without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Redistributions in any form must be accompanied by
|
||||||
|
information on how to obtain complete source code for
|
||||||
|
the DB software and any accompanying software that uses
|
||||||
|
the DB software. The source code must either be
|
||||||
|
included in the distribution or be available for no more
|
||||||
|
than the cost of distribution plus a nominal fee, and
|
||||||
|
must be freely redistributable under reasonable
|
||||||
|
conditions. For an executable file, complete source
|
||||||
|
code means the source code for all modules it contains.
|
||||||
|
It does not mean source code for modules or files that
|
||||||
|
typically accompany the operating system on which the
|
||||||
|
executable file runs, e.g., standard library modules or
|
||||||
|
system header files.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
SLEEPYCAT SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGE.
|
||||||
|
|
||||||
|
Portions copyright (C) 1995, 1996
|
||||||
|
The President and Fellows of Harvard University.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or
|
||||||
|
without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
1. Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
3. All advertising materials mentioning features or use of
|
||||||
|
this software must display the following acknowledgement:
|
||||||
|
This product includes software developed by
|
||||||
|
Harvard University and its contributors.
|
||||||
|
|
||||||
|
4. Neither the name of the University nor the names of its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior
|
||||||
|
written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS "AS
|
||||||
|
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||||
|
SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||||
|
OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
For a license to use, redistribute or sell DB software under
|
||||||
|
conditions other than those described above, or to purchase
|
||||||
|
support for this software, please contact Sleepycat Software
|
||||||
|
at
|
||||||
|
|
||||||
|
Sleepycat Software
|
||||||
|
394 E. Riding Dr.
|
||||||
|
Carlisle, MA 01741
|
||||||
|
USA
|
||||||
|
+1-508-287-4781
|
||||||
|
|
||||||
|
or <db@sleepycat.com>.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -896,18 +896,19 @@ common-clean: common-mostlyclean
|
||||||
|
|
||||||
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
|
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
|
||||||
# for each function which is a stub. We grovel over all the .d files
|
# for each function which is a stub. We grovel over all the .d files
|
||||||
# looking for references to source files in sysdeps/stub. Then we grovel
|
# looking for references to <stub-tag.h>. Then we grovel over each
|
||||||
# over each referenced source file to see what stub function it defines.
|
# referenced source file to see what stub function it defines.
|
||||||
|
|
||||||
.PHONY: stubs # The parent Makefile calls this target.
|
.PHONY: stubs # The parent Makefile calls this target.
|
||||||
stubs: $(common-objpfx)stub-$(subdir)
|
stubs: $(common-objpfx)stub-$(subdir)
|
||||||
s = $(sysdep_dir)/stub
|
s = $(sysdep_dir)/generic
|
||||||
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
||||||
# Use /dev/null since `...` might expand to empty.
|
# Use /dev/null since `...` might expand to empty.
|
||||||
(s=`cd $s; /bin/pwd`; \
|
(s=`cd $s; /bin/pwd`; \
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd %;,$(objpfx)) \
|
||||||
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
||||||
`sed -n 's@^.*$s/\([a-z0-9_-]*\.c\).*$$@'"$$s"/'\1@p' \
|
`sed -n -e '\@: $s@{; s@^.*: $s/\([a-z0-9_./-]*\.c\).*$$@'"$$s"'/\1@; h; }' \
|
||||||
|
-e '/stub-tag\.h/{; g; p; }' \
|
||||||
$(patsubst $(objpfx)%,%,$^) /dev/null` \
|
$(patsubst $(objpfx)%,%,$^) /dev/null` \
|
||||||
/dev/null) > $@T
|
/dev/null) > $@T
|
||||||
mv -f $@T $@
|
mv -f $@T $@
|
||||||
|
|
21
Rules
21
Rules
|
@ -59,12 +59,6 @@ ifneq "$(findstring env,$(origin common-generated))" ""
|
||||||
common-generated :=
|
common-generated :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(strip $(headers))" ""
|
|
||||||
ifneq "$(wildcard $(subdir).h)" ""
|
|
||||||
override headers := $(subdir).h
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../Makerules
|
include ../Makerules
|
||||||
|
|
||||||
.PHONY: subdir_lib
|
.PHONY: subdir_lib
|
||||||
|
@ -173,3 +167,18 @@ $(static-only-routines:%=$(objpfx)%.os): %.os: $(common-objpfx)empty.os
|
||||||
$(common-objpfx)empty.os: $(common-objpfx)empty.c $(before-compile)
|
$(common-objpfx)empty.os: $(common-objpfx)empty.c $(before-compile)
|
||||||
$(compile-command.c)
|
$(compile-command.c)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef shared-only-routines
|
||||||
|
# If we have versioned code we don't need the old versions in any of the
|
||||||
|
# static libraries.
|
||||||
|
define o-iterator-doit
|
||||||
|
$(shared-only-routines:%=$(objpfx)%.$o): %.$o: $(common-objpfx)empty.$o
|
||||||
|
rm -f $$@
|
||||||
|
ln $$< $$@
|
||||||
|
|
||||||
|
$(common-objpfx)empty.$o: $(common-objpfx)empty.c $(before-compile)
|
||||||
|
$$(compile-command.c)
|
||||||
|
endef
|
||||||
|
object-suffixes-left := $(filter-out .os,$(object-suffixes))
|
||||||
|
include $(o-iterator)
|
||||||
|
endif
|
||||||
|
|
|
@ -220,7 +220,7 @@ more_help (int key, const char *text, void *input)
|
||||||
case ARGP_KEY_HELP_EXTRA:
|
case ARGP_KEY_HELP_EXTRA:
|
||||||
/* We print some extra information. */
|
/* We print some extra information. */
|
||||||
return strdup (gettext ("\
|
return strdup (gettext ("\
|
||||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"));
|
Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1056,10 +1056,10 @@ while test $# -gt 0; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add the default directories.
|
# Add the default directories.
|
||||||
sysnames="$names sysdeps/generic sysdeps/stub"
|
sysnames="$names sysdeps/generic"
|
||||||
|
|
||||||
# The other names were emitted during the scan.
|
# The other names were emitted during the scan.
|
||||||
echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
|
echo "$ac_t""sysdeps/generic" 1>&6
|
||||||
|
|
||||||
|
|
||||||
### Locate tools.
|
### Locate tools.
|
||||||
|
|
|
@ -388,10 +388,10 @@ changequote([,])dnl
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add the default directories.
|
# Add the default directories.
|
||||||
sysnames="$names sysdeps/generic sysdeps/stub"
|
sysnames="$names sysdeps/generic"
|
||||||
AC_SUBST(sysnames)
|
AC_SUBST(sysnames)
|
||||||
# The other names were emitted during the scan.
|
# The other names were emitted during the scan.
|
||||||
AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
|
AC_MSG_RESULT(sysdeps/generic)
|
||||||
|
|
||||||
|
|
||||||
### Locate tools.
|
### Locate tools.
|
||||||
|
|
|
@ -217,7 +217,7 @@ more_help (int key, const char *text, void *input)
|
||||||
case ARGP_KEY_HELP_EXTRA:
|
case ARGP_KEY_HELP_EXTRA:
|
||||||
/* We print some extra information. */
|
/* We print some extra information. */
|
||||||
return strdup (gettext ("\
|
return strdup (gettext ("\
|
||||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"));
|
Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -395,7 +395,8 @@ of this helper program; chances are you did not intend to run this program.\n",
|
||||||
{
|
{
|
||||||
/* Create a link_map for the executable itself.
|
/* Create a link_map for the executable itself.
|
||||||
This will be what dlopen on "" returns. */
|
This will be what dlopen on "" returns. */
|
||||||
main_map = _dl_new_object ((char *) "", "", lt_executable);
|
main_map = _dl_new_object (_dl_argv[0] ?: (char *) "<main program>",
|
||||||
|
"", lt_executable);
|
||||||
if (main_map == NULL)
|
if (main_map == NULL)
|
||||||
_dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL);
|
_dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL);
|
||||||
main_map->l_phdr = phdr;
|
main_map->l_phdr = phdr;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# these variables are filled in by configure
|
# these variables are filled in by configure
|
||||||
#
|
#
|
||||||
VERSION="@VERSION@"
|
VERSION="@VERSION@"
|
||||||
BUGGLIBC="bugs@gnu.ai.mit.edu"
|
BUGGLIBC="bugs@gnu.org"
|
||||||
ADDONS="@subdirs@"
|
ADDONS="@subdirs@"
|
||||||
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||||||
|
|
|
@ -328,8 +328,11 @@ extern const char _libc_intl_domainname[];
|
||||||
#if DO_VERSIONING
|
#if DO_VERSIONING
|
||||||
# define symbol_version(real, name, version) \
|
# define symbol_version(real, name, version) \
|
||||||
__asm__ (".symver " #real "," #name "@" #version)
|
__asm__ (".symver " #real "," #name "@" #version)
|
||||||
|
# define default_symbol_version(real, name, version) \
|
||||||
|
__asm__ (".symver " #real "," #name "@@" #version)
|
||||||
#else
|
#else
|
||||||
# define symbol_version(real, name, version)
|
# define symbol_version(real, name, version)
|
||||||
|
# define default_symbol_version(real, name, version)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* libc-symbols.h */
|
#endif /* libc-symbols.h */
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
/* This header is included into every file that declares a stub function.
|
||||||
|
* The build process looks for this header in .d files to decide whether
|
||||||
|
* or not it needs to scan the corresponding .c file for entries to add to
|
||||||
|
* <gnu/stubs.h>.
|
||||||
|
*/
|
4
libc.map
4
libc.map
|
@ -413,12 +413,14 @@ GLIBC_2.0 {
|
||||||
xdrrec_endofrecord; xdrrec_eof; xdrrec_skiprecord; xdrstdio_create;
|
xdrrec_endofrecord; xdrrec_eof; xdrrec_skiprecord; xdrstdio_create;
|
||||||
xencrypt; xprt_register; xprt_unregister;
|
xencrypt; xprt_register; xprt_unregister;
|
||||||
|
|
||||||
|
_IO_list_all;
|
||||||
|
|
||||||
local:
|
local:
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
|
||||||
GLIBC_2.1 {
|
GLIBC_2.1 {
|
||||||
global:
|
global:
|
||||||
_IO_fopen; fopen; _IO_stdin_; _IO_stdout_; _IO_stderr_; _IO_list_all;
|
_IO_fopen; fopen; _IO_stdin_; _IO_stdout_; _IO_stderr_;
|
||||||
freopen;
|
freopen;
|
||||||
} GLIBC_2.0;
|
} GLIBC_2.0;
|
|
@ -62,6 +62,8 @@ ifeq ($(versioning),yes)
|
||||||
aux += oldfileops oldstdfiles
|
aux += oldfileops oldstdfiles
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
shared-only-routines = oldiofopen oldfreopen oldfileops oldstdfiles
|
||||||
|
|
||||||
distribute := iolibio.h libioP.h strfile.h Banner
|
distribute := iolibio.h libioP.h strfile.h Banner
|
||||||
|
|
||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
|
@ -43,4 +43,4 @@ __new_freopen (filename, mode, fp)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
symbol_version (__new_freopen, freopen, GLIBC_2.1);
|
default_symbol_version (__new_freopen, freopen, GLIBC_2.1);
|
||||||
|
|
|
@ -710,6 +710,8 @@ _IO_cleanup ()
|
||||||
_IO_unbuffer_all ();
|
_IO_unbuffer_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_IO_FILE *_IO_list_all = &_IO_stderr_.plus.file;
|
||||||
|
|
||||||
void
|
void
|
||||||
_IO_init_marker (marker, fp)
|
_IO_init_marker (marker, fp)
|
||||||
struct _IO_marker *marker;
|
struct _IO_marker *marker;
|
||||||
|
|
|
@ -61,8 +61,8 @@ _IO_new_fopen (filename, mode)
|
||||||
|
|
||||||
#ifdef DO_VERSIONING
|
#ifdef DO_VERSIONING
|
||||||
strong_alias (_IO_new_fopen, __new_fopen)
|
strong_alias (_IO_new_fopen, __new_fopen)
|
||||||
symbol_version (_IO_new_fopen, _IO_fopen, GLIBC_2.1);
|
default_symbol_version (_IO_new_fopen, _IO_fopen, GLIBC_2.1);
|
||||||
symbol_version (__new_fopen, fopen, GLIBC_2.1);
|
default_symbol_version (__new_fopen, fopen, GLIBC_2.1);
|
||||||
#else
|
#else
|
||||||
# ifdef weak_alias
|
# ifdef weak_alias
|
||||||
weak_symbol (_IO_new_fopen, _IO_fopen)
|
weak_symbol (_IO_new_fopen, _IO_fopen)
|
||||||
|
|
|
@ -46,10 +46,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEF_STDFILE(_IO_old_stdin_, _IO_stdin_, 0, 0, _IO_NO_WRITES);
|
DEF_STDFILE(_IO_old_stdin_, _IO_stdin_, 0, 0, _IO_NO_WRITES);
|
||||||
DEF_STDFILE(_IO_old_stdout_, _IO_stdout_, 1, &_IO_old_stdin_.file,
|
DEF_STDFILE(_IO_old_stdout_, _IO_stdout_, 1, &_IO_stdin_.plus.file,
|
||||||
_IO_NO_READS);
|
_IO_NO_READS);
|
||||||
DEF_STDFILE(_IO_old_stderr_, _IO_stderr_, 2, &_IO_old_stdout_.file,
|
DEF_STDFILE(_IO_old_stderr_, _IO_stderr_, 2, &_IO_stdout_.plus.file,
|
||||||
_IO_NO_READS+_IO_UNBUFFERED);
|
_IO_NO_READS+_IO_UNBUFFERED);
|
||||||
|
|
||||||
_IO_FILE *_IO_old_list_all = &_IO_old_stderr_.file;
|
#if 0
|
||||||
|
_IO_FILE *_IO_old_list_all = &_IO_stderr_.plus.file;
|
||||||
symbol_version (_IO_old_list_all, _IO_list_all,);
|
symbol_version (_IO_old_list_all, _IO_list_all,);
|
||||||
|
#endif
|
||||||
|
|
|
@ -37,19 +37,21 @@
|
||||||
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
||||||
struct _IO_FILE_complete INAME \
|
struct _IO_FILE_complete INAME \
|
||||||
= {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \
|
= {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \
|
||||||
symbol_version (INAME, NAME, GLIBC_2.1)
|
default_symbol_version (INAME, NAME, GLIBC_2.1)
|
||||||
#else
|
#else
|
||||||
#define DEF_STDFILE(INAME, FD, CHAIN, FLAGS) \
|
#define DEF_STDFILE(INAME, FD, CHAIN, FLAGS) \
|
||||||
struct _IO_FILE_complete INAME \
|
struct _IO_FILE_complete INAME \
|
||||||
= {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \
|
= {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \
|
||||||
symbol_version (INAME, NAME, GLIBC_2.1)
|
default_symbol_version (INAME, NAME, GLIBC_2.1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEF_STDFILE(_IO_new_stdin_, _IO_stdin_, 0, 0, _IO_NO_WRITES);
|
DEF_STDFILE(_IO_new_stdin_, _IO_stdin_, 0, 0, _IO_NO_WRITES);
|
||||||
DEF_STDFILE(_IO_new_stdout_, _IO_stdout_, 1, &_IO_new_stdin_.plus.file,
|
DEF_STDFILE(_IO_new_stdout_, _IO_stdout_, 1, &_IO_stdin_.plus.file,
|
||||||
_IO_NO_READS);
|
_IO_NO_READS);
|
||||||
DEF_STDFILE(_IO_new_stderr_, _IO_stderr_, 2, &_IO_new_stdout_.plus.file,
|
DEF_STDFILE(_IO_new_stderr_, _IO_stderr_, 2, &_IO_stdout_.plus.file,
|
||||||
_IO_NO_READS+_IO_UNBUFFERED);
|
_IO_NO_READS+_IO_UNBUFFERED);
|
||||||
|
|
||||||
_IO_FILE *_IO_new_list_all = &_IO_new_stderr_.plus.file;
|
#if 0
|
||||||
symbol_version (_IO_new_list_all, _IO_list_all, GLIBC_2.1);
|
_IO_FILE *_IO_new_list_all = &_IO_stderr_.plus.file;
|
||||||
|
default_symbol_version (_IO_new_list_all, _IO_list_all, GLIBC_2.1);
|
||||||
|
#endif
|
||||||
|
|
|
@ -252,7 +252,7 @@ more_help (int key, const char *text, void *input)
|
||||||
case ARGP_KEY_HELP_EXTRA:
|
case ARGP_KEY_HELP_EXTRA:
|
||||||
/* We print some extra information. */
|
/* We print some extra information. */
|
||||||
return strdup (gettext ("\
|
return strdup (gettext ("\
|
||||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"));
|
Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,7 +379,7 @@ System's directory for character maps: %s\n\
|
||||||
locale files : %s\n\
|
locale files : %s\n\
|
||||||
%s"),
|
%s"),
|
||||||
CHARMAP_PATH, LOCALE_PATH, gettext ("\
|
CHARMAP_PATH, LOCALE_PATH, gettext ("\
|
||||||
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"));
|
Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
|
||||||
return cp;
|
return cp;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -12,7 +12,7 @@ These functions are declared in the header files @file{math.h} and
|
||||||
* Not a Number:: Making NaNs and testing for NaNs.
|
* Not a Number:: Making NaNs and testing for NaNs.
|
||||||
* Imaginary Unit:: Constructing complex Numbers.
|
* Imaginary Unit:: Constructing complex Numbers.
|
||||||
* Predicates on Floats:: Testing for infinity and for NaNs.
|
* Predicates on Floats:: Testing for infinity and for NaNs.
|
||||||
* Floating-Point Classes:: Classifiy floating-point numbers.
|
* Floating-Point Classes:: Classify floating-point numbers.
|
||||||
* Operations on Complex:: Projections, Conjugates, and Decomposing.
|
* Operations on Complex:: Projections, Conjugates, and Decomposing.
|
||||||
* Absolute Value:: Absolute value functions.
|
* Absolute Value:: Absolute value functions.
|
||||||
* Normalization Functions:: Hacks for radix-2 representations.
|
* Normalization Functions:: Hacks for radix-2 representations.
|
||||||
|
@ -41,13 +41,13 @@ these situations. There is a special value for infinity.
|
||||||
@comment math.h
|
@comment math.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypevr Macro float_t INFINITY
|
@deftypevr Macro float_t INFINITY
|
||||||
A expression representing the inifite value. @code{INFINITY} values are
|
A expression representing the infinite value. @code{INFINITY} values are
|
||||||
produce by mathematical operations like @code{1.0 / 0.0}. It is
|
produce by mathematical operations like @code{1.0 / 0.0}. It is
|
||||||
possible to continue the computations with this value since the basic
|
possible to continue the computations with this value since the basic
|
||||||
operations as well as the mathematical library functions are prepared to
|
operations as well as the mathematical library functions are prepared to
|
||||||
handle values like this.
|
handle values like this.
|
||||||
|
|
||||||
Beside @code{INFINITY} also the value @code{-INIFITY} is representable
|
Beside @code{INFINITY} also the value @code{-INFINITY} is representable
|
||||||
and it is handled differently if needed. It is possible to test a
|
and it is handled differently if needed. It is possible to test a
|
||||||
variables for infinite value using a simple comparison but the
|
variables for infinite value using a simple comparison but the
|
||||||
recommended way is to use the the @code{isinf} function.
|
recommended way is to use the the @code{isinf} function.
|
||||||
|
@ -103,7 +103,7 @@ such as by defining @code{_GNU_SOURCE}, and then you must include
|
||||||
@pindex complex.h
|
@pindex complex.h
|
||||||
To construct complex numbers it is necessary have a way to express the
|
To construct complex numbers it is necessary have a way to express the
|
||||||
imaginary part of the numbers. In mathematics one uses the symbol ``i''
|
imaginary part of the numbers. In mathematics one uses the symbol ``i''
|
||||||
to mark a number as imaginary. For convenienve the @file{complex.h}
|
to mark a number as imaginary. For convenience the @file{complex.h}
|
||||||
header defines two macros which allow to use a similar easy notation.
|
header defines two macros which allow to use a similar easy notation.
|
||||||
|
|
||||||
@deftypevr Macro float_t _Imaginary_I
|
@deftypevr Macro float_t _Imaginary_I
|
||||||
|
@ -284,7 +284,7 @@ situation the function be absolutely necessary one can use
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
to avoid the macro expansion. Using the macro has two big adavantages:
|
to avoid the macro expansion. Using the macro has two big advantages:
|
||||||
it is more portable and one does not have to choose the right function
|
it is more portable and one does not have to choose the right function
|
||||||
among @code{isnan}, @code{isnanf}, and @code{isnanl}.
|
among @code{isnan}, @code{isnanf}, and @code{isnanl}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
@ -297,7 +297,7 @@ among @code{isnan}, @code{isnanf}, and @code{isnanl}.
|
||||||
@cindex decompose complex numbers
|
@cindex decompose complex numbers
|
||||||
|
|
||||||
This section lists functions performing some of the simple mathematical
|
This section lists functions performing some of the simple mathematical
|
||||||
operations on complex numbers. Using any of the function requries that
|
operations on complex numbers. Using any of the function requires that
|
||||||
the C compiler understands the @code{complex} keyword, introduced to the
|
the C compiler understands the @code{complex} keyword, introduced to the
|
||||||
C language in the @w{ISO C 9X} standard.
|
C language in the @w{ISO C 9X} standard.
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ cut along the negative real axis.
|
||||||
@deftypefunx {complex long double} cprojl (complex long double @var{z})
|
@deftypefunx {complex long double} cprojl (complex long double @var{z})
|
||||||
Return the projection of the complex value @var{z} on the Riemann
|
Return the projection of the complex value @var{z} on the Riemann
|
||||||
sphere. Values with a infinite complex part (even if the real part
|
sphere. Values with a infinite complex part (even if the real part
|
||||||
is NaN) are projected to positive infinte on the real axis. If the real part is infinite, the result is equivalent to
|
is NaN) are projected to positive infinite on the real axis. If the real part is infinite, the result is equivalent to
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
INFINITY + I * copysign (0.0, cimag (z))
|
INFINITY + I * copysign (0.0, cimag (z))
|
||||||
|
@ -531,7 +531,7 @@ bit set.
|
||||||
This is not the same as @code{x < 0.0} since in some floating-point
|
This is not the same as @code{x < 0.0} since in some floating-point
|
||||||
formats (e.g., @w{IEEE 754}) the zero value is optionally signed. The
|
formats (e.g., @w{IEEE 754}) the zero value is optionally signed. The
|
||||||
comparison @code{-0.0 < 0.0} will not be true while @code{signbit
|
comparison @code{-0.0 < 0.0} will not be true while @code{signbit
|
||||||
(-0.0)} will return a nonzeri value.
|
(-0.0)} will return a nonzero value.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@node Rounding and Remainders
|
@node Rounding and Remainders
|
||||||
|
@ -599,7 +599,7 @@ raise the inexact exception.
|
||||||
@comment math.h
|
@comment math.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefun double modf (double @var{value}, double *@var{integer-part})
|
@deftypefun double modf (double @var{value}, double *@var{integer-part})
|
||||||
@deftypefunx float modff (flaot @var{value}, float *@var{integer-part})
|
@deftypefunx float modff (float @var{value}, float *@var{integer-part})
|
||||||
@deftypefunx {long double} modfl (long double @var{value}, long double *@var{integer-part})
|
@deftypefunx {long double} modfl (long double @var{value}, long double *@var{integer-part})
|
||||||
These functions break the argument @var{value} into an integer part and a
|
These functions break the argument @var{value} into an integer part and a
|
||||||
fractional part (between @code{-1} and @code{1}, exclusive). Their sum
|
fractional part (between @code{-1} and @code{1}, exclusive). Their sum
|
||||||
|
@ -1060,7 +1060,7 @@ format supports this; and to the largest representable value otherwise.
|
||||||
If the input string is @code{"nan"} or
|
If the input string is @code{"nan"} or
|
||||||
@code{"nan(@var{n-char-sequence})"} the return value of @code{strtod} is
|
@code{"nan(@var{n-char-sequence})"} the return value of @code{strtod} is
|
||||||
the representation of the NaN (not a number) value (if the
|
the representation of the NaN (not a number) value (if the
|
||||||
flaoting-point formats supports this. The form with the
|
floating-point formats supports this. The form with the
|
||||||
@var{n-char-sequence} enables in an implementation specific way to
|
@var{n-char-sequence} enables in an implementation specific way to
|
||||||
specify the form of the NaN value. When using the @w{IEEE 754}
|
specify the form of the NaN value. When using the @w{IEEE 754}
|
||||||
floating-point format, the NaN value can have a lot of forms since only
|
floating-point format, the NaN value can have a lot of forms since only
|
||||||
|
|
|
@ -1601,56 +1601,56 @@ after logging in.
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS_CFLAGS
|
@item _CS_LFS_CFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the C compiler if a source is compiled using the
|
the C compiler if a source is compiled using the
|
||||||
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS_LDFLAGS
|
@item _CS_LFS_LDFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the linker if a source is compiled using the
|
the linker if a source is compiled using the
|
||||||
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS_LIBS
|
@item _CS_LFS_LIBS
|
||||||
The returned string specifies which additionals libraries must be linked
|
The returned string specifies which additional libraries must be linked
|
||||||
to the application if a source is compiled using the
|
to the application if a source is compiled using the
|
||||||
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS_LINTFLAGS
|
@item _CS_LFS_LINTFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the the lint tool if a source is compiled using the
|
the the lint tool if a source is compiled using the
|
||||||
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS64_CFLAGS
|
@item _CS_LFS64_CFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the C compiler if a source is compiled using the
|
the C compiler if a source is compiled using the
|
||||||
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS64_LDFLAGS
|
@item _CS_LFS64_LDFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the linker if a source is compiled using the
|
the linker if a source is compiled using the
|
||||||
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS64_LIBS
|
@item _CS_LFS64_LIBS
|
||||||
The returned string specifies which additionals libraries must be linked
|
The returned string specifies which additional libraries must be linked
|
||||||
to the application if a source is compiled using the
|
to the application if a source is compiled using the
|
||||||
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment Unix98
|
@comment Unix98
|
||||||
@item _CS_LFS64_LINTFLAGS
|
@item _CS_LFS64_LINTFLAGS
|
||||||
The returned string specifies which additionals flags must be given to
|
The returned string specifies which additional flags must be given to
|
||||||
the the lint tool if a source is compiled using the
|
the the lint tool if a source is compiled using the
|
||||||
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
@code{_LARGEFILE64_SOURCE} feature select macro; @pxref{Feature Test Macros}.
|
||||||
@end table
|
@end table
|
||||||
|
|
|
@ -95,7 +95,7 @@ Single Unix specification, @w{version 2}.
|
||||||
@comment X/Open
|
@comment X/Open
|
||||||
@defvr Macro _LARGEFILE_SOURCE
|
@defvr Macro _LARGEFILE_SOURCE
|
||||||
If this macro is defined some extra functions are available which
|
If this macro is defined some extra functions are available which
|
||||||
rectify a few shortcomings in all previous standards. More concreten
|
rectify a few shortcomings in all previous standards. More concrete
|
||||||
the functions @code{fseeko} and @code{ftello} are available. Without
|
the functions @code{fseeko} and @code{ftello} are available. Without
|
||||||
these functions the difference between the @w{ISO C} interface
|
these functions the difference between the @w{ISO C} interface
|
||||||
(@code{fseek}, @code{ftell}) and the low-level POSIX interface
|
(@code{fseek}, @code{ftell}) and the low-level POSIX interface
|
||||||
|
|
|
@ -18,7 +18,7 @@ access permissions and modification times.
|
||||||
* Accessing Directories:: Finding out what files a directory
|
* Accessing Directories:: Finding out what files a directory
|
||||||
contains.
|
contains.
|
||||||
* Working on Directory Trees:: Apply actions to all files or a selectable
|
* Working on Directory Trees:: Apply actions to all files or a selectable
|
||||||
subset of a directory hierachy.
|
subset of a directory hierarchy.
|
||||||
* Hard Links:: Adding alternate names to a file.
|
* Hard Links:: Adding alternate names to a file.
|
||||||
* Symbolic Links:: A file that ``points to'' a file name.
|
* Symbolic Links:: A file that ``points to'' a file name.
|
||||||
* Deleting Files:: How to delete a file, and what that means.
|
* Deleting Files:: How to delete a file, and what that means.
|
||||||
|
@ -504,14 +504,14 @@ we want to see all directory entries we always return @code{1}.
|
||||||
|
|
||||||
@node Working on Directory Trees
|
@node Working on Directory Trees
|
||||||
@section Working on Directory Trees
|
@section Working on Directory Trees
|
||||||
@cindex directory hierachy
|
@cindex directory hierarchy
|
||||||
@cindex hierachy, directory
|
@cindex hierarchy, directory
|
||||||
@cindex tree, directory
|
@cindex tree, directory
|
||||||
|
|
||||||
The functions to handle files in directories described so far allowed to
|
The functions to handle files in directories described so far allowed to
|
||||||
retrieve all the information in small pieces or process all files in a
|
retrieve all the information in small pieces or process all files in a
|
||||||
directory (see @code{scandir}). Sometimes it is useful to process whole
|
directory (see @code{scandir}). Sometimes it is useful to process whole
|
||||||
hierachies of directories and the contained files. The X/Open
|
hierarchies of directories and the contained files. The X/Open
|
||||||
specification define two functions to do this. The simpler form is
|
specification define two functions to do this. The simpler form is
|
||||||
derived from an early definition in @w{System V} systems and therefore
|
derived from an early definition in @w{System V} systems and therefore
|
||||||
this function is available on SVID derived systems. The prototypes and
|
this function is available on SVID derived systems. The prototypes and
|
||||||
|
@ -591,7 +591,7 @@ with some extra information as described below.
|
||||||
@deftp {Data Type} {struct FTW}
|
@deftp {Data Type} {struct FTW}
|
||||||
The contained information helps to interpret the name parameter and
|
The contained information helps to interpret the name parameter and
|
||||||
gives some information about current state of the traversal of the
|
gives some information about current state of the traversal of the
|
||||||
directory hierachy.
|
directory hierarchy.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item int base
|
@item int base
|
||||||
|
@ -644,7 +644,7 @@ The @var{descriptors} parameter to the @code{ftw} function specifies how
|
||||||
many file descriptors the @code{ftw} function is allowed to consume.
|
many file descriptors the @code{ftw} function is allowed to consume.
|
||||||
The more descriptors can be used the faster the function can run. For
|
The more descriptors can be used the faster the function can run. For
|
||||||
each level of directories at most one descriptor is used so that for
|
each level of directories at most one descriptor is used so that for
|
||||||
very deep directory hierachies the limit on open file descriptors for
|
very deep directory hierarchies the limit on open file descriptors for
|
||||||
the process or the system can be exceeded. Beside this the limit on
|
the process or the system can be exceeded. Beside this the limit on
|
||||||
file descriptors is counted together for all threads in a multi-threaded
|
file descriptors is counted together for all threads in a multi-threaded
|
||||||
program and therefore it is always good too limit the maximal number of
|
program and therefore it is always good too limit the maximal number of
|
||||||
|
@ -679,7 +679,7 @@ values, combined using bitwise OR.
|
||||||
While traversing the directory symbolic links are not followed. I.e.,
|
While traversing the directory symbolic links are not followed. I.e.,
|
||||||
if this flag is given symbolic links are reported using the
|
if this flag is given symbolic links are reported using the
|
||||||
@code{FTW_SL} value for the type parameter to the callback function.
|
@code{FTW_SL} value for the type parameter to the callback function.
|
||||||
Please note that if this flag is used the appearence of @code{FTW_SL} in
|
Please note that if this flag is used the appearance of @code{FTW_SL} in
|
||||||
a callback function does not mean the referenced file does not exist.
|
a callback function does not mean the referenced file does not exist.
|
||||||
To indicate this the extra value @code{FTW_SLN} exists.
|
To indicate this the extra value @code{FTW_SLN} exists.
|
||||||
@item FTW_MOUNT
|
@item FTW_MOUNT
|
||||||
|
@ -1447,7 +1447,7 @@ This macro returns nonzero if the file is a symbolic link.
|
||||||
This macro returns nonzero if the file is a socket. @xref{Sockets}.
|
This macro returns nonzero if the file is a socket. @xref{Sockets}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
An alterate non-POSIX method of testing the file type is supported for
|
An alternate non-POSIX method of testing the file type is supported for
|
||||||
compatibility with BSD. The mode can be bitwise ANDed with
|
compatibility with BSD. The mode can be bitwise ANDed with
|
||||||
@code{S_IFMT} to extract the file type code, and compared to the
|
@code{S_IFMT} to extract the file type code, and compared to the
|
||||||
appropriate type code constant. For example,
|
appropriate type code constant. For example,
|
||||||
|
@ -1780,7 +1780,7 @@ used as the swap area of diskless client machines. The idea is that the
|
||||||
pages of the file will be cached in the client's memory, so it is a
|
pages of the file will be cached in the client's memory, so it is a
|
||||||
waste of the server's memory to cache them a second time. In this use
|
waste of the server's memory to cache them a second time. In this use
|
||||||
the sticky bit also says that the filesystem may fail to record the
|
the sticky bit also says that the filesystem may fail to record the
|
||||||
file's modification time onto disk reliably (the idea being that noone
|
file's modification time onto disk reliably (the idea being that no-one
|
||||||
cares for a swap file).
|
cares for a swap file).
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@ -1790,7 +1790,7 @@ These bit values are correct for most systems, but they are not
|
||||||
guaranteed.
|
guaranteed.
|
||||||
|
|
||||||
@strong{Warning:} Writing explicit numbers for file permissions is bad
|
@strong{Warning:} Writing explicit numbers for file permissions is bad
|
||||||
practice. It is not only nonportable, it also requires everyone who
|
practice. It is not only non-portable, it also requires everyone who
|
||||||
reads your program to remember what the bits mean. To make your
|
reads your program to remember what the bits mean. To make your
|
||||||
program clean, use the symbolic names.
|
program clean, use the symbolic names.
|
||||||
|
|
||||||
|
@ -2080,7 +2080,7 @@ Argument that means, test for existence of the file.
|
||||||
@cindex file access time
|
@cindex file access time
|
||||||
@cindex file modification time
|
@cindex file modification time
|
||||||
@cindex file attribute modification time
|
@cindex file attribute modification time
|
||||||
Each file has three timestamps associated with it: its access time,
|
Each file has three time stamps associated with it: its access time,
|
||||||
its modification time, and its attribute modification time. These
|
its modification time, and its attribute modification time. These
|
||||||
correspond to the @code{st_atime}, @code{st_mtime}, and @code{st_ctime}
|
correspond to the @code{st_atime}, @code{st_mtime}, and @code{st_ctime}
|
||||||
members of the @code{stat} structure; see @ref{File Attributes}.
|
members of the @code{stat} structure; see @ref{File Attributes}.
|
||||||
|
@ -2093,7 +2093,7 @@ values, see @ref{Calendar Time}.
|
||||||
|
|
||||||
Reading from a file updates its access time attribute, and writing
|
Reading from a file updates its access time attribute, and writing
|
||||||
updates its modification time. When a file is created, all three
|
updates its modification time. When a file is created, all three
|
||||||
timestamps for that file are set to the current time. In addition, the
|
time stamps for that file are set to the current time. In addition, the
|
||||||
attribute change time and modification time fields of the directory that
|
attribute change time and modification time fields of the directory that
|
||||||
contains the new entry are updated.
|
contains the new entry are updated.
|
||||||
|
|
||||||
|
@ -2109,7 +2109,7 @@ the times for the file being renamed.
|
||||||
Changing attributes of a file (for example, with @code{chmod}) updates
|
Changing attributes of a file (for example, with @code{chmod}) updates
|
||||||
its attribute change time field.
|
its attribute change time field.
|
||||||
|
|
||||||
You can also change some of the timestamps of a file explicitly using
|
You can also change some of the time stamps of a file explicitly using
|
||||||
the @code{utime} function---all except the attribute change time. You
|
the @code{utime} function---all except the attribute change time. You
|
||||||
need to include the header file @file{utime.h} to use this facility.
|
need to include the header file @file{utime.h} to use this facility.
|
||||||
@pindex utime.h
|
@pindex utime.h
|
||||||
|
@ -2142,7 +2142,7 @@ values from the @code{actime} and @code{modtime} members (respectively)
|
||||||
of the @code{utimbuf} structure pointed at by @var{times}.
|
of the @code{utimbuf} structure pointed at by @var{times}.
|
||||||
|
|
||||||
The attribute modification time for the file is set to the current time
|
The attribute modification time for the file is set to the current time
|
||||||
in either case (since changing the timestamps is itself a modification
|
in either case (since changing the time stamps is itself a modification
|
||||||
of the file attributes).
|
of the file attributes).
|
||||||
|
|
||||||
The @code{utime} function returns @code{0} if successful and @code{-1}
|
The @code{utime} function returns @code{0} if successful and @code{-1}
|
||||||
|
@ -2153,7 +2153,7 @@ are defined for this function:
|
||||||
@table @code
|
@table @code
|
||||||
@item EACCES
|
@item EACCES
|
||||||
There is a permission problem in the case where a null pointer was
|
There is a permission problem in the case where a null pointer was
|
||||||
passed as the @var{times} argument. In order to update the timestamp on
|
passed as the @var{times} argument. In order to update the time stamp on
|
||||||
the file, you must either be the owner of the file, have write
|
the file, you must either be the owner of the file, have write
|
||||||
permission on the file, or be a privileged user.
|
permission on the file, or be a privileged user.
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ operating system, and extensions specific to the GNU system.
|
||||||
|
|
||||||
The purpose of this manual is to tell you how to use the facilities
|
The purpose of this manual is to tell you how to use the facilities
|
||||||
of the GNU library. We have mentioned which features belong to which
|
of the GNU library. We have mentioned which features belong to which
|
||||||
standards to help you identify things that are potentially nonportable
|
standards to help you identify things that are potentially non-portable
|
||||||
to other systems. But the emphasis in this manual is not on strict
|
to other systems. But the emphasis in this manual is not on strict
|
||||||
portability.
|
portability.
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ extra bytes are stripped of. If the file was small or equal to
|
||||||
@var{length} in size before nothing is done. The file must be writable
|
@var{length} in size before nothing is done. The file must be writable
|
||||||
by the user to perform this operation.
|
by the user to perform this operation.
|
||||||
|
|
||||||
The return value is zero is everything wnet ok. Otherwise the return
|
The return value is zero is everything went ok. Otherwise the return
|
||||||
value is @math{-1} and the global variable @var{errno} is set to:
|
value is @math{-1} and the global variable @var{errno} is set to:
|
||||||
@table @code
|
@table @code
|
||||||
@item EACCES
|
@item EACCES
|
||||||
|
@ -1180,16 +1180,16 @@ No synchronization is possible since the system does not implement this.
|
||||||
Sometimes it is not even necessary to write all data associated with a
|
Sometimes it is not even necessary to write all data associated with a
|
||||||
file descriptor. E.g., in database files which do not change in size it
|
file descriptor. E.g., in database files which do not change in size it
|
||||||
is enough to write all the file content data to the device.
|
is enough to write all the file content data to the device.
|
||||||
Metainformation like the modification time etc. are not that important
|
Meta-information like the modification time etc. are not that important
|
||||||
and leaving such information uncommitted does not prevent a successful
|
and leaving such information uncommitted does not prevent a successful
|
||||||
recovering of the file in case of a problem.
|
recovering of the file in case of a problem.
|
||||||
|
|
||||||
@comment unistd.h
|
@comment unistd.h
|
||||||
@comment POSIX
|
@comment POSIX
|
||||||
@deftypefun int fdatasync (int @var{fildes})
|
@deftypefun int fdatasync (int @var{fildes})
|
||||||
When a call to the @code{fdatasync} function returns it is maed sure
|
When a call to the @code{fdatasync} function returns it is made sure
|
||||||
that all of the file data is written to the device. For all pending I/O
|
that all of the file data is written to the device. For all pending I/O
|
||||||
operations the parts guaranteeing data integrety finished.
|
operations the parts guaranteeing data integrity finished.
|
||||||
|
|
||||||
Not all systems implement the @code{fdatasync} operation. On systems
|
Not all systems implement the @code{fdatasync} operation. On systems
|
||||||
missing this functionality @code{fdatasync} is emulated by a call to
|
missing this functionality @code{fdatasync} is emulated by a call to
|
||||||
|
|
|
@ -513,25 +513,35 @@ posix
|
||||||
@noindent
|
@noindent
|
||||||
So the final list is @file{unix/bsd/vax unix/bsd unix/inet unix posix}.
|
So the final list is @file{unix/bsd/vax unix/bsd unix/inet unix posix}.
|
||||||
|
|
||||||
@file{sysdeps} has two ``special'' subdirectories, called @file{generic}
|
@file{sysdeps} has a ``special'' subdirectory called @file{generic}. It
|
||||||
and @file{stub}. These two are always implicitly appended to the list
|
is always implicitly appended to the list of subdirectories, so you
|
||||||
of subdirectories (in that order), so you needn't put them in an
|
needn't put it in an @file{Implies} file, and you should not create any
|
||||||
@file{Implies} file, and you should not create any subdirectories under
|
subdirectories under it intended to be new specific categories.
|
||||||
them intended to be new specific categories. @file{generic} is for
|
@file{generic} serves two purposes. First, the makefiles do not bother
|
||||||
things that can be implemented in machine-independent C, using only
|
to look for a system-dependent version of a file that's not in
|
||||||
other machine-independent functions in the C library. @file{stub} is
|
@file{generic}. This means that any system-dependent source file must
|
||||||
for @dfn{stub} versions of functions which cannot be implemented on a
|
have an analogue in @file{generic}, even if the routines defined by that
|
||||||
particular machine or operating system. The stub functions always
|
file are not implemented on other platforms. Second. the @file{generic}
|
||||||
return an error, and set @code{errno} to @code{ENOSYS} (Function not
|
version of a system-dependent file is used if the makefiles do not find
|
||||||
implemented). @xref{Error Reporting}.
|
a version specific to the system you're compiling for.
|
||||||
|
|
||||||
A source file is known to be system-dependent by its having a version in
|
If it is possible to implement the routines in a @file{generic} file in
|
||||||
@file{generic} or @file{stub}; every generally-available function whose
|
machine-independent C, using only other machine-independent functions in
|
||||||
implementation is system-dependent in should have either a generic or
|
the C library, then you should do so. Otherwise, make them stubs. A
|
||||||
stub implementation (there is no point in having both). Some rare functions
|
@dfn{stub} function is a function which cannot be implemented on a
|
||||||
are only useful on specific systems and aren't defined at all on others;
|
particular machine or operating system. Stub functions always return an
|
||||||
these do not appear anywhere in the system-independent source code or makefiles
|
error, and set @code{errno} to @code{ENOSYS} (Function not implemented).
|
||||||
(including the @file{generic} and @file{stub} directories), only in the
|
@xref{Error Reporting}. If you define a stub function, you must place
|
||||||
|
the statement @code{stub_warning(@var{function})}, where @var{function}
|
||||||
|
is the name of your function, after its definition; also, you must
|
||||||
|
include the file @code{<stub-tag.h>} into your file. This causes the
|
||||||
|
function to be listed in the installed @code{<gnu/stubs.h>}, and
|
||||||
|
makes GNU ld warn when the function is used.
|
||||||
|
|
||||||
|
Some rare functions are only useful on specific systems and aren't
|
||||||
|
defined at all on others; these do not appear anywhere in the
|
||||||
|
system-independent source code or makefiles (including the
|
||||||
|
@file{generic} and @file{stub} directories), only in the
|
||||||
system-dependent @file{Makefile} in the specific system's subdirectory.
|
system-dependent @file{Makefile} in the specific system's subdirectory.
|
||||||
|
|
||||||
If you come across a file that is in one of the main source directories
|
If you come across a file that is in one of the main source directories
|
||||||
|
@ -737,8 +747,7 @@ hierarchy that are not for particular machine architectures.
|
||||||
|
|
||||||
@table @file
|
@table @file
|
||||||
@item generic
|
@item generic
|
||||||
@itemx stub
|
As described above (@pxref{Porting}), this is the subdirectory
|
||||||
As described above (@pxref{Porting}), these are the two subdirectories
|
|
||||||
that every configuration implicitly uses after all others.
|
that every configuration implicitly uses after all others.
|
||||||
|
|
||||||
@item ieee754
|
@item ieee754
|
||||||
|
|
|
@ -236,7 +236,7 @@ If the exception does not cause a trap handler to be called the result
|
||||||
of the operation is taken as a quiet NaN.
|
of the operation is taken as a quiet NaN.
|
||||||
|
|
||||||
@item Division by Zero
|
@item Division by Zero
|
||||||
This exception is raised if the devisor is zero and the dividend is a
|
This exception is raised if the divisor is zero and the dividend is a
|
||||||
finite nonzero number. If no trap occurs the result is either
|
finite nonzero number. If no trap occurs the result is either
|
||||||
@math{+@infinity{}} or @math{-@infinity{}}, depending on the
|
@math{+@infinity{}} or @math{-@infinity{}}, depending on the
|
||||||
signs of the operands.
|
signs of the operands.
|
||||||
|
@ -413,7 +413,7 @@ representable as an integer. These are completely independent types.
|
||||||
It is sometimes necessary so save the complete status of the
|
It is sometimes necessary so save the complete status of the
|
||||||
floating-point unit for a certain time to perform some completely
|
floating-point unit for a certain time to perform some completely
|
||||||
different actions. Beside the status of the exception flags, the
|
different actions. Beside the status of the exception flags, the
|
||||||
control word for the exceptions and the rounding mode can be safed.
|
control word for the exceptions and the rounding mode can be saved.
|
||||||
|
|
||||||
The file @file{fenv.h} defines the type @code{fenv_t}. The layout of a
|
The file @file{fenv.h} defines the type @code{fenv_t}. The layout of a
|
||||||
variable of this type is implementation defined but the variable is able
|
variable of this type is implementation defined but the variable is able
|
||||||
|
@ -710,7 +710,7 @@ exception if one of the arguments is an unordered value.
|
||||||
@cindex Optimization
|
@cindex Optimization
|
||||||
|
|
||||||
If an application uses many floating point function it is often the case
|
If an application uses many floating point function it is often the case
|
||||||
that the costs for the function calls itseld are not neglectable.
|
that the costs for the function calls itselfs are not neglectable.
|
||||||
Modern processor implementation often can execute the operation itself
|
Modern processor implementation often can execute the operation itself
|
||||||
very fast but the call means a disturbance of the control flow.
|
very fast but the call means a disturbance of the control flow.
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in
|
||||||
the range of @code{-1} to @code{1}.
|
the range of @code{-1} to @code{1}.
|
||||||
|
|
||||||
This function is a GNU extension. It should be used whenever both sine
|
This function is a GNU extension. It should be used whenever both sine
|
||||||
and cosine are needed but in protable applications there should be a
|
and cosine are needed but in portable applications there should be a
|
||||||
fallback method for systems without this function.
|
fallback method for systems without this function.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@ -1036,7 +1036,7 @@ magnitude of the result is too large to be representable.
|
||||||
@comment math.h
|
@comment math.h
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefun double log (double @var{x})
|
@deftypefun double log (double @var{x})
|
||||||
@deftypefunx float logf (floatdouble @var{x})
|
@deftypefunx float logf (float @var{x})
|
||||||
@deftypefunx {long double} logl (long double @var{x})
|
@deftypefunx {long double} logl (long double @var{x})
|
||||||
These functions return the natural logarithm of @var{x}. @code{exp (log
|
These functions return the natural logarithm of @var{x}. @code{exp (log
|
||||||
(@var{x}))} equals @var{x}, exactly in mathematics and approximately in
|
(@var{x}))} equals @var{x}, exactly in mathematics and approximately in
|
||||||
|
@ -1211,7 +1211,7 @@ near zero.
|
||||||
@cindex complex logarithm functions
|
@cindex complex logarithm functions
|
||||||
|
|
||||||
@w{ISO C 9X} defines variants of some of the exponentiation and
|
@w{ISO C 9X} defines variants of some of the exponentiation and
|
||||||
logarithm functions. As for the other functions handlung complex
|
logarithm functions. As for the other functions handling complex
|
||||||
numbers these functions are perhaps better optimized and provide better
|
numbers these functions are perhaps better optimized and provide better
|
||||||
error checking than a direct use of the formulas of the mathematical
|
error checking than a direct use of the formulas of the mathematical
|
||||||
definition.
|
definition.
|
||||||
|
@ -1488,7 +1488,7 @@ The GNU library supports the standard @w{ISO C} random number functions
|
||||||
plus two other sets derived from BSD and SVID. We recommend you use the
|
plus two other sets derived from BSD and SVID. We recommend you use the
|
||||||
standard ones, @code{rand} and @code{srand} if only a small number of
|
standard ones, @code{rand} and @code{srand} if only a small number of
|
||||||
random bits are required. The SVID functions provide an interface which
|
random bits are required. The SVID functions provide an interface which
|
||||||
allows better randon number generator algorithms and they return up to
|
allows better random number generator algorithms and they return up to
|
||||||
48 random bits in one calls and they also return random floating-point
|
48 random bits in one calls and they also return random floating-point
|
||||||
numbers if wanted. The SVID function might not be available on some BSD
|
numbers if wanted. The SVID function might not be available on some BSD
|
||||||
derived systems but since they are required in the XPG they are
|
derived systems but since they are required in the XPG they are
|
||||||
|
@ -1580,7 +1580,7 @@ This function returns the next pseudo-random number in the sequence.
|
||||||
The range of values returned is from @code{0} to @code{RAND_MAX}.
|
The range of values returned is from @code{0} to @code{RAND_MAX}.
|
||||||
|
|
||||||
@strong{Please note:} Historically this function returned a @code{long
|
@strong{Please note:} Historically this function returned a @code{long
|
||||||
int} value. But with the appearence of 64bit machines this could lead
|
int} value. But with the appearance of 64bit machines this could lead
|
||||||
to severe compatibility problems and therefore the type now explicitly
|
to severe compatibility problems and therefore the type now explicitly
|
||||||
limits the return value to 32bit.
|
limits the return value to 32bit.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
@ -1619,7 +1619,7 @@ information @var{state}. The argument must have been the result of
|
||||||
a previous call to @var{initstate} or @var{setstate}.
|
a previous call to @var{initstate} or @var{setstate}.
|
||||||
|
|
||||||
The return value is the previous value of the state information array.
|
The return value is the previous value of the state information array.
|
||||||
You can use thise value later as an argument to @code{setstate} to
|
You can use this value later as an argument to @code{setstate} to
|
||||||
restore that state.
|
restore that state.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@ -1734,12 +1734,12 @@ information provided.
|
||||||
@deftypefun void srand48 (long int @var{seedval}))
|
@deftypefun void srand48 (long int @var{seedval}))
|
||||||
The @code{srand48} function sets the most significant 32 bits of the
|
The @code{srand48} function sets the most significant 32 bits of the
|
||||||
state internal state of the random number generator to the least
|
state internal state of the random number generator to the least
|
||||||
significant 32 bits of the @var{seedval} parameter. The lower 16 bts
|
significant 32 bits of the @var{seedval} parameter. The lower 16 bits
|
||||||
are initilialized to the value @code{0x330E}. Even if the @code{long
|
are initialized to the value @code{0x330E}. Even if the @code{long
|
||||||
int} type contains more the 32 bits only the lower 32 bits are used.
|
int} type contains more the 32 bits only the lower 32 bits are used.
|
||||||
|
|
||||||
Due to this limitation the initialization of the state using this
|
Due to this limitation the initialization of the state using this
|
||||||
function of not very useful. But it makes it easy to use a constrcut
|
function of not very useful. But it makes it easy to use a construct
|
||||||
like @code{srand48 (time (0))}.
|
like @code{srand48 (time (0))}.
|
||||||
|
|
||||||
A side-effect of this function is that the values @code{a} and @code{c}
|
A side-effect of this function is that the values @code{a} and @code{c}
|
||||||
|
@ -1802,7 +1802,7 @@ Please note that it is no problem if several threads use the global
|
||||||
state if all threads use the functions which take a pointer to an array
|
state if all threads use the functions which take a pointer to an array
|
||||||
containing the state. The random numbers are computed following the
|
containing the state. The random numbers are computed following the
|
||||||
same loop but if the state in the array is different all threads will
|
same loop but if the state in the array is different all threads will
|
||||||
get an individuual random number generator.
|
get an individual random number generator.
|
||||||
|
|
||||||
The user supplied buffer must be of type @code{struct drand48_data}.
|
The user supplied buffer must be of type @code{struct drand48_data}.
|
||||||
This type should be regarded as opaque and no member should be used
|
This type should be regarded as opaque and no member should be used
|
||||||
|
@ -1830,7 +1830,7 @@ programs.
|
||||||
@deftypefun int erand48_r (unsigned short int @var{xsubi}[3], struct drand48_data *@var{buffer}, double *@var{result})
|
@deftypefun int erand48_r (unsigned short int @var{xsubi}[3], struct drand48_data *@var{buffer}, double *@var{result})
|
||||||
The @code{erand48_r} function works like the @code{erand48} and it takes
|
The @code{erand48_r} function works like the @code{erand48} and it takes
|
||||||
an argument @var{buffer} which describes the random number generator.
|
an argument @var{buffer} which describes the random number generator.
|
||||||
The state of the random number genertor is taken from the @code{xsubi}
|
The state of the random number generator is taken from the @code{xsubi}
|
||||||
array, the parameters for the congruential formula from the global
|
array, the parameters for the congruential formula from the global
|
||||||
random number generator data. The random number is return in the
|
random number generator data. The random number is return in the
|
||||||
variable pointed to by @var{result}.
|
variable pointed to by @var{result}.
|
||||||
|
@ -1909,7 +1909,7 @@ memset (buffer, '\0', sizeof (struct drand48_data));
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Using any of the reetrant functions of this family now will
|
Using any of the reentrant functions of this family now will
|
||||||
automatically initialize the random number generator to the default
|
automatically initialize the random number generator to the default
|
||||||
values for the state and the parameters of the congruential formula.
|
values for the state and the parameters of the congruential formula.
|
||||||
|
|
||||||
|
@ -1924,8 +1924,8 @@ what you expect.
|
||||||
@deftypefun int srand48_r (long int @var{seedval}, struct drand48_data *@var{buffer})
|
@deftypefun int srand48_r (long int @var{seedval}, struct drand48_data *@var{buffer})
|
||||||
The description of the random number generator represented by the
|
The description of the random number generator represented by the
|
||||||
information in @var{buffer} is initialized similar to what the function
|
information in @var{buffer} is initialized similar to what the function
|
||||||
@code{srand48} does. The state is initialized from the paramter
|
@code{srand48} does. The state is initialized from the parameter
|
||||||
@var{seedval} and the paameters for the congruential formula are
|
@var{seedval} and the parameters for the congruential formula are
|
||||||
initialized to the default values.
|
initialized to the default values.
|
||||||
|
|
||||||
If the return value is non-negative the function call succeeded.
|
If the return value is non-negative the function call succeeded.
|
||||||
|
|
|
@ -19,8 +19,8 @@ selection of the user.
|
||||||
The GNU C Library provides two different sets of functions to support
|
The GNU C Library provides two different sets of functions to support
|
||||||
message translation. The problem is that neither of the interfaces is
|
message translation. The problem is that neither of the interfaces is
|
||||||
officially defined by the POSIX standard. The @code{catgets} family of
|
officially defined by the POSIX standard. The @code{catgets} family of
|
||||||
functions is defined in the X/Open standard but this is drived from
|
functions is defined in the X/Open standard but this is derived from
|
||||||
industry decisions and therefore not necessarily is based on reasinable
|
industry decisions and therefore not necessarily based on reasonable
|
||||||
decisions.
|
decisions.
|
||||||
|
|
||||||
As mentioned above the message catalog handling provides easy
|
As mentioned above the message catalog handling provides easy
|
||||||
|
@ -67,7 +67,7 @@ The user of the program must be able to guide the responsible function
|
||||||
to find whatever catalog the user wants. This is separated from what
|
to find whatever catalog the user wants. This is separated from what
|
||||||
the programmer had in mind.
|
the programmer had in mind.
|
||||||
|
|
||||||
All the types, constants and funtions for the @code{catgets} functions
|
All the types, constants and functions for the @code{catgets} functions
|
||||||
are defined/declared in the @file{nl_types.h} header file.
|
are defined/declared in the @file{nl_types.h} header file.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
|
@ -99,7 +99,7 @@ Locating the catalog file must happen in a way which lets the user of
|
||||||
the program influence the decision. It is up to the user to decide
|
the program influence the decision. It is up to the user to decide
|
||||||
about the language to use and sometimes it is useful to use alternate
|
about the language to use and sometimes it is useful to use alternate
|
||||||
catalog files. All this can be specified by the user by setting some
|
catalog files. All this can be specified by the user by setting some
|
||||||
enviroment variables.
|
environment variables.
|
||||||
|
|
||||||
The first problem is to find out where all the message catalogs are
|
The first problem is to find out where all the message catalogs are
|
||||||
stored. Every program could have its own place to keep all the
|
stored. Every program could have its own place to keep all the
|
||||||
|
@ -137,7 +137,7 @@ explained below.
|
||||||
|
|
||||||
@item %l
|
@item %l
|
||||||
(This is the lowercase ell.) This format element is substituted with the
|
(This is the lowercase ell.) This format element is substituted with the
|
||||||
language element of the locale name. The string decsribing the selected
|
language element of the locale name. The string describing the selected
|
||||||
locale is expected to have the form
|
locale is expected to have the form
|
||||||
@code{@var{lang}[_@var{terr}[.@var{codeset}]]} and this format uses the
|
@code{@var{lang}[_@var{terr}[.@var{codeset}]]} and this format uses the
|
||||||
first part @var{lang}.
|
first part @var{lang}.
|
||||||
|
@ -186,7 +186,7 @@ to all other platforms providing the @code{catgets} interface.
|
||||||
@cindex LC_MESSAGES environment variable
|
@cindex LC_MESSAGES environment variable
|
||||||
@cindex LANG environment variable
|
@cindex LANG environment variable
|
||||||
Otherwise the values of environment variables from the standard
|
Otherwise the values of environment variables from the standard
|
||||||
environemtn are examined (@pxref{Standard Environment}). Which
|
environment are examined (@pxref{Standard Environment}). Which
|
||||||
variables are examined is decided by the @var{flag} parameter of
|
variables are examined is decided by the @var{flag} parameter of
|
||||||
@code{catopen}. If the value is @code{NL_CAT_LOCALE} (which is defined
|
@code{catopen}. If the value is @code{NL_CAT_LOCALE} (which is defined
|
||||||
in @file{nl_types.h}) then the @code{catopen} function examines the
|
in @file{nl_types.h}) then the @code{catopen} function examines the
|
||||||
|
@ -225,7 +225,7 @@ When an error occured the global variable @var{errno} is set to
|
||||||
@item EBADF
|
@item EBADF
|
||||||
The catalog does not exist.
|
The catalog does not exist.
|
||||||
@item ENOMSG
|
@item ENOMSG
|
||||||
The set/message touple does not name an existing element in the
|
The set/message ttuple does not name an existing element in the
|
||||||
message catalog.
|
message catalog.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ all @var{string} arguments should be written in the same language.
|
||||||
|
|
||||||
It is somewhat uncomfortable to write a program using the @code{catgets}
|
It is somewhat uncomfortable to write a program using the @code{catgets}
|
||||||
functions if no supporting functionality is available. Since each
|
functions if no supporting functionality is available. Since each
|
||||||
set/message number touple must be unique the programmer must keep lists
|
set/message number tuple must be unique the programmer must keep lists
|
||||||
of the messages at the same time the code is written. And the work
|
of the messages at the same time the code is written. And the work
|
||||||
between several people working on the same project must be coordinated.
|
between several people working on the same project must be coordinated.
|
||||||
In @ref{Common Usage} we will see some how these problems can be relaxed
|
In @ref{Common Usage} we will see some how these problems can be relaxed
|
||||||
|
@ -299,7 +299,7 @@ The only reasonable way the translate all the messages of a function and
|
||||||
store the result in a message catalog file which can be read by the
|
store the result in a message catalog file which can be read by the
|
||||||
@code{catopen} function is to write all the message text to the
|
@code{catopen} function is to write all the message text to the
|
||||||
translator and let her/him translate them all. I.e., we must have a
|
translator and let her/him translate them all. I.e., we must have a
|
||||||
file with entries which associate the set/message touple with a specific
|
file with entries which associate the set/message tuple with a specific
|
||||||
translation. This file format is specified in the X/Open standard and
|
translation. This file format is specified in the X/Open standard and
|
||||||
is as follows:
|
is as follows:
|
||||||
|
|
||||||
|
@ -363,11 +363,11 @@ line ends quoting is disable.
|
||||||
By default no quoting character is used. In this mode strings are
|
By default no quoting character is used. In this mode strings are
|
||||||
terminated with the first unescaped line break. If there is a
|
terminated with the first unescaped line break. If there is a
|
||||||
@code{$quote} sequence present newline need not be escaped. Instead a
|
@code{$quote} sequence present newline need not be escaped. Instead a
|
||||||
string is terminated with the first unescaped appearence of the quote
|
string is terminated with the first unescaped appearance of the quote
|
||||||
character.
|
character.
|
||||||
|
|
||||||
A common usage of this feature would be to set the quote character to
|
A common usage of this feature would be to set the quote character to
|
||||||
@code{"}. Then any appearence of the @code{"} in the strings must
|
@code{"}. Then any appearance of the @code{"} in the strings must
|
||||||
be escaped using the backslash (i.e., @code{\"} must be written).
|
be escaped using the backslash (i.e., @code{\"} must be written).
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
@ -414,7 +414,7 @@ $set SetOne
|
||||||
two " Message with ID \"two\", which gets the value 2 assigned"
|
two " Message with ID \"two\", which gets the value 2 assigned"
|
||||||
|
|
||||||
$set SetTwo
|
$set SetTwo
|
||||||
$ Since the last set got the nubmer 1 assigned this set has number 2.
|
$ Since the last set got the number 1 assigned this set has number 2.
|
||||||
4000 "The numbers can be arbitrary, they need not start at one."
|
4000 "The numbers can be arbitrary, they need not start at one."
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ message definition would have to be left away and in this case the
|
||||||
message with the identifier @code{two} would loose its leading whitespace.
|
message with the identifier @code{two} would loose its leading whitespace.
|
||||||
@item
|
@item
|
||||||
Mixing numbered messages with message having symbolic names is no
|
Mixing numbered messages with message having symbolic names is no
|
||||||
problem and the numering happens automatically.
|
problem and the numbering happens automatically.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ use in a running program. The @code{catopen} function would have to
|
||||||
parser the file and handle syntactic errors gracefully. This is not so
|
parser the file and handle syntactic errors gracefully. This is not so
|
||||||
easy and the whole process is pretty slow. Therefore the @code{catgets}
|
easy and the whole process is pretty slow. Therefore the @code{catgets}
|
||||||
functions expect the data in another more compact and ready-to-use file
|
functions expect the data in another more compact and ready-to-use file
|
||||||
format. There is a special programm @code{gencat} which is explained in
|
format. There is a special program @code{gencat} which is explained in
|
||||||
detail in the next section.
|
detail in the next section.
|
||||||
|
|
||||||
Files in this other format are not human readable. To be easy to use by
|
Files in this other format are not human readable. To be easy to use by
|
||||||
|
@ -449,7 +449,7 @@ so translation files can be shared by systems of arbitrary architecture
|
||||||
Details about the binary file format are not important to know since
|
Details about the binary file format are not important to know since
|
||||||
these files are always created by the @code{gencat} program. The
|
these files are always created by the @code{gencat} program. The
|
||||||
sources of the GNU C Library also provide the sources for the
|
sources of the GNU C Library also provide the sources for the
|
||||||
@code{gencat} program and so the interested reader can look throught
|
@code{gencat} program and so the interested reader can look through
|
||||||
these source files to learn about the file format.
|
these source files to learn about the file format.
|
||||||
|
|
||||||
|
|
||||||
|
@ -491,8 +491,8 @@ while using the device names is a GNU extension.
|
||||||
|
|
||||||
The @code{gencat} program works by concatenating all input files and
|
The @code{gencat} program works by concatenating all input files and
|
||||||
then @strong{merge} the resulting collection of message sets with a
|
then @strong{merge} the resulting collection of message sets with a
|
||||||
possiblity existing output file. This is done by removing all messages
|
possibly existing output file. This is done by removing all messages
|
||||||
with set/message number touples matching any of the generated messages
|
with set/message number tuples matching any of the generated messages
|
||||||
from the output file and then adding all the new messages. To
|
from the output file and then adding all the new messages. To
|
||||||
regenerate a catalog file while ignoring the old contents therefore
|
regenerate a catalog file while ignoring the old contents therefore
|
||||||
requires to remove the output file if it exists. If the output is
|
requires to remove the output file if it exists. If the output is
|
||||||
|
@ -541,8 +541,8 @@ method first to understand the benefits of extensions.
|
||||||
|
|
||||||
Since the X/Open format of the message catalog files does not allow
|
Since the X/Open format of the message catalog files does not allow
|
||||||
symbol names we have to work with numbers all the time. When we start
|
symbol names we have to work with numbers all the time. When we start
|
||||||
writing a program we have to replace all appearences of translatable
|
writing a program we have to replace all appearances of translatable
|
||||||
strings with someting like
|
strings with something like
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
catgets (catdesc, set, msg, "string")
|
catgets (catdesc, set, msg, "string")
|
||||||
|
@ -556,8 +556,8 @@ message numbers.
|
||||||
|
|
||||||
In a bigger program several programmers usually work at the same time on
|
In a bigger program several programmers usually work at the same time on
|
||||||
the program and so coordinating the number allocation is crucial.
|
the program and so coordinating the number allocation is crucial.
|
||||||
Though no two different strings must be indexed by the same touple of
|
Though no two different strings must be indexed by the same tuple of
|
||||||
numbers it is highly desireable to reuse the numbers for equal strings
|
numbers it is highly desirable to reuse the numbers for equal strings
|
||||||
with equal translations (please note that there might be strings which
|
with equal translations (please note that there might be strings which
|
||||||
are equal in one language but have different translations due to
|
are equal in one language but have different translations due to
|
||||||
difference contexts).
|
difference contexts).
|
||||||
|
@ -570,7 +570,7 @@ cannot be discovered by the compiler or the @code{catgets} functions.
|
||||||
Only the user of the program might see wrong messages printed. In the
|
Only the user of the program might see wrong messages printed. In the
|
||||||
worst cases the messages are so irritating that they cannot be
|
worst cases the messages are so irritating that they cannot be
|
||||||
recognized as wrong. Think about the translations for @code{"true"} and
|
recognized as wrong. Think about the translations for @code{"true"} and
|
||||||
@code{"false"} being exchanged. This could result in a desaster.
|
@code{"false"} being exchanged. This could result in a disaster.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection Using symbolic names
|
@subsubsection Using symbolic names
|
||||||
|
@ -829,7 +829,7 @@ something like
|
||||||
Here the @var{errno} value is used in the @code{printf} function while
|
Here the @var{errno} value is used in the @code{printf} function while
|
||||||
processing the @code{%m} format element and if the @code{gettext}
|
processing the @code{%m} format element and if the @code{gettext}
|
||||||
function would change this value (it is called before @code{printf} is
|
function would change this value (it is called before @code{printf} is
|
||||||
called) we wouls get a wrong message.
|
called) we would get a wrong message.
|
||||||
|
|
||||||
So there is no easy way to detect a missing message catalog beside
|
So there is no easy way to detect a missing message catalog beside
|
||||||
comparing the argument string with the result. But it is normally the
|
comparing the argument string with the result. But it is normally the
|
||||||
|
@ -856,7 +856,7 @@ pointer the @code{dgettext} function is exactly equivalent to
|
||||||
@code{gettext} since the default value for the domain name is used.
|
@code{gettext} since the default value for the domain name is used.
|
||||||
|
|
||||||
As for @code{gettext} the return value type is @code{char *} which is an
|
As for @code{gettext} the return value type is @code{char *} which is an
|
||||||
anachronism. The returned string must never be modfied.
|
anachronism. The returned string must never be modified.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@deftypefun {char *} dcgettext (const char *@var{domainname}, const char *@var{msgid}, int @var{category})
|
@deftypefun {char *} dcgettext (const char *@var{domainname}, const char *@var{msgid}, int @var{category})
|
||||||
|
@ -895,7 +895,7 @@ but @code{LC_MESSAGES} in for the @var{category} parameter. We are
|
||||||
dealing with messages here and any other choice can only be irritating.
|
dealing with messages here and any other choice can only be irritating.
|
||||||
|
|
||||||
As for @code{gettext} the return value type is @code{char *} which is an
|
As for @code{gettext} the return value type is @code{char *} which is an
|
||||||
anachronism. The returned string must never be modfied.
|
anachronism. The returned string must never be modified.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
When using the three functions above in a program it is a frequent case
|
When using the three functions above in a program it is a frequent case
|
||||||
|
@ -906,7 +906,7 @@ will not change. I.e., the algorithm to determine the translation is
|
||||||
deterministic.
|
deterministic.
|
||||||
|
|
||||||
Exactly this is what the optimizations implemented in the
|
Exactly this is what the optimizations implemented in the
|
||||||
@file{libintl.h} header will use. Whenver a program is compiler with
|
@file{libintl.h} header will use. Whenever a program is compiler with
|
||||||
the GNU C compiler, optimization is selected and the @var{msgid}
|
the GNU C compiler, optimization is selected and the @var{msgid}
|
||||||
argument to @code{gettext}, @code{dgettext} or @code{dcgettext} is a
|
argument to @code{gettext}, @code{dgettext} or @code{dcgettext} is a
|
||||||
constant string the actual function call will only be done the first
|
constant string the actual function call will only be done the first
|
||||||
|
@ -920,7 +920,7 @@ independent of the compiler or compiler options in use.
|
||||||
@node Locating gettext catalog
|
@node Locating gettext catalog
|
||||||
@subsubsection How to determine which catalog to be used
|
@subsubsection How to determine which catalog to be used
|
||||||
|
|
||||||
The functions to retrieve the translations for a given mesage have a
|
The functions to retrieve the translations for a given message have a
|
||||||
remarkable simple interface. But to provide the user of the program
|
remarkable simple interface. But to provide the user of the program
|
||||||
still the opportunity to select exactly the translation s/he wants and
|
still the opportunity to select exactly the translation s/he wants and
|
||||||
also to provide the programmer the possibility to influence the way to
|
also to provide the programmer the possibility to influence the way to
|
||||||
|
@ -977,7 +977,7 @@ to read the messages in another language and so the user of the program
|
||||||
should be able to define an precedence order of languages.
|
should be able to define an precedence order of languages.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
We can devide the configuration actions in two parts: the one is
|
We can divide the configuration actions in two parts: the one is
|
||||||
performed by the programmer, the other by the user. We will start with
|
performed by the programmer, the other by the user. We will start with
|
||||||
the functions the programmer can use since the user configuration will
|
the functions the programmer can use since the user configuration will
|
||||||
be based on this.
|
be based on this.
|
||||||
|
@ -999,7 +999,7 @@ all future @code{gettext} calls, to @var{domainname}. Please note that
|
||||||
@var{domainname} parameter of these functions is not the null pointer.
|
@var{domainname} parameter of these functions is not the null pointer.
|
||||||
|
|
||||||
Before the first call to @code{textdomain} the default domain is
|
Before the first call to @code{textdomain} the default domain is
|
||||||
@code{messages}. This is the name specified in the fpsecification of
|
@code{messages}. This is the name specified in the specification of
|
||||||
the @code{gettext} API. This name is as good as any other name. No
|
the @code{gettext} API. This name is as good as any other name. No
|
||||||
program should ever really use a domain with this name since this can
|
program should ever really use a domain with this name since this can
|
||||||
only lead to problems.
|
only lead to problems.
|
||||||
|
@ -1025,10 +1025,10 @@ really never should be used.
|
||||||
The @code{bindtextdomain} function can be used to specify the directly
|
The @code{bindtextdomain} function can be used to specify the directly
|
||||||
which contains the message catalogs for domain @var{domainname} for the
|
which contains the message catalogs for domain @var{domainname} for the
|
||||||
different languages. To be correct, this is the directory where the
|
different languages. To be correct, this is the directory where the
|
||||||
hierachy of directories is expected. Details are explained below.
|
hierarchy of directories is expected. Details are explained below.
|
||||||
|
|
||||||
For the programmer it is important to note that the translations which
|
For the programmer it is important to note that the translations which
|
||||||
come with the program have be placed in a directory hierachy starting
|
come with the program have be placed in a directory hierarchy starting
|
||||||
at, say, @file{/foo/bar}. Then the program should make a
|
at, say, @file{/foo/bar}. Then the program should make a
|
||||||
@code{bindtextdomain} call to bind the domain for the current program to
|
@code{bindtextdomain} call to bind the domain for the current program to
|
||||||
this directory. So it is made sure the catalogs are found. A correctly
|
this directory. So it is made sure the catalogs are found. A correctly
|
||||||
|
@ -1036,7 +1036,7 @@ running program does not depend on the user setting an environment
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
The @code{bindtextdomain} function can be used several times and if the
|
The @code{bindtextdomain} function can be used several times and if the
|
||||||
@var{domainname} argument is different the previously boundd domains
|
@var{domainname} argument is different the previously bounded domains
|
||||||
will not be overwritten.
|
will not be overwritten.
|
||||||
|
|
||||||
If the program which wish to use @code{bindtextdomain} at some point of
|
If the program which wish to use @code{bindtextdomain} at some point of
|
||||||
|
@ -1095,7 +1095,7 @@ files. If the program executed the @code{bindtextdomain} function for
|
||||||
the message domain that is currently handled the @code{dir_name}
|
the message domain that is currently handled the @code{dir_name}
|
||||||
component is the exactly the value which was given to the function as
|
component is the exactly the value which was given to the function as
|
||||||
the second parameter. I.e., @code{bindtextdomain} allows to overwrite
|
the second parameter. I.e., @code{bindtextdomain} allows to overwrite
|
||||||
the only system depdendent and fixed value to make it possible to
|
the only system dependent and fixed value to make it possible to
|
||||||
address file everywhere in the filesystem.
|
address file everywhere in the filesystem.
|
||||||
|
|
||||||
The @var{category} is the name of the locale category which was selected
|
The @var{category} is the name of the locale category which was selected
|
||||||
|
@ -1220,7 +1220,7 @@ list:
|
||||||
@code{audience}/@code{modifier}
|
@code{audience}/@code{modifier}
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
From the last entry one can see that the meaning of the @code{modifer}
|
From the last entry one can see that the meaning of the @code{modifier}
|
||||||
field in the X/Open format and the @code{audience} format have the same
|
field in the X/Open format and the @code{audience} format have the same
|
||||||
meaning. Beside one can see that the @code{language} field for obvious
|
meaning. Beside one can see that the @code{language} field for obvious
|
||||||
reasons never will be dropped.
|
reasons never will be dropped.
|
||||||
|
@ -1296,7 +1296,7 @@ help to understand the input better.
|
||||||
|
|
||||||
Other programs help to manage development cycle when new messages appear
|
Other programs help to manage development cycle when new messages appear
|
||||||
in the source files or when a new translation of the messages appear.
|
in the source files or when a new translation of the messages appear.
|
||||||
here it should only be noted that using all the tools in GNu gettext it
|
here it should only be noted that using all the tools in GNU gettext it
|
||||||
is possible to @emph{completely} automize the handling of message
|
is possible to @emph{completely} automize the handling of message
|
||||||
catalog. Beside marking the translatable string in the source code and
|
catalog. Beside marking the translatable string in the source code and
|
||||||
generating the translations the developers do not have anything to do
|
generating the translations the developers do not have anything to do
|
||||||
|
|
|
@ -365,7 +365,7 @@ repeatedly. It handles the flag @code{GLOB_NOESCAPE} by turning on the
|
||||||
@node More Flags for Globbing
|
@node More Flags for Globbing
|
||||||
@subsection More Flags for Globbing
|
@subsection More Flags for Globbing
|
||||||
|
|
||||||
Beside the flags descibed in the last section, the GNU implementation of
|
Beside the flags described in the last section, the GNU implementation of
|
||||||
@code{glob} allows a few more flags which are also defined in the
|
@code{glob} allows a few more flags which are also defined in the
|
||||||
@file{glob.h} file. Some of the extensions implement functionality
|
@file{glob.h} file. Some of the extensions implement functionality
|
||||||
which is available in modern shell implementations.
|
which is available in modern shell implementations.
|
||||||
|
@ -406,7 +406,7 @@ another one. It is important to note that the range of each brace
|
||||||
expression is completely contained in the outer brace expression (if
|
expression is completely contained in the outer brace expression (if
|
||||||
there is one).
|
there is one).
|
||||||
|
|
||||||
The string between the mathing braces is separated into single
|
The string between the matching braces is separated into single
|
||||||
expressions by splitting at @code{,} (comma) characters. The commas
|
expressions by splitting at @code{,} (comma) characters. The commas
|
||||||
themself are discarded. Please note what we said above about recursive
|
themself are discarded. Please note what we said above about recursive
|
||||||
brace expressions. The commas used to separate the subexpressions must
|
brace expressions. The commas used to separate the subexpressions must
|
||||||
|
|
|
@ -259,7 +259,7 @@ Computer Programming, Part 3: Searching and Sorting'' for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
The weakest aspect of this function is that there can be at most one
|
The weakest aspect of this function is that there can be at most one
|
||||||
hashing table used throught the whole program. The table is allocated
|
hashing table used through the whole program. The table is allocated
|
||||||
in local memory out of control of the programmer. As an extension the
|
in local memory out of control of the programmer. As an extension the
|
||||||
GNU C library provides an additional set of functions with an reentrant
|
GNU C library provides an additional set of functions with an reentrant
|
||||||
interface which provide a similar interface but which allow to keep
|
interface which provide a similar interface but which allow to keep
|
||||||
|
@ -284,13 +284,13 @@ table with possibly different size.
|
||||||
It is important to remember that the elements contained in the hashing
|
It is important to remember that the elements contained in the hashing
|
||||||
table at the time @code{hdestroy} is called are @emph{not} freed by this
|
table at the time @code{hdestroy} is called are @emph{not} freed by this
|
||||||
function. It is the responsibility of the program code to free those
|
function. It is the responsibility of the program code to free those
|
||||||
strings (if necessary at all). Freeing all the element memory iss not
|
strings (if necessary at all). Freeing all the element memory is not
|
||||||
possible without extra, separately kept information since there is no
|
possible without extra, separately kept information since there is no
|
||||||
function to iterate through all available elements in the hashing table.
|
function to iterate through all available elements in the hashing table.
|
||||||
If it is really necessary to free a table and all elements the
|
If it is really necessary to free a table and all elements the
|
||||||
programmer has to keep a list of all table elements and before calling
|
programmer has to keep a list of all table elements and before calling
|
||||||
@code{hdestroy} s/he has to free all element's data using this list.
|
@code{hdestroy} s/he has to free all element's data using this list.
|
||||||
This is a very unpleasent mechanism and it also shows that this kind of
|
This is a very unpleasant mechanism and it also shows that this kind of
|
||||||
hashing tables is mainly meant for tables which are created once and
|
hashing tables is mainly meant for tables which are created once and
|
||||||
used until the end of the program run.
|
used until the end of the program run.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
@ -349,7 +349,7 @@ members should be changed directly.
|
||||||
@comment search.h
|
@comment search.h
|
||||||
@comment GNU
|
@comment GNU
|
||||||
@deftypefun int hcreate_r (size_t @var{nel}, struct hsearch_data *@var{htab})
|
@deftypefun int hcreate_r (size_t @var{nel}, struct hsearch_data *@var{htab})
|
||||||
The @code{hcreate_r} function intializes the object pointed to by
|
The @code{hcreate_r} function initializes the object pointed to by
|
||||||
@var{htab} to contain a hashing table with at least @var{nel} elements.
|
@var{htab} to contain a hashing table with at least @var{nel} elements.
|
||||||
So this function is equivalent to the @code{hcreate} function except
|
So this function is equivalent to the @code{hcreate} function except
|
||||||
that the initialized data structure is controlled by the user.
|
that the initialized data structure is controlled by the user.
|
||||||
|
@ -377,7 +377,7 @@ for the elements of the table.
|
||||||
@deftypefun int hsearch_r (ENTRY @var{item}, ACTION @var{action}, ENTRY **@var{retval}, struct hsearch_data *@var{htab})
|
@deftypefun int hsearch_r (ENTRY @var{item}, ACTION @var{action}, ENTRY **@var{retval}, struct hsearch_data *@var{htab})
|
||||||
The @code{hsearch_r} function is equivalent to @code{hsearch}. The
|
The @code{hsearch_r} function is equivalent to @code{hsearch}. The
|
||||||
meaning of the first two arguments is identical. But instead of
|
meaning of the first two arguments is identical. But instead of
|
||||||
operating on a single global hashing table the functio works on the
|
operating on a single global hashing table the function works on the
|
||||||
table described by the object pointed to by @var{htab} (which is
|
table described by the object pointed to by @var{htab} (which is
|
||||||
initialized by a call to @code{hcreate_r}).
|
initialized by a call to @code{hcreate_r}).
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ The GNU C library implementation even guarantees that this bound is
|
||||||
never exceeded even for input data which cause problems for simple
|
never exceeded even for input data which cause problems for simple
|
||||||
binary tree implementations.
|
binary tree implementations.
|
||||||
|
|
||||||
The functions desribed in the chapter are all described in the @w{System
|
The functions described in the chapter are all described in the @w{System
|
||||||
V} and X/Open specifications and are therefore quite portable.
|
V} and X/Open specifications and are therefore quite portable.
|
||||||
|
|
||||||
In contrast to the @code{hsearch} functions the @code{tsearch} functions
|
In contrast to the @code{hsearch} functions the @code{tsearch} functions
|
||||||
|
@ -427,7 +427,7 @@ extended or searched.
|
||||||
@deftypefun {void *} tsearch (const void *@var{key}, void **@var{rootp}, comparison_fn_t @var{compar})
|
@deftypefun {void *} tsearch (const void *@var{key}, void **@var{rootp}, comparison_fn_t @var{compar})
|
||||||
The @code{tsearch} function searches in the tree pointed to by
|
The @code{tsearch} function searches in the tree pointed to by
|
||||||
@code{*@var{rootp}} for an element matching @var{key}. The function
|
@code{*@var{rootp}} for an element matching @var{key}. The function
|
||||||
pointed to by @var{compar} is used to determine wether two elements
|
pointed to by @var{compar} is used to determine whether two elements
|
||||||
match. @xref{Comparison Functions} for a specification of the functions
|
match. @xref{Comparison Functions} for a specification of the functions
|
||||||
which can be used for the @var{compar} parameter.
|
which can be used for the @var{compar} parameter.
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ tree and how the function is called. The status of a node is either
|
||||||
`leaf' or `internal node'. For each leaf node the function is called
|
`leaf' or `internal node'. For each leaf node the function is called
|
||||||
exactly once, for each internal node it is called three times: before
|
exactly once, for each internal node it is called three times: before
|
||||||
the first child is processed, after the first child is processed and
|
the first child is processed, after the first child is processed and
|
||||||
after both childs are processed. This makes it possible to handle all
|
after both children are processed. This makes it possible to handle all
|
||||||
three methods of tree traversal (or even a combination of them).
|
three methods of tree traversal (or even a combination of them).
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
|
@ -540,7 +540,7 @@ For each node in the tree with a node pointed to by @var{root} the
|
||||||
called three times, setting the @var{value} parameter or @var{action} to
|
called three times, setting the @var{value} parameter or @var{action} to
|
||||||
the appropriate value. The @var{level} argument for the @var{action}
|
the appropriate value. The @var{level} argument for the @var{action}
|
||||||
function is computed while descending the tree with increasing the value
|
function is computed while descending the tree with increasing the value
|
||||||
by one for the escend to a child, starting with the value @math{0} for
|
by one for the descend to a child, starting with the value @math{0} for
|
||||||
the root node.
|
the root node.
|
||||||
|
|
||||||
Since the functions used for the @var{action} parameter to @code{twalk}
|
Since the functions used for the @var{action} parameter to @code{twalk}
|
||||||
|
|
|
@ -1656,7 +1656,7 @@ make is whether at least one signal has arrived since a given time in
|
||||||
the past.
|
the past.
|
||||||
|
|
||||||
Here is an example of a handler for @code{SIGCHLD} that compensates for
|
Here is an example of a handler for @code{SIGCHLD} that compensates for
|
||||||
the fact that the number of signals recieved may not equal the number of
|
the fact that the number of signals received may not equal the number of
|
||||||
child processes generate them. It assumes that the program keeps track
|
child processes generate them. It assumes that the program keeps track
|
||||||
of all the child processes with a chain of structures as follows:
|
of all the child processes with a chain of structures as follows:
|
||||||
|
|
||||||
|
|
|
@ -687,7 +687,7 @@ Each computer on the Internet has one or more @dfn{Internet addresses},
|
||||||
numbers which identify that computer among all those on the Internet.
|
numbers which identify that computer among all those on the Internet.
|
||||||
Users typically write IPv4 numeric host addresses as sequences of four
|
Users typically write IPv4 numeric host addresses as sequences of four
|
||||||
numbers, separated by periods, as in @samp{128.52.46.32}, and IPv6
|
numbers, separated by periods, as in @samp{128.52.46.32}, and IPv6
|
||||||
numeric host addresses as sequences of up to eight numbers seperated by
|
numeric host addresses as sequences of up to eight numbers separated by
|
||||||
colons, as in @samp{5f03:1200:836f:c100::1}.
|
colons, as in @samp{5f03:1200:836f:c100::1}.
|
||||||
|
|
||||||
Each computer also has one or more @dfn{host names}, which are strings
|
Each computer also has one or more @dfn{host names}, which are strings
|
||||||
|
|
|
@ -520,7 +520,7 @@ classification.
|
||||||
@cindex LC_MESSAGES environment variable
|
@cindex LC_MESSAGES environment variable
|
||||||
|
|
||||||
This specifies what locale to use for printing messages and to parse
|
This specifies what locale to use for printing messages and to parse
|
||||||
reponses.
|
responses.
|
||||||
|
|
||||||
@item LC_MONETARY
|
@item LC_MONETARY
|
||||||
@cindex LC_MONETARY environment variable
|
@cindex LC_MONETARY environment variable
|
||||||
|
|
|
@ -288,7 +288,7 @@ another function.
|
||||||
@deftypefun int fcloseall (void)
|
@deftypefun int fcloseall (void)
|
||||||
This function causes all open streams of the process to be closed and
|
This function causes all open streams of the process to be closed and
|
||||||
the connection to corresponding files to be broken. All buffered data
|
the connection to corresponding files to be broken. All buffered data
|
||||||
is written and any buffered inputis discarded. The @code{fcloseall}
|
is written and any buffered input is discarded. The @code{fcloseall}
|
||||||
function returns a value of @code{0} if all the files were closed
|
function returns a value of @code{0} if all the files were closed
|
||||||
successfully, and @code{EOF} if an error was detected.
|
successfully, and @code{EOF} if an error was detected.
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ initial @samp{%} character followed in sequence by:
|
||||||
@item
|
@item
|
||||||
An optional specification of the parameter used for this format.
|
An optional specification of the parameter used for this format.
|
||||||
Normally the parameters to the @code{printf} function a assigned to the
|
Normally the parameters to the @code{printf} function a assigned to the
|
||||||
formats in the order of appearence in the format string. But in some
|
formats in the order of appearance in the format string. But in some
|
||||||
situations (such as message translation) this is not desirable and this
|
situations (such as message translation) this is not desirable and this
|
||||||
extension allows to specify and explicit parameter to be used.
|
extension allows to specify and explicit parameter to be used.
|
||||||
|
|
||||||
|
@ -1236,7 +1236,7 @@ numbers are represented is the form
|
||||||
@w{[@code{-}]@code{0x}@var{h}@code{.}@var{hhh}@code{p}[@code{+}|@code{-}]@var{dd}}.
|
@w{[@code{-}]@code{0x}@var{h}@code{.}@var{hhh}@code{p}[@code{+}|@code{-}]@var{dd}}.
|
||||||
At the left of the decimal-point character exactly one digit is print.
|
At the left of the decimal-point character exactly one digit is print.
|
||||||
This character is only @code{0} is the number is denormalized.
|
This character is only @code{0} is the number is denormalized.
|
||||||
Otherwise the value is unspecifed; it is implemention dependent how many
|
Otherwise the value is unspecified; it is implemention dependent how many
|
||||||
bits are used. The number of hexadecimal digits on the right side of
|
bits are used. The number of hexadecimal digits on the right side of
|
||||||
the decimal-point character is equal to the precision. If the precision
|
the decimal-point character is equal to the precision. If the precision
|
||||||
is zero it is determined to be large enough to provide an exact
|
is zero it is determined to be large enough to provide an exact
|
||||||
|
@ -2310,7 +2310,7 @@ register_printf_function ('B', printf_size, printf_size_info);
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
Here we register the functions to print numbers as powers of 1000 since
|
Here we register the functions to print numbers as powers of 1000 since
|
||||||
the format character @code{'B'} is an upper-case characeter. If we
|
the format character @code{'B'} is an upper-case character. If we
|
||||||
would additionally use @code{'b'} in a line like
|
would additionally use @code{'b'} in a line like
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
@ -3110,7 +3110,7 @@ This function is similar to @code{fseek} but it corrects a problem with
|
||||||
@code{fseeko} uses the correct type @code{off_t} for the @var{offset}
|
@code{fseeko} uses the correct type @code{off_t} for the @var{offset}
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
For this reasonit is a good idea to prefer @code{ftello} whenever it is
|
For this reason it is a good idea to prefer @code{ftello} whenever it is
|
||||||
available since its functionality is (if different at all) closer the
|
available since its functionality is (if different at all) closer the
|
||||||
underlying definition.
|
underlying definition.
|
||||||
|
|
||||||
|
@ -3157,7 +3157,7 @@ the offset provided is relative to the end of the file.
|
||||||
@comment ISO
|
@comment ISO
|
||||||
@deftypefun void rewind (FILE *@var{stream})
|
@deftypefun void rewind (FILE *@var{stream})
|
||||||
The @code{rewind} function positions the stream @var{stream} at the
|
The @code{rewind} function positions the stream @var{stream} at the
|
||||||
begining of the file. It is equivalent to calling @code{fseek} or
|
beginning of the file. It is equivalent to calling @code{fseek} or
|
||||||
@code{fseeko} on the @var{stream} with an @var{offset} argument of
|
@code{fseeko} on the @var{stream} with an @var{offset} argument of
|
||||||
@code{0L} and a @var{whence} argument of @code{SEEK_SET}, except that
|
@code{0L} and a @var{whence} argument of @code{SEEK_SET}, except that
|
||||||
the return value is discarded and the error indicator for the stream is
|
the return value is discarded and the error indicator for the stream is
|
||||||
|
@ -3756,7 +3756,7 @@ the following members:
|
||||||
@table @code
|
@table @code
|
||||||
@item cookie_read_function_t *read
|
@item cookie_read_function_t *read
|
||||||
This is the function that reads data from the cookie. If the value is a
|
This is the function that reads data from the cookie. If the value is a
|
||||||
null pointer instead of a function, then read operations on ths stream
|
null pointer instead of a function, then read operations on this stream
|
||||||
always return @code{EOF}.
|
always return @code{EOF}.
|
||||||
|
|
||||||
@item cookie_write_function_t *write
|
@item cookie_write_function_t *write
|
||||||
|
@ -3926,7 +3926,7 @@ Display the message in standard error.
|
||||||
Display the message on the system console.
|
Display the message on the system console.
|
||||||
@end vtable
|
@end vtable
|
||||||
|
|
||||||
The errorneous piece of the system can be signalled by exactly one of the
|
The erroneous piece of the system can be signalled by exactly one of the
|
||||||
following values which also is bitwise ORed with the
|
following values which also is bitwise ORed with the
|
||||||
@var{classification} parameter to @code{fmtmsg}:
|
@var{classification} parameter to @code{fmtmsg}:
|
||||||
|
|
||||||
|
@ -3945,11 +3945,11 @@ done by using exactly one of the following values:
|
||||||
|
|
||||||
@vtable @code
|
@vtable @code
|
||||||
@item MM_APPL
|
@item MM_APPL
|
||||||
The errorneous condition is detected by the application.
|
The erroneous condition is detected by the application.
|
||||||
@item MM_UTIL
|
@item MM_UTIL
|
||||||
The errorneous condition is detected by a utility.
|
The erroneous condition is detected by a utility.
|
||||||
@item MM_OPSYS
|
@item MM_OPSYS
|
||||||
The errorneous condition is detected by the operating system.
|
The erroneous condition is detected by the operating system.
|
||||||
@end vtable
|
@end vtable
|
||||||
|
|
||||||
A last component of @var{classification} can signal the results of this
|
A last component of @var{classification} can signal the results of this
|
||||||
|
@ -3970,7 +3970,7 @@ in the @var{classification} parameter. The @var{label} parameter
|
||||||
identifies the source of the message. The string should consist of two
|
identifies the source of the message. The string should consist of two
|
||||||
colon separated parts where the first part has not more than 10 and the
|
colon separated parts where the first part has not more than 10 and the
|
||||||
second part not more the 14 characters. The @var{text} parameter
|
second part not more the 14 characters. The @var{text} parameter
|
||||||
descries the condition of the error, the @var{action} parameter possible
|
describes the condition of the error, the @var{action} parameter possible
|
||||||
steps to recover from the error and the @var{tag} parameter is a
|
steps to recover from the error and the @var{tag} parameter is a
|
||||||
reference to the online documentation where more information can be
|
reference to the online documentation where more information can be
|
||||||
found. It should contain the @var{label} value and a unique
|
found. It should contain the @var{label} value and a unique
|
||||||
|
|
|
@ -175,7 +175,7 @@ The @code{strnlen} function returns the length of the null-terminated
|
||||||
string @var{s} is this length is smaller than @var{maxlen}. Otherwise
|
string @var{s} is this length is smaller than @var{maxlen}. Otherwise
|
||||||
it returns @var{maxlen}. Therefore this function is equivalent to
|
it returns @var{maxlen}. Therefore this function is equivalent to
|
||||||
@code{(strlen (@var{s}) < n ? strlen (@var{s}) : @var{maxlen})} but it
|
@code{(strlen (@var{s}) < n ? strlen (@var{s}) : @var{maxlen})} but it
|
||||||
is more efficent.
|
is more efficient.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
char string[32] = "hello, world";
|
char string[32] = "hello, world";
|
||||||
|
@ -247,7 +247,7 @@ memcpy (new, old, arraysize * sizeof (struct foo));
|
||||||
@comment GNU
|
@comment GNU
|
||||||
@deftypefun {void *} mempcpy (void *@var{to}, const void *@var{from}, size_t @var{size})
|
@deftypefun {void *} mempcpy (void *@var{to}, const void *@var{from}, size_t @var{size})
|
||||||
The @code{mempcpy} function is nearly identical to the @code{memcpy}
|
The @code{mempcpy} function is nearly identical to the @code{memcpy}
|
||||||
function. It copies @var{size} byts from the object beginning at
|
function. It copies @var{size} bytes from the object beginning at
|
||||||
@code{from} into the object pointed to by @var{to}. But instead of
|
@code{from} into the object pointed to by @var{to}. But instead of
|
||||||
returning the value of @code{to} it returns a pointer to the byte
|
returning the value of @code{to} it returns a pointer to the byte
|
||||||
following the last written byte in the object beginning at @var{to}.
|
following the last written byte in the object beginning at @var{to}.
|
||||||
|
@ -616,7 +616,7 @@ This function is like @code{strcmp}, except that differences in case are
|
||||||
ignored. How uppercase and lowercase character are related is
|
ignored. How uppercase and lowercase character are related is
|
||||||
determined by the currently selected locale. In the standard @code{"C"}
|
determined by the currently selected locale. In the standard @code{"C"}
|
||||||
locale the characters @"A and @"a do not match but in a locale which
|
locale the characters @"A and @"a do not match but in a locale which
|
||||||
regards this characters as parts of the alphabeth they do match.
|
regards this characters as parts of the alphabet they do match.
|
||||||
|
|
||||||
@code{strcasecmp} is derived from BSD.
|
@code{strcasecmp} is derived from BSD.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
@ -669,12 +669,12 @@ value follows the same conventions as found in the @code{strverscmp}
|
||||||
function. In fact, if @var{s1} and @var{s2} contain no digits,
|
function. In fact, if @var{s1} and @var{s2} contain no digits,
|
||||||
@code{strverscmp} behaves like @code{strcmp}.
|
@code{strverscmp} behaves like @code{strcmp}.
|
||||||
|
|
||||||
Basically, we compare strings normaly (character by character), until
|
Basically, we compare strings normally (character by character), until
|
||||||
we find a digit in each string - then we enter a special comparison
|
we find a digit in each string - then we enter a special comparison
|
||||||
mode, where each sequence of digit is taken as a whole. If we reach the
|
mode, where each sequence of digit is taken as a whole. If we reach the
|
||||||
end of these two parts without noticing a difference, we return to the
|
end of these two parts without noticing a difference, we return to the
|
||||||
standard comparison mode. There are two types of numeric parts:
|
standard comparison mode. There are two types of numeric parts:
|
||||||
"integral" and "fractionnal" (these laters begins with a '0'). The types
|
"integral" and "fractional" (those begin with a '0'). The types
|
||||||
of the numeric parts affect the way we sort them:
|
of the numeric parts affect the way we sort them:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -682,13 +682,13 @@ of the numeric parts affect the way we sort them:
|
||||||
integral/integral: we compare values as you would expect.
|
integral/integral: we compare values as you would expect.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
fractionnal/integral: the fractionnal part is less than the integral one.
|
fractional/integral: the fractional part is less than the integral one.
|
||||||
Again, no surprise.
|
Again, no surprise.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
fractionnal/fractionnal: the things become a bit more complex.
|
fractional/fractional: the things become a bit more complex.
|
||||||
if the common prefix contains only leading zeroes, the longest part is less
|
If the common prefix contains only leading zeroes, the longest part is less
|
||||||
than the other one; else the comparison behaves normaly.
|
than the other one; else the comparison behaves normally.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
@ -697,14 +697,14 @@ strverscmp ("no digit", "no digit")
|
||||||
strverscmp ("item#99", "item#100")
|
strverscmp ("item#99", "item#100")
|
||||||
@result{} <0 /* @r{same prefix, but 99 < 100.} */
|
@result{} <0 /* @r{same prefix, but 99 < 100.} */
|
||||||
strverscmp ("alpha1", "alpha001")
|
strverscmp ("alpha1", "alpha001")
|
||||||
@result{} >0 /* @r{fractionnal part inferior to integral one.} */
|
@result{} >0 /* @r{fractional part inferior to integral one.} */
|
||||||
strverscmp ("part1_f012", "part1_f01")
|
strverscmp ("part1_f012", "part1_f01")
|
||||||
@result{} >0 /* @r{two fractionnal parts.} */
|
@result{} >0 /* @r{two fractional parts.} */
|
||||||
strverscmp ("foo.009", "foo.0")
|
strverscmp ("foo.009", "foo.0")
|
||||||
@result{} <0 /* @r{idem, but with leading zeroes only.} */
|
@result{} <0 /* @r{idem, but with leading zeroes only.} */
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
This function is especially usefull when dealing with filename sorting,
|
This function is especially useful when dealing with filename sorting,
|
||||||
because filenames frequently hold indices/version numbers.
|
because filenames frequently hold indices/version numbers.
|
||||||
|
|
||||||
@code{strverscmp} is a GNU extension.
|
@code{strverscmp} is a GNU extension.
|
||||||
|
@ -852,7 +852,7 @@ sort_strings_fast (char **array, int nstrings)
|
||||||
@{
|
@{
|
||||||
size_t length = strlen (array[i]) * 2;
|
size_t length = strlen (array[i]) * 2;
|
||||||
char *transformed;
|
char *transformed;
|
||||||
size_t transformed_lenght;
|
size_t transformed_length;
|
||||||
|
|
||||||
temp_array[i].input = array[i];
|
temp_array[i].input = array[i];
|
||||||
|
|
||||||
|
|
|
@ -568,7 +568,7 @@ universal time.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
As for the @code{localtime} function we have the problem that the result
|
As for the @code{localtime} function we have the problem that the result
|
||||||
is placed ina static variable. POSIX.1c also provides a replacement for
|
is placed in a static variable. POSIX.1c also provides a replacement for
|
||||||
@code{gmtime}.
|
@code{gmtime}.
|
||||||
|
|
||||||
@comment time.h
|
@comment time.h
|
||||||
|
@ -1163,7 +1163,7 @@ broken-down time structure, since @code{tm_zone} reports the correct
|
||||||
abbreviation even when it is not the latest one.
|
abbreviation even when it is not the latest one.
|
||||||
|
|
||||||
Though the strings are declared as @code{char *} the user must stay away
|
Though the strings are declared as @code{char *} the user must stay away
|
||||||
from modifying these strings. Modying the strings will almost certainly
|
from modifying these strings. Modifying the strings will almost certainly
|
||||||
lead to trouble.
|
lead to trouble.
|
||||||
|
|
||||||
@end deftypevar
|
@end deftypevar
|
||||||
|
|
|
@ -1770,7 +1770,7 @@ This function closes the internal stream used by @code{getgrent} or
|
||||||
@subsection Netgroup Data
|
@subsection Netgroup Data
|
||||||
|
|
||||||
@cindex Netgroup
|
@cindex Netgroup
|
||||||
Sometimes it is useful group users according to other criterias like the
|
Sometimes it is useful group users according to other criteria like the
|
||||||
ones used in the @xref{Group Database}. E.g., it is useful to associate
|
ones used in the @xref{Group Database}. E.g., it is useful to associate
|
||||||
a certain group of users with a certain machine. On the other hand
|
a certain group of users with a certain machine. On the other hand
|
||||||
grouping of host names is not supported so far.
|
grouping of host names is not supported so far.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -28,7 +28,7 @@ printf (const char *format, ...)
|
||||||
int done;
|
int done;
|
||||||
|
|
||||||
va_start (arg, format);
|
va_start (arg, format);
|
||||||
done = vprintf (format, arg);
|
done = vfprintf (stdout, format, arg);
|
||||||
va_end (arg);
|
va_end (arg);
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
|
|
|
@ -19,15 +19,6 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* The function `vscanf' is not defined in ISO C. Therefore we must
|
|
||||||
use the protected form here. In stdio it is called `__vscanf' and
|
|
||||||
in libio `_IO_vscanf'. */
|
|
||||||
#ifdef USE_IN_LIBIO
|
|
||||||
# include <libioP.h>
|
|
||||||
# define VSCANF _IO_vscanf
|
|
||||||
#else
|
|
||||||
# define VSCANF __vscanf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Read formatted input from stdin according to the format string FORMAT. */
|
/* Read formatted input from stdin according to the format string FORMAT. */
|
||||||
/* VARARGS1 */
|
/* VARARGS1 */
|
||||||
|
@ -38,7 +29,11 @@ scanf (const char *format, ...)
|
||||||
int done;
|
int done;
|
||||||
|
|
||||||
va_start (arg, format);
|
va_start (arg, format);
|
||||||
done = VSCANF (format, arg);
|
#ifdef USE_IN_LIBIO
|
||||||
|
done = _IO_vfscanf (stdin, format, arg, NULL);
|
||||||
|
#else
|
||||||
|
done = vfscanf (stdin, format, arg);
|
||||||
|
#endif
|
||||||
va_end (arg);
|
va_end (arg);
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
ifeq (,$(filter-out $(sysdep_dir)/stub/bits $(common-objpfx)/bits,\
|
ifeq (,$(filter-out $(sysdep_dir)/generic/bits $(common-objpfx)/bits,\
|
||||||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/endian.h))))))
|
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/endian.h))))))
|
||||||
|
|
||||||
$(common-objpfx)bytesex.h: $(common-objpfx)det_endian
|
$(common-objpfx)bytesex.h: $(common-objpfx)det_endian
|
||||||
|
|
|
@ -36,3 +36,4 @@ __longjmp (env, val)
|
||||||
}
|
}
|
||||||
|
|
||||||
stub_warning (longjmp)
|
stub_warning (longjmp)
|
||||||
|
#include <stub-tag.h>
|
|
@ -31,3 +31,4 @@ _exit (status)
|
||||||
}
|
}
|
||||||
|
|
||||||
stub_warning (_exit)
|
stub_warning (_exit)
|
||||||
|
#include <stub-tag.h>
|
|
@ -36,3 +36,4 @@ accept (fd, addr, addr_len)
|
||||||
|
|
||||||
|
|
||||||
stub_warning (accept)
|
stub_warning (accept)
|
||||||
|
#include <stub-tag.h>
|
|
@ -38,3 +38,4 @@ __access (file, type)
|
||||||
stub_warning (access)
|
stub_warning (access)
|
||||||
|
|
||||||
weak_alias (__access, access)
|
weak_alias (__access, access)
|
||||||
|
#include <stub-tag.h>
|
|
@ -31,3 +31,4 @@ acct (name)
|
||||||
}
|
}
|
||||||
|
|
||||||
stub_warning (acct)
|
stub_warning (acct)
|
||||||
|
#include <stub-tag.h>
|
|
@ -34,3 +34,4 @@ __adjtime (delta, olddelta)
|
||||||
stub_warning (adjtime)
|
stub_warning (adjtime)
|
||||||
|
|
||||||
weak_alias (__adjtime, adjtime)
|
weak_alias (__adjtime, adjtime)
|
||||||
|
#include <stub-tag.h>
|
|
@ -36,3 +36,4 @@ alarm (seconds)
|
||||||
|
|
||||||
|
|
||||||
stub_warning (alarm)
|
stub_warning (alarm)
|
||||||
|
#include <stub-tag.h>
|
|
@ -32,3 +32,4 @@ bind (fd, addr, len)
|
||||||
|
|
||||||
|
|
||||||
stub_warning (bind)
|
stub_warning (bind)
|
||||||
|
#include <stub-tag.h>
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* Directory entry structure `struct dirent'. Stub version.
|
||||||
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
struct dirent
|
||||||
|
{
|
||||||
|
char d_name[1]; /* Variable length. */
|
||||||
|
int d_fileno;
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
/* This file specifies the native word size of the machine, which indicates
|
||||||
|
the ELF file class used for executables and shared objects on this
|
||||||
|
machine. */
|
||||||
|
|
||||||
|
#define __ELF_NATIVE_CLASS ??
|
||||||
|
|
||||||
|
/* This file goes in sysdeps/wordsize-?? and sysdeps/MACHINE/Implies lists
|
||||||
|
wordsize-?? for MACHINE's wordsize. */
|
|
@ -0,0 +1,9 @@
|
||||||
|
/* This file should define __BYTE_ORDER as appropriate for the machine
|
||||||
|
in question. See string/endian.h for how to define it.
|
||||||
|
|
||||||
|
If only the stub bits/endian.h applies to a particular configuration,
|
||||||
|
bytesex.h is generated by running a program on the host machine.
|
||||||
|
So if cross-compiling to a machine with a different byte order,
|
||||||
|
the bits/endian.h file for that machine must exist. */
|
||||||
|
|
||||||
|
#error Machine byte order unknown.
|
|
@ -0,0 +1,40 @@
|
||||||
|
/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* This file defines the `errno' constants. */
|
||||||
|
|
||||||
|
#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
|
||||||
|
#undef __need_Emath
|
||||||
|
#define __Emath_defined 1
|
||||||
|
|
||||||
|
#define EDOM 1
|
||||||
|
#define ERANGE 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _ERRNO_H
|
||||||
|
#define ENOSYS 3
|
||||||
|
#define EINVAL 4
|
||||||
|
#define ESPIPE 5
|
||||||
|
#define EBADF 6
|
||||||
|
#define ENOMEM 7
|
||||||
|
#define EACCES 8
|
||||||
|
#define ENFILE 9
|
||||||
|
#define EMFILE 10
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __set_errno(val) errno = (val)
|
|
@ -0,0 +1,85 @@
|
||||||
|
/* O_*, F_*, FD_* bit values for stub configuration.
|
||||||
|
Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* These values should be changed as appropriate for your system. */
|
||||||
|
|
||||||
|
#ifndef _FCNTL_H
|
||||||
|
#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* File access modes for `open' and `fcntl'. */
|
||||||
|
#define O_RDONLY 0 /* Open read-only. */
|
||||||
|
#define O_WRONLY 1 /* Open write-only. */
|
||||||
|
#define O_RDWR 2 /* Open read/write. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Bits OR'd into the second argument to open. */
|
||||||
|
#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
|
||||||
|
#define O_EXCL 0x0800 /* Fail if file already exists. */
|
||||||
|
#define O_TRUNC 0x0400 /* Truncate file to zero length. */
|
||||||
|
#define O_NOCTTY 0x0100 /* Don't assign a controlling terminal. */
|
||||||
|
|
||||||
|
/* File status flags for `open' and `fcntl'. */
|
||||||
|
#define O_APPEND 0x0008 /* Writes append to the file. */
|
||||||
|
#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
|
||||||
|
|
||||||
|
#ifdef __USE_BSD
|
||||||
|
#define O_NDELAY O_NONBLOCK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Mask for file access modes. This is system-dependent in case
|
||||||
|
some system ever wants to define some other flavor of access. */
|
||||||
|
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
|
||||||
|
|
||||||
|
/* Values for the second argument to `fcntl'. */
|
||||||
|
#define F_DUPFD 0 /* Duplicate file descriptor. */
|
||||||
|
#define F_GETFD 1 /* Get file descriptor flags. */
|
||||||
|
#define F_SETFD 2 /* Set file descriptor flags. */
|
||||||
|
#define F_GETFL 3 /* Get file status flags. */
|
||||||
|
#define F_SETFL 4 /* Set file status flags. */
|
||||||
|
#ifdef __USE_BSD
|
||||||
|
#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
|
||||||
|
#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
|
||||||
|
#endif
|
||||||
|
#define F_GETLK 7 /* Get record locking info. */
|
||||||
|
#define F_SETLK 8 /* Set record locking info. */
|
||||||
|
#define F_SETLKW 9 /* Set record locking info, wait. */
|
||||||
|
|
||||||
|
/* File descriptor flags used with F_GETFD and F_SETFD. */
|
||||||
|
#define FD_CLOEXEC 1 /* Close on exec. */
|
||||||
|
|
||||||
|
|
||||||
|
#include <bits/types.h>
|
||||||
|
|
||||||
|
/* The structure describing an advisory lock. This is the type of the third
|
||||||
|
argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
|
||||||
|
struct flock
|
||||||
|
{
|
||||||
|
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||||
|
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||||
|
__off_t l_start; /* Offset where the lock begins. */
|
||||||
|
__off_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||||
|
__pid_t l_pid; /* Process holding the lock. */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Values for the `l_type' field of a `struct flock'. */
|
||||||
|
#define F_RDLCK 1 /* Read lock. */
|
||||||
|
#define F_WRLCK 2 /* Write lock. */
|
||||||
|
#define F_UNLCK 3 /* Remove lock. */
|
|
@ -0,0 +1,61 @@
|
||||||
|
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _FENV_H
|
||||||
|
#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Here should be the exception be defined:
|
||||||
|
FE_INVALID
|
||||||
|
FE_DIVBYZERO
|
||||||
|
FE_OVERFLOW
|
||||||
|
FE_UNDERFLOW
|
||||||
|
FE_INEXACT
|
||||||
|
We define no macro which signals no exception is supported. */
|
||||||
|
|
||||||
|
#define FE_ALL_EXCEPT 0
|
||||||
|
|
||||||
|
|
||||||
|
/* Here should the rounding modes be defined:
|
||||||
|
FE_TONEAREST
|
||||||
|
FE_DOWNWARD
|
||||||
|
FE_UPWARD
|
||||||
|
FE_TOWARDSZERO
|
||||||
|
We define no macro which signals no rounding mode is selectable. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Type representing exception flags.
|
||||||
|
XXX Probably we should also include the signal handler here. */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned int flags;
|
||||||
|
}
|
||||||
|
fexcept_t;
|
||||||
|
|
||||||
|
|
||||||
|
/* Type representing floating-point environment. */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
fexcept_t excepts;
|
||||||
|
/* XXX I don't know what else we should save. */
|
||||||
|
}
|
||||||
|
fenv_t;
|
||||||
|
|
||||||
|
/* If the default argument is used we use this value. */
|
||||||
|
#define FE_DFL_ENV ((fenv_t *) -1l)
|
|
@ -0,0 +1,26 @@
|
||||||
|
/* Stub `HUGE_VAL' constant.
|
||||||
|
Used by <stdlib.h> and <math.h> functions for overflow.
|
||||||
|
Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _MATH_H
|
||||||
|
#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define HUGE_VAL 1e37
|
|
@ -0,0 +1 @@
|
||||||
|
/* This space intentionally left blank. */
|
|
@ -0,0 +1,56 @@
|
||||||
|
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _SYS_IPC_BUF_H
|
||||||
|
|
||||||
|
#define _SYS_IPC_BUF_H 1
|
||||||
|
#include <features.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
/* Mode bits for `msgget', `semget', and `shmget'. */
|
||||||
|
#define IPC_CREAT 01000 /* create key if key does not exist */
|
||||||
|
#define IPC_EXCL 02000 /* fail if key exists */
|
||||||
|
#define IPC_NOWAIT 04000 /* return error on wait */
|
||||||
|
|
||||||
|
/* Control commands for `msgctl', `semctl', and `shmctl'. */
|
||||||
|
#define IPC_RMID 0 /* remove identifier */
|
||||||
|
#define IPC_SET 1 /* set `ipc_perm' options */
|
||||||
|
#define IPC_STAT 2 /* get `ipc_perm' options */
|
||||||
|
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Special key values. */
|
||||||
|
#define IPC_PRIVATE ((key_t) 0) /* private key */
|
||||||
|
|
||||||
|
|
||||||
|
/* Data structure used to pass permission information to IPC operations. */
|
||||||
|
struct ipc_perm
|
||||||
|
{
|
||||||
|
__uid_t uid; /* owner's user ID */
|
||||||
|
__gid_t gid; /* owner's group ID */
|
||||||
|
__uid_t cuid; /* creator's user ID */
|
||||||
|
__gid_t cgid; /* creator's group ID */
|
||||||
|
__mode_t mode; /* read/write permission */
|
||||||
|
};
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
#endif /* _SYS_IPC_BUF_H */
|
|
@ -0,0 +1,109 @@
|
||||||
|
/* libc-internal interface for mutex locks. Stub version.
|
||||||
|
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _BITS_LIBC_LOCK_H
|
||||||
|
#define _BITS_LIBC_LOCK_H 1
|
||||||
|
|
||||||
|
|
||||||
|
/* Define a lock variable NAME with storage class CLASS. The lock must be
|
||||||
|
initialized with __libc_lock_init before it can be used (or define it
|
||||||
|
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
|
||||||
|
declare a lock defined in another module. In public structure
|
||||||
|
definitions you must use a pointer to the lock structure (i.e., NAME
|
||||||
|
begins with a `*'), because its storage size will not be known outside
|
||||||
|
of libc. */
|
||||||
|
#define __libc_lock_define(CLASS,NAME)
|
||||||
|
|
||||||
|
/* Define an initialized lock variable NAME with storage class CLASS. */
|
||||||
|
#define __libc_lock_define_initialized(CLASS,NAME)
|
||||||
|
|
||||||
|
/* Define an initialized recursive lock variable NAME with storage
|
||||||
|
class CLASS. */
|
||||||
|
#define __libc_lock_define_initialized_recursive(CLASS,NAME)
|
||||||
|
|
||||||
|
/* Initialize the named lock variable, leaving it in a consistent, unlocked
|
||||||
|
state. */
|
||||||
|
#define __libc_lock_init(NAME)
|
||||||
|
|
||||||
|
/* Same as last but this time we initialize a recursive mutex. */
|
||||||
|
#define __libc_lock_init_recursive(NAME)
|
||||||
|
|
||||||
|
/* Finalize the named lock variable, which must be locked. It cannot be
|
||||||
|
used again until __libc_lock_init is called again on it. This must be
|
||||||
|
called on a lock variable before the containing storage is reused. */
|
||||||
|
#define __libc_lock_fini(NAME)
|
||||||
|
|
||||||
|
/* Finalize recursive named lock. */
|
||||||
|
#define __libc_lock_fini_recursive(NAME)
|
||||||
|
|
||||||
|
/* Lock the named lock variable. */
|
||||||
|
#define __libc_lock_lock(NAME)
|
||||||
|
|
||||||
|
/* Lock the recursive named lock variable. */
|
||||||
|
#define __libc_lock_lock_recursive(NAME)
|
||||||
|
|
||||||
|
/* Try to lock the named lock variable. */
|
||||||
|
#define __libc_lock_trylock(NAME) 0
|
||||||
|
|
||||||
|
/* Try to lock the recursive named lock variable. */
|
||||||
|
#define __libc_lock_trylock_recursive(NAME) 0
|
||||||
|
|
||||||
|
/* Unlock the named lock variable. */
|
||||||
|
#define __libc_lock_unlock(NAME)
|
||||||
|
|
||||||
|
/* Unlock the recursive named lock variable. */
|
||||||
|
#define __libc_lock_unlock_recursive(NAME)
|
||||||
|
|
||||||
|
|
||||||
|
/* Define once control variable. */
|
||||||
|
#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0
|
||||||
|
|
||||||
|
/* Call handler iff the first call. */
|
||||||
|
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
|
||||||
|
do { \
|
||||||
|
if ((ONCE_CONTROL) == 0) { \
|
||||||
|
INIT_FUNCTION (); \
|
||||||
|
(ONCE_CONTROL) = 1; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
/* Start critical region with cleanup. */
|
||||||
|
#define __libc_cleanup_region_start(FCT, ARG)
|
||||||
|
|
||||||
|
/* End critical region with cleanup. */
|
||||||
|
#define __libc_cleanup_region_end(DOIT)
|
||||||
|
|
||||||
|
|
||||||
|
/* We need portable names for some of the functions. */
|
||||||
|
#define __libc_mutex_unlock
|
||||||
|
|
||||||
|
/* Type for key of thread specific data. */
|
||||||
|
typedef int __libc_key_t;
|
||||||
|
|
||||||
|
/* Create key for thread specific data. */
|
||||||
|
#define __libc_key_create(KEY,DEST) -1
|
||||||
|
|
||||||
|
/* Set thread-specific data associated with KEY to VAL. */
|
||||||
|
#define __libc_setspecific(KEY,VAL) -1
|
||||||
|
|
||||||
|
/* Get thread-specific data associated with KEY. */
|
||||||
|
#define __libc_getspecific(KEY) 0
|
||||||
|
|
||||||
|
#endif /* bits/libc-lock.h */
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* This file should define the implementation-specific limits described
|
||||||
|
in posix[12]_lim.h. If there are no useful values to give a limit,
|
||||||
|
don't define it. */
|
|
@ -0,0 +1,12 @@
|
||||||
|
/* This file should provide inline versions of math functions.
|
||||||
|
|
||||||
|
Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
|
||||||
|
|
||||||
|
This file should define __MATH_INLINES if functions are actually defined as
|
||||||
|
inlines. */
|
||||||
|
|
||||||
|
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
|
||||||
|
|
||||||
|
/* Here goes the real code. */
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _SYS_MSG_H
|
||||||
|
#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
/* Define options for message queue functions. */
|
||||||
|
#define MSG_NOERROR 010000 /* no error if message is too big */
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Structure of record for one message inside the kernel.
|
||||||
|
The type `struct __msg' is opaque. */
|
||||||
|
struct msqid_ds
|
||||||
|
{
|
||||||
|
struct ipc_perm msg_perm; /* structure describing operation permission */
|
||||||
|
__time_t msg_stime; /* time of last msgsnd command */
|
||||||
|
__time_t msg_rtime; /* time of last msgrcv command */
|
||||||
|
__time_t msg_ctime; /* time of last change */
|
||||||
|
unsigned short int msg_qnum; /* number of messages currently on queue */
|
||||||
|
unsigned short int msg_qbytes;/* max number of bytes allowed on queue */
|
||||||
|
__pid_t msg_lspid; /* pid of last msgsnd() */
|
||||||
|
__pid_t msg_lrpid; /* pid of last msgrcv() */
|
||||||
|
};
|
||||||
|
|
||||||
|
__END_DECLS
|
|
@ -0,0 +1,5 @@
|
||||||
|
#ifndef _MATH_H
|
||||||
|
#error "Never use <bits/nan.h> directly; include <math.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This file should define `NAN' on machines that have such things. */
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* This file should define the POSIX options described in <unistd.h>,
|
||||||
|
or leave them undefined, as appropriate. */
|
|
@ -0,0 +1,61 @@
|
||||||
|
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _SYS_SEM_H
|
||||||
|
#error "Never use <bits/sem.h> directly; include <sys/sem.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
/* Flags for `semop'. */
|
||||||
|
#define SEM_UNDO 0x1000 /* undo the operation on exit */
|
||||||
|
|
||||||
|
/* Commands for `semctl'. */
|
||||||
|
#define GETPID 11 /* get sempid */
|
||||||
|
#define GETVAL 12 /* get semval */
|
||||||
|
#define GETALL 13 /* get all semval's */
|
||||||
|
#define GETNCNT 14 /* get semncnt */
|
||||||
|
#define GETZCNT 15 /* get semzcnt */
|
||||||
|
#define SETVAL 16 /* set semval */
|
||||||
|
#define SETALL 17 /* set all semval's */
|
||||||
|
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Data structure describing a set of semaphores. */
|
||||||
|
struct semid_ds
|
||||||
|
{
|
||||||
|
struct ipc_perm sem_perm; /* operation permission struct */
|
||||||
|
__time_t sem_otime; /* last semop() time */
|
||||||
|
__time_t sem_ctime; /* last time changed by semctl() */
|
||||||
|
unsigned short int sem_nsems; /* number of semaphores in set */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Union used for argument for `semctl'. */
|
||||||
|
union semun
|
||||||
|
{
|
||||||
|
int val; /* value for SETVAL */
|
||||||
|
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
|
||||||
|
unsigned short int *array; /* array for GETALL & SETALL */
|
||||||
|
struct seminfo *__buf; /* buffer for IPC_INFO */
|
||||||
|
};
|
||||||
|
|
||||||
|
__END_DECLS
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* Define the machine-dependent type `jmp_buf'. Stub version. */
|
||||||
|
|
||||||
|
typedef int __jmp_buf[1];
|
|
@ -0,0 +1,53 @@
|
||||||
|
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _SYS_SHM_H
|
||||||
|
#error "Never use <bits/shm.h> directly; include <sys/shm.h> instead."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
/* Flags for `shmat'. */
|
||||||
|
#define SHM_RDONLY 010000 /* attach read-only else read-write */
|
||||||
|
#define SHM_RND 020000 /* round attach address to SHMLBA */
|
||||||
|
#define SHM_REMAP 040000 /* take-over region on attach */
|
||||||
|
|
||||||
|
/* Commands for `shmctl'. */
|
||||||
|
#define SHM_LOCK 11 /* lock segment (root only) */
|
||||||
|
#define SHM_UNLOCK 12 /* unlock segment (root only) */
|
||||||
|
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Data structure describing a set of semaphores. */
|
||||||
|
struct shmid_ds
|
||||||
|
{
|
||||||
|
struct ipc_perm sem_perm; /* operation permission struct */
|
||||||
|
int shm_segsz; /* size of segment in bytes */
|
||||||
|
__time_t sem_atime; /* time of last shmat() */
|
||||||
|
__time_t sem_dtime; /* time of last shmdt() */
|
||||||
|
__time_t sem_ctime; /* time of last change by shmctl() */
|
||||||
|
__pid_t shm_cpid; /* pid of creator */
|
||||||
|
__pid_t shm_lpid; /* pid of last shmop */
|
||||||
|
unsigned short int shm_nattch; /* number of current attaches */
|
||||||
|
};
|
||||||
|
|
||||||
|
__END_DECLS
|
|
@ -0,0 +1,29 @@
|
||||||
|
/* Structure describing state saved while handling a signal. Stub version.
|
||||||
|
Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* State of this thread when the signal was taken. */
|
||||||
|
struct sigcontext
|
||||||
|
{
|
||||||
|
int sc_onstack;
|
||||||
|
__sigset_t sc_mask;
|
||||||
|
|
||||||
|
/* Registers and such. */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Signal subcodes should be defined here. */
|
|
@ -0,0 +1,53 @@
|
||||||
|
/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef _SIGNAL_H
|
||||||
|
|
||||||
|
/* Fake signal functions. */
|
||||||
|
extern void _sig_ign __P ((int sig));
|
||||||
|
extern void _sig_dfl __P ((int sig));
|
||||||
|
|
||||||
|
#define SIG_ERR ((__sighandler_t) 0) /* Error return. */
|
||||||
|
#define SIG_DFL _sig_dfl /* Default action. */
|
||||||
|
#define SIG_IGN _sig_ign /* Ignore signal. */
|
||||||
|
|
||||||
|
|
||||||
|
/* ANSI signals. */
|
||||||
|
#define SIGABRT 1 /* Abnormal termination. */
|
||||||
|
#define SIGFPE 2 /* Erroneous arithmetic operation. */
|
||||||
|
#define SIGILL 3 /* Illegal instruction. */
|
||||||
|
#define SIGINT 3 /* Interactive attention signal. */
|
||||||
|
#define SIGSEGV 4 /* Invalid access to storage. */
|
||||||
|
#define SIGTERM 5 /* Termination request. */
|
||||||
|
|
||||||
|
/* POSIX signals. */
|
||||||
|
#define SIGHUP 6 /* Hangup. */
|
||||||
|
#define SIGQUIT 7 /* Quit. */
|
||||||
|
#define SIGPIPE 8 /* Broken pipe. */
|
||||||
|
#define SIGKILL 9 /* Kill (cannot be blocked, caught, or ignored). */
|
||||||
|
#define SIGALRM 10 /* Alarm clock. */
|
||||||
|
#define SIGSTOP 11 /* Stop (cannot be blocked, caught, or ignored). */
|
||||||
|
#define SIGTSTP 12 /* Keyboard stop. */
|
||||||
|
#define SIGCONT 13 /* Continue. */
|
||||||
|
#define SIGCHLD 14 /* Child terminated or stopped. */
|
||||||
|
#define SIGTTIN 15 /* Background read from control terminal. */
|
||||||
|
#define SIGTTOU 16 /* Background write to control terminal. */
|
||||||
|
|
||||||
|
#endif /* <signal.h> included. */
|
||||||
|
|
||||||
|
#define _NSIG 17
|
|
@ -0,0 +1,74 @@
|
||||||
|
/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Never include this file directly; use <sys/stat.h> instead.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This structure needs to be defined in accordance with the
|
||||||
|
implementation of __stat, __fstat, and __lstat. */
|
||||||
|
|
||||||
|
#ifndef _BITS_STAT_H
|
||||||
|
#define _BITS_STAT_H 1
|
||||||
|
|
||||||
|
#include <bits/types.h>
|
||||||
|
|
||||||
|
/* Structure describing file characteristics. */
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
/* These are the members that POSIX.1 requires. */
|
||||||
|
|
||||||
|
__mode_t st_mode; /* File mode. */
|
||||||
|
__ino_t st_ino; /* File serial number. */
|
||||||
|
__dev_t st_dev; /* Device containing the file. */
|
||||||
|
__nlink_t st_nlink; /* Link count. */
|
||||||
|
|
||||||
|
__uid_t st_uid; /* User ID of the file's owner. */
|
||||||
|
__gid_t st_gid; /* Group ID of the file's group. */
|
||||||
|
__off_t st_size; /* Size of file, in bytes. */
|
||||||
|
|
||||||
|
__time_t st_atime; /* Time of last access. */
|
||||||
|
__time_t st_mtime; /* Time of last modification. */
|
||||||
|
__time_t st_ctime; /* Time of last status change. */
|
||||||
|
|
||||||
|
/* This should be defined if there is a `st_blksize' member. */
|
||||||
|
#undef _STATBUF_ST_BLKSIZE
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Encoding of the file mode. These are the standard Unix values,
|
||||||
|
but POSIX.1 does not specify what values should be used. */
|
||||||
|
|
||||||
|
#define __S_IFMT 0170000 /* These bits determine file type. */
|
||||||
|
|
||||||
|
/* File types. */
|
||||||
|
#define __S_IFDIR 0040000 /* Directory. */
|
||||||
|
#define __S_IFCHR 0020000 /* Character device. */
|
||||||
|
#define __S_IFBLK 0060000 /* Block device. */
|
||||||
|
#define __S_IFREG 0100000 /* Regular file. */
|
||||||
|
#define __S_IFIFO 0010000 /* FIFO. */
|
||||||
|
|
||||||
|
/* Protection bits. */
|
||||||
|
|
||||||
|
#define __S_ISUID 04000 /* Set user ID on execution. */
|
||||||
|
#define __S_ISGID 02000 /* Set group ID on execution. */
|
||||||
|
#define __S_IREAD 0400 /* Read by owner. */
|
||||||
|
#define __S_IWRITE 0200 /* Write by owner. */
|
||||||
|
#define __S_IEXEC 0100 /* Execute by owner. */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* bits/stat.h */
|
|
@ -0,0 +1,12 @@
|
||||||
|
/* This file should provide inline versions of string functions.
|
||||||
|
|
||||||
|
Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'.
|
||||||
|
|
||||||
|
This file should define __STRING_INLINES if functions are actually defined
|
||||||
|
as inlines. */
|
||||||
|
|
||||||
|
#ifndef _BITS_STRING_H
|
||||||
|
#define _BITS_STRING_H 1
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* bits/string.h */
|
|
@ -0,0 +1,44 @@
|
||||||
|
/* System-dependent timing definitions. Stub version.
|
||||||
|
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Never include this file directly; use <time.h> instead.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __need_timeval
|
||||||
|
# undef __need_timeval
|
||||||
|
# ifndef _STRUCT_TIMEVAL
|
||||||
|
# define _STRUCT_TIMEVAL 1
|
||||||
|
/* A time value that is accurate to the nearest
|
||||||
|
microsecond but also has a range of years. */
|
||||||
|
struct timeval
|
||||||
|
{
|
||||||
|
time_t tv_sec; /* Seconds. */
|
||||||
|
time_t tv_usec; /* Microseconds. */
|
||||||
|
};
|
||||||
|
# endif /* struct timeval */
|
||||||
|
#endif /* need timeval */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _BITS_TIME_H
|
||||||
|
#define _BITS_TIME_H 1
|
||||||
|
|
||||||
|
#define CLOCKS_PER_SEC 60
|
||||||
|
|
||||||
|
#endif /* bits/time.h */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue