]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update. cvs/libc-ud-971125
authorUlrich Drepper <drepper@redhat.com>
Wed, 26 Nov 1997 04:23:08 +0000 (04:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 26 Nov 1997 04:23:08 +0000 (04:23 +0000)
1997-11-26 04:28  Ulrich Drepper  <drepper@cygnus.com>

* eld/dl-profile.c (_dl_start_profile): Avoid FP calculation when
computing s_scale.  Patch by a sun <asun@zoology.washington.edu>.

* iconv/gconv_close.c: Correct freeing of descriptor data.
* iconv/gconv_simple.c: Return correct error values for illegal or
incomplete characters.

* Makefile (iconvdata/%): Special goal to simplify iconvdata
development.
* iconvdata/Makefile: New file.
* iconvdata/configure: Likewise.
* iconvdata/extra-module.mk: Likewise.
* iconvdata/gconv-modules: Likewise.
* iconvdata/iso6937.c: Likewise.
* iconvdata/iso8859-1.c: Likewise.
* iconvdata/iso8859-10.c: Likewise.
* iconvdata/iso8859-10.h: Likewise.
* iconvdata/iso8859-2.c: Likewise.
* iconvdata/iso8859-2.h: Likewise.
* iconvdata/iso8859-3.c: Likewise.
* iconvdata/iso8859-3.h: Likewise.
* iconvdata/iso8859-4.c: Likewise.
* iconvdata/iso8859-4.h: Likewise.
* iconvdata/iso8859-5.c: Likewise.
* iconvdata/iso8859-5.h: Likewise.
* iconvdata/iso8859-6.c: Likewise.
* iconvdata/iso8859-6.h: Likewise.
* iconvdata/iso8859-7.c: Likewise.
* iconvdata/iso8859-7.h: Likewise.
* iconvdata/iso8859-8.c: Likewise.
* iconvdata/iso8859-8.h: Likewise.
* iconvdata/iso8859-9.c: Likewise.
* iconvdata/iso8859-9.h: Likewise.
* iconvdata/iso8859-generic.c: Likewise.
* iconvdata/t61.c: Likewise.

* string/Makefile (routines): Add strcasestr.
* string/string.h: Add prototype for strcasestr.
* sysdeps/generic/strcasestr.c: New file.
* wcsmbs/mbrtowc.c: Simplify special case a bit.
* wcsmbs/wcrtomb.c: Likewise.
* wcsmbs/mbsnrtowcs.c: Correctly handle incomplete characters.
* wcsmbs/wcsnrtombs.c: Likewise.
* wcsmbs/mbsrtowcs.c: Make sure SRC argument is correct when
partial character is read.
* wcsmbs/wcsrtombs.c: Likewise.
* wcsmbs/wmemrtombs.c: Likewise.
* wcsmbs/wmemrtowcs.c: Likewise.

* io/ftw.h: Include <sys/stat.h> instead of <bits/stat.h>.
* login/pty.h: Include <sys/ioctl.h> instead og <bits/ioctl-types.h>.
* sysdeps/i386/__longjmp.S: Define _SETJMP_H.
* sysdeps/i386/elf/setjmp.S: Likewise.
* sysdeps/unix/sysv/linux/kernel_termios.h: Do include
<bits/termios.h>.

* sysdeps/posix/mk-stdiolim.c: Output file with comment.
* sysdeps/unix/sysv/linux/stdio_lim.h.in: Add comment.

* sysdeps/unix/sysv/linux/sys/mman.h: Pretty print.
* sysvipc/sys/ipc.h: Likewise.
* sysvipc/sys/msg.h: Likewise.
* sysvipc/sys/sem.h: Likewise.
* sysvipc/sys/shm.h: Likewise.

* sysdeps/alpha/bits/endian.h: Issue error message if the header is
used directly.
* sysdeps/alpha/bits/setjmp.h: Likewise.
* sysdeps/alpha/fpu/bits/fenv.h: Likewise.
* sysdeps/arm/bits/endian.h: Likewise.
* sysdeps/arm/bits/setjmp.h: Likewise.
* sysdeps/generic/bits/byteswap.h: Likewise.
* sysdeps/generic/bits/confname.h: Likewise.
* sysdeps/generic/bits/dirent.h: Likewise.
* sysdeps/generic/bits/dlfcn.h: Likewise.
* sysdeps/generic/bits/endian.h: Likewise.
* sysdeps/generic/bits/fenv.h: Likewise.
* sysdeps/generic/bits/huge_val.h: Likewise.
* sysdeps/generic/bits/in.h: Likewise.
* sysdeps/generic/bits/ioctl-types.h: Likewise.
* sysdeps/generic/bits/ioctls.h: Likewise.
* sysdeps/generic/bits/ipc.h: Likewise.
* sysdeps/generic/bits/msq.h: Likewise.
* sysdeps/generic/bits/poll.h: Likewise.
* sysdeps/generic/bits/resource.h: Likewise.
* sysdeps/generic/bits/sched.h: Likewise.
* sysdeps/generic/bits/sem.h: Likewise.
* sysdeps/generic/bits/setjmp.h: Likewise.
* sysdeps/generic/bits/shm.h: Likewise.
* sysdeps/generic/bits/sigaction.h: Likewise.
* sysdeps/generic/bits/sigcontext.h: Likewise.
* sysdeps/generic/bits/socket.h: Likewise.
* sysdeps/generic/bits/stat.h: Likewise.
* sysdeps/generic/bits/statfs.h: Likewise.
* sysdeps/generic/bits/stdio_lim.h: Likewise.
* sysdeps/generic/bits/termios.h: Likewise.
* sysdeps/generic/bits/time.h: Likewise.
* sysdeps/generic/bits/uio.h: Likewise.
* sysdeps/generic/bits/utmp.h: Likewise.
* sysdeps/generic/bits/utmpx.h: Likewise.
* sysdeps/generic/bits/utsname.h: Likewise.
* sysdeps/generic/bits/waitflags.h: Likewise.
* sysdeps/generic/bits/waitstatus.h: Likewise.
* sysdeps/gnu/bits/utmp.h: Likewise.
* sysdeps/gnu/bits/utmpx.h: Likewise.
* sysdeps/i386/bits/byteswap.h: Likewise.
* sysdeps/i386/bits/endian.h: Likewise.
* sysdeps/i386/bits/huge_val.h: Likewise.
* sysdeps/i386/bits/setjmp.h: Likewise.
* sysdeps/i386/fpu/bits/fenv.h: Likewise.
* sysdeps/ieee754/bits/huge_val.h: Likewise.
* sysdeps/m68k/bits/byteswap.h: Likewise.
* sysdeps/m68k/bits/endian.h: Likewise.
* sysdeps/m68k/bits/setjmp.h: Likewise.
* sysdeps/m68k/fpu/bits/fenv.h: Likewise.
* sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/bits/ioctls.h: Likewise.
* sysdeps/mach/hurd/bits/stat.h: Likewise.
* sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/i386/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise.
* sysdeps/mips/bits/dlfcn.h: Likewise.
* sysdeps/mips/bits/endian.h: Likewise.
* sysdeps/mips/bits/setjmp.h: Likewise.
* sysdeps/mips/dec/bits/endian.h: Likewise.
* sysdeps/mips/mips64/bits/setjmp.h: Likewise.
* sysdeps/mips/mipsel/bits/endian.h: Likewise.
* sysdeps/mips/p40/bits/endian.h: Likewise.
* sysdeps/powerpc/bits/endian.h: Likewise.
* sysdeps/powerpc/bits/fenv.h: Likewise.
* sysdeps/powerpc/bits/setjmp.h: Likewise.
* sysdeps/sparc/sparc32/bits/endian.h: Likewise.
* sysdeps/sparc/sparc32/bits/setjmp.h: Likewise.
* sysdeps/sparc/sparc32/fpu/bits/fenv.h: Likewise.
* sysdeps/sparc/sparc64/bits/endian.h: Likewise.
* sysdeps/sparc/sparc64/fpu/bits/fenv.h: Likewise.
* sysdeps/unix/bsd/bits/dirent.h: Likewise.
* sysdeps/unix/bsd/bits/stat.h: Likewise.
* sysdeps/unix/bsd/bits/waitflags.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Likewise.
* sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise.
* sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
* sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h: Likewise.
* sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/bits/resource.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/bits/termios.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/bits/utsname.h: Likewise.
* sysdeps/unix/bsd/ultrix4/bits/utsname.h: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h: Likewise.
* sysdeps/unix/common/bits/dirent.h: Likewise.
* sysdeps/unix/sysv/bits/dirent.h: Likewise.
* sysdeps/unix/sysv/bits/stat.h: Likewise.
* sysdeps/unix/sysv/bits/utmp.h: Likewise.
* sysdeps/unix/sysv/bits/utsname.h: Likewise.
* sysdeps/unix/sysv/irix4/bits/confname.h: Likewise.
* sysdeps/unix/sysv/irix4/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise.
* sysdeps/unix/sysv/linux/bits/dirent.h: Likewise.
* sysdeps/unix/sysv/linux/bits/in.h: Likewise.
* sysdeps/unix/sysv/linux/bits/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/bits/ioctls.h: Likewise.
* sysdeps/unix/sysv/linux/bits/ipc.h: Likewise.
* sysdeps/unix/sysv/linux/bits/msq.h: Likewise.
* sysdeps/unix/sysv/linux/bits/poll.h: Likewise.
* sysdeps/unix/sysv/linux/bits/resource.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sched.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sem.h: Likewise.
* sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigcontext.h: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/bits/statfs.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/bits/time.h: Likewise.
* sysdeps/unix/sysv/linux/bits/uio.h: Likewise.
* sysdeps/unix/sysv/linux/bits/utsname.h: Likewise.
* sysdeps/unix/sysv/linux/bits/waitflags.h: Likewise.
* sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/endian.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/time.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/ioctls.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Likewise.
* sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/bits/confname.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/utsname.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/waitflags.h: Likewise.
* sysdeps/unix/sysv/sysv4/i386/bits/stat.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h: Likewise.
* sysdeps/vax/bits/huge_val.h: Likewise.
* sysdeps/vax/bits/setjmp.h: Likewise.
* sysdeps/wordsize-32/bits/elfclass.h: Likewise.
* sysdeps/wordsize-64/bits/elfclass.h: Likewise.

1997-11-25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* libio/stdio.h: Correct comment of sys_nerr/sys_errlist

1997-11-25  Paul Eggert  <eggert@shade.twinsun.com>

* strftime.c (strftime):
No longer any need to undef or declare if emacs is defined.
(my_strftime): When checking a -1 returned by mktime, don't blow up
if localtime_r returns NULL.

1997-11-24  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* README.template: Fix spelling.

1997-11-25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* configure.in: Enhance --enable-add-ons description a wee bit.

1997-11-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* glibcbug.in: Add more information of build environment and flags.

1997-11-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/posix/getcwd.c: Recognize EOF from readdir and translate
it into ENOENT.

248 files changed:
ChangeLog
FAQ
Makefile
README.template
bits/byteswap.h
bits/confname.h
bits/dirent.h
bits/dlfcn.h
bits/endian.h
bits/fenv.h
bits/huge_val.h
bits/in.h
bits/ioctl-types.h
bits/ioctls.h
bits/ipc.h
bits/msq.h
bits/poll.h
bits/resource.h
bits/sched.h
bits/sem.h
bits/setjmp.h
bits/shm.h
bits/sigaction.h
bits/sigcontext.h
bits/socket.h
bits/stat.h
bits/statfs.h
bits/termios.h
bits/time.h
bits/uio.h
bits/utmp.h
bits/utsname.h
bits/waitflags.h
bits/waitstatus.h
configure
configure.in
elf/dl-profile.c
glibcbug.in
iconv/gconv_close.c
iconv/gconv_simple.c
iconvdata/Makefile [new file with mode: 0644]
iconvdata/configure [new file with mode: 0755]
iconvdata/extra-module.mk [new file with mode: 0644]
iconvdata/gconv-modules [new file with mode: 0644]
iconvdata/iso6937.c [new file with mode: 0644]
iconvdata/iso8859-1.c [new file with mode: 0644]
iconvdata/iso8859-10.c [new file with mode: 0644]
iconvdata/iso8859-10.h [new file with mode: 0644]
iconvdata/iso8859-2.c [new file with mode: 0644]
iconvdata/iso8859-2.h [new file with mode: 0644]
iconvdata/iso8859-3.c [new file with mode: 0644]
iconvdata/iso8859-3.h [new file with mode: 0644]
iconvdata/iso8859-4.c [new file with mode: 0644]
iconvdata/iso8859-4.h [new file with mode: 0644]
iconvdata/iso8859-5.c [new file with mode: 0644]
iconvdata/iso8859-5.h [new file with mode: 0644]
iconvdata/iso8859-6.c [new file with mode: 0644]
iconvdata/iso8859-6.h [new file with mode: 0644]
iconvdata/iso8859-7.c [new file with mode: 0644]
iconvdata/iso8859-7.h [new file with mode: 0644]
iconvdata/iso8859-8.c [new file with mode: 0644]
iconvdata/iso8859-8.h [new file with mode: 0644]
iconvdata/iso8859-9.c [new file with mode: 0644]
iconvdata/iso8859-9.h [new file with mode: 0644]
iconvdata/iso8859-generic.c [new file with mode: 0644]
iconvdata/t61.c [new file with mode: 0644]
io/ftw.h
login/pty.h
manual/arith.texi
string/Makefile
string/string.h
sysdeps/alpha/bits/endian.h
sysdeps/alpha/bits/setjmp.h
sysdeps/alpha/fpu/bits/fenv.h
sysdeps/arm/bits/endian.h
sysdeps/arm/bits/setjmp.h
sysdeps/generic/bits/byteswap.h
sysdeps/generic/bits/confname.h
sysdeps/generic/bits/dirent.h
sysdeps/generic/bits/dlfcn.h
sysdeps/generic/bits/endian.h
sysdeps/generic/bits/fenv.h
sysdeps/generic/bits/huge_val.h
sysdeps/generic/bits/in.h
sysdeps/generic/bits/ioctl-types.h
sysdeps/generic/bits/ioctls.h
sysdeps/generic/bits/ipc.h
sysdeps/generic/bits/msq.h
sysdeps/generic/bits/poll.h
sysdeps/generic/bits/resource.h
sysdeps/generic/bits/sched.h
sysdeps/generic/bits/sem.h
sysdeps/generic/bits/setjmp.h
sysdeps/generic/bits/shm.h
sysdeps/generic/bits/sigaction.h
sysdeps/generic/bits/sigcontext.h
sysdeps/generic/bits/socket.h
sysdeps/generic/bits/stat.h
sysdeps/generic/bits/statfs.h
sysdeps/generic/bits/stdio_lim.h
sysdeps/generic/bits/termios.h
sysdeps/generic/bits/time.h
sysdeps/generic/bits/uio.h
sysdeps/generic/bits/utmp.h
sysdeps/generic/bits/utmpx.h
sysdeps/generic/bits/utsname.h
sysdeps/generic/bits/waitflags.h
sysdeps/generic/bits/waitstatus.h
sysdeps/generic/strcasestr.c [new file with mode: 0644]
sysdeps/gnu/bits/utmp.h
sysdeps/gnu/bits/utmpx.h
sysdeps/i386/__longjmp.S
sysdeps/i386/bits/byteswap.h
sysdeps/i386/bits/endian.h
sysdeps/i386/bits/huge_val.h
sysdeps/i386/bits/setjmp.h
sysdeps/i386/elf/setjmp.S
sysdeps/i386/fpu/bits/fenv.h
sysdeps/ieee754/bits/huge_val.h
sysdeps/m68k/bits/byteswap.h
sysdeps/m68k/bits/endian.h
sysdeps/m68k/bits/setjmp.h
sysdeps/m68k/fpu/bits/fenv.h
sysdeps/mach/hurd/alpha/bits/sigcontext.h
sysdeps/mach/hurd/bits/ioctls.h
sysdeps/mach/hurd/bits/stat.h
sysdeps/mach/hurd/hppa/bits/sigcontext.h
sysdeps/mach/hurd/i386/bits/sigcontext.h
sysdeps/mach/hurd/mips/bits/sigcontext.h
sysdeps/mips/bits/dlfcn.h
sysdeps/mips/bits/endian.h
sysdeps/mips/bits/setjmp.h
sysdeps/mips/dec/bits/endian.h
sysdeps/mips/mips64/bits/setjmp.h
sysdeps/mips/mipsel/bits/endian.h
sysdeps/mips/p40/bits/endian.h
sysdeps/posix/getcwd.c
sysdeps/posix/mk-stdiolim.c
sysdeps/powerpc/bits/endian.h
sysdeps/powerpc/bits/fenv.h
sysdeps/powerpc/bits/setjmp.h
sysdeps/sparc/sparc32/bits/endian.h
sysdeps/sparc/sparc32/bits/setjmp.h
sysdeps/sparc/sparc32/fpu/bits/fenv.h
sysdeps/sparc/sparc64/bits/endian.h
sysdeps/sparc/sparc64/fpu/bits/fenv.h
sysdeps/unix/bsd/bits/dirent.h
sysdeps/unix/bsd/bits/stat.h
sysdeps/unix/bsd/bits/waitflags.h
sysdeps/unix/bsd/bsd4.4/bits/dirent.h
sysdeps/unix/bsd/osf/alpha/bits/stat.h
sysdeps/unix/bsd/osf/bits/sigaction.h
sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
sysdeps/unix/bsd/sun/sunos4/bits/resource.h
sysdeps/unix/bsd/sun/sunos4/bits/termios.h
sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
sysdeps/unix/bsd/ultrix4/bits/utsname.h
sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
sysdeps/unix/common/bits/dirent.h
sysdeps/unix/sysv/bits/dirent.h
sysdeps/unix/sysv/bits/stat.h
sysdeps/unix/sysv/bits/utmp.h
sysdeps/unix/sysv/bits/utsname.h
sysdeps/unix/sysv/irix4/bits/confname.h
sysdeps/unix/sysv/irix4/bits/stat.h
sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
sysdeps/unix/sysv/linux/alpha/bits/ipc.h
sysdeps/unix/sysv/linux/alpha/bits/mman.h
sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
sysdeps/unix/sysv/linux/alpha/bits/stat.h
sysdeps/unix/sysv/linux/alpha/bits/termios.h
sysdeps/unix/sysv/linux/alpha/bits/time.h
sysdeps/unix/sysv/linux/bits/dirent.h
sysdeps/unix/sysv/linux/bits/in.h
sysdeps/unix/sysv/linux/bits/ioctl-types.h
sysdeps/unix/sysv/linux/bits/ioctls.h
sysdeps/unix/sysv/linux/bits/ipc.h
sysdeps/unix/sysv/linux/bits/msq.h
sysdeps/unix/sysv/linux/bits/poll.h
sysdeps/unix/sysv/linux/bits/resource.h
sysdeps/unix/sysv/linux/bits/sched.h
sysdeps/unix/sysv/linux/bits/sem.h
sysdeps/unix/sysv/linux/bits/shm.h
sysdeps/unix/sysv/linux/bits/sigaction.h
sysdeps/unix/sysv/linux/bits/sigcontext.h
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/bits/stat.h
sysdeps/unix/sysv/linux/bits/statfs.h
sysdeps/unix/sysv/linux/bits/termios.h
sysdeps/unix/sysv/linux/bits/time.h
sysdeps/unix/sysv/linux/bits/uio.h
sysdeps/unix/sysv/linux/bits/utsname.h
sysdeps/unix/sysv/linux/bits/waitflags.h
sysdeps/unix/sysv/linux/i386/bits/mman.h
sysdeps/unix/sysv/linux/kernel_termios.h
sysdeps/unix/sysv/linux/m68k/bits/mman.h
sysdeps/unix/sysv/linux/m68k/bits/poll.h
sysdeps/unix/sysv/linux/mips/bits/endian.h
sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
sysdeps/unix/sysv/linux/mips/bits/ipc.h
sysdeps/unix/sysv/linux/mips/bits/mman.h
sysdeps/unix/sysv/linux/mips/bits/poll.h
sysdeps/unix/sysv/linux/mips/bits/shm.h
sysdeps/unix/sysv/linux/mips/bits/sigaction.h
sysdeps/unix/sysv/linux/mips/bits/socket.h
sysdeps/unix/sysv/linux/mips/bits/stat.h
sysdeps/unix/sysv/linux/mips/bits/statfs.h
sysdeps/unix/sysv/linux/mips/bits/termios.h
sysdeps/unix/sysv/linux/mips/bits/time.h
sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h
sysdeps/unix/sysv/linux/powerpc/bits/mman.h
sysdeps/unix/sysv/linux/powerpc/bits/termios.h
sysdeps/unix/sysv/linux/sparc/bits/ioctls.h
sysdeps/unix/sysv/linux/sparc/bits/poll.h
sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
sysdeps/unix/sysv/linux/sparc/bits/termios.h
sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h
sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h
sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
sysdeps/unix/sysv/linux/stdio_lim.h.in
sysdeps/unix/sysv/linux/sys/mman.h
sysdeps/unix/sysv/minix/bits/sigaction.h
sysdeps/unix/sysv/sco3.2.4/bits/confname.h
sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
sysdeps/unix/sysv/sysv4/bits/sigaction.h
sysdeps/unix/sysv/sysv4/bits/utsname.h
sysdeps/unix/sysv/sysv4/bits/waitflags.h
sysdeps/unix/sysv/sysv4/i386/bits/stat.h
sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
sysdeps/vax/bits/huge_val.h
sysdeps/vax/bits/setjmp.h
sysdeps/wordsize-32/bits/elfclass.h
sysdeps/wordsize-64/bits/elfclass.h
sysvipc/sys/ipc.h
sysvipc/sys/msg.h
sysvipc/sys/sem.h
sysvipc/sys/shm.h
time/strftime.c
wcsmbs/mbrtowc.c
wcsmbs/mbsnrtowcs.c
wcsmbs/mbsrtowcs.c
wcsmbs/wcrtomb.c
wcsmbs/wcsnrtombs.c
wcsmbs/wcsrtombs.c
wcsmbs/wmemrtombs.c
wcsmbs/wmemrtowcs.c

index ad17e4fc230d89969d1160c4bfe68228111d0d84..e512253cb5696c5932cf016b7e6f936c1a1ba546 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,256 @@
+1997-11-26 04:28  Ulrich Drepper  <drepper@cygnus.com>
+
+       * eld/dl-profile.c (_dl_start_profile): Avoid FP calculation when
+       computing s_scale.  Patch by a sun <asun@zoology.washington.edu>.
+
+       * iconv/gconv_close.c: Correct freeing of descriptor data.
+       * iconv/gconv_simple.c: Return correct error values for illegal or
+       incomplete characters.
+
+       * Makefile (iconvdata/%): Special goal to simplify iconvdata
+       development.
+       * iconvdata/Makefile: New file.
+       * iconvdata/configure: Likewise.
+       * iconvdata/extra-module.mk: Likewise.
+       * iconvdata/gconv-modules: Likewise.
+       * iconvdata/iso6937.c: Likewise.
+       * iconvdata/iso8859-1.c: Likewise.
+       * iconvdata/iso8859-10.c: Likewise.
+       * iconvdata/iso8859-10.h: Likewise.
+       * iconvdata/iso8859-2.c: Likewise.
+       * iconvdata/iso8859-2.h: Likewise.
+       * iconvdata/iso8859-3.c: Likewise.
+       * iconvdata/iso8859-3.h: Likewise.
+       * iconvdata/iso8859-4.c: Likewise.
+       * iconvdata/iso8859-4.h: Likewise.
+       * iconvdata/iso8859-5.c: Likewise.
+       * iconvdata/iso8859-5.h: Likewise.
+       * iconvdata/iso8859-6.c: Likewise.
+       * iconvdata/iso8859-6.h: Likewise.
+       * iconvdata/iso8859-7.c: Likewise.
+       * iconvdata/iso8859-7.h: Likewise.
+       * iconvdata/iso8859-8.c: Likewise.
+       * iconvdata/iso8859-8.h: Likewise.
+       * iconvdata/iso8859-9.c: Likewise.
+       * iconvdata/iso8859-9.h: Likewise.
+       * iconvdata/iso8859-generic.c: Likewise.
+       * iconvdata/t61.c: Likewise.
+
+       * string/Makefile (routines): Add strcasestr.
+       * string/string.h: Add prototype for strcasestr.
+       * sysdeps/generic/strcasestr.c: New file.
+       * wcsmbs/mbrtowc.c: Simplify special case a bit.
+       * wcsmbs/wcrtomb.c: Likewise.
+       * wcsmbs/mbsnrtowcs.c: Correctly handle incomplete characters.
+       * wcsmbs/wcsnrtombs.c: Likewise.
+       * wcsmbs/mbsrtowcs.c: Make sure SRC argument is correct when
+       partial character is read.
+       * wcsmbs/wcsrtombs.c: Likewise.
+       * wcsmbs/wmemrtombs.c: Likewise.
+       * wcsmbs/wmemrtowcs.c: Likewise.
+
+       * io/ftw.h: Include <sys/stat.h> instead of <bits/stat.h>.
+       * login/pty.h: Include <sys/ioctl.h> instead og <bits/ioctl-types.h>.
+       * sysdeps/i386/__longjmp.S: Define _SETJMP_H.
+       * sysdeps/i386/elf/setjmp.S: Likewise.
+       * sysdeps/unix/sysv/linux/kernel_termios.h: Do include
+       <bits/termios.h>.
+
+       * sysdeps/posix/mk-stdiolim.c: Output file with comment.
+       * sysdeps/unix/sysv/linux/stdio_lim.h.in: Add comment.
+
+       * sysdeps/unix/sysv/linux/sys/mman.h: Pretty print.
+       * sysvipc/sys/ipc.h: Likewise.
+       * sysvipc/sys/msg.h: Likewise.
+       * sysvipc/sys/sem.h: Likewise.
+       * sysvipc/sys/shm.h: Likewise.
+
+       * sysdeps/alpha/bits/endian.h: Issue error message if the header is
+       used directly.
+       * sysdeps/alpha/bits/setjmp.h: Likewise.
+       * sysdeps/alpha/fpu/bits/fenv.h: Likewise.
+       * sysdeps/arm/bits/endian.h: Likewise.
+       * sysdeps/arm/bits/setjmp.h: Likewise.
+       * sysdeps/generic/bits/byteswap.h: Likewise.
+       * sysdeps/generic/bits/confname.h: Likewise.
+       * sysdeps/generic/bits/dirent.h: Likewise.
+       * sysdeps/generic/bits/dlfcn.h: Likewise.
+       * sysdeps/generic/bits/endian.h: Likewise.
+       * sysdeps/generic/bits/fenv.h: Likewise.
+       * sysdeps/generic/bits/huge_val.h: Likewise.
+       * sysdeps/generic/bits/in.h: Likewise.
+       * sysdeps/generic/bits/ioctl-types.h: Likewise.
+       * sysdeps/generic/bits/ioctls.h: Likewise.
+       * sysdeps/generic/bits/ipc.h: Likewise.
+       * sysdeps/generic/bits/msq.h: Likewise.
+       * sysdeps/generic/bits/poll.h: Likewise.
+       * sysdeps/generic/bits/resource.h: Likewise.
+       * sysdeps/generic/bits/sched.h: Likewise.
+       * sysdeps/generic/bits/sem.h: Likewise.
+       * sysdeps/generic/bits/setjmp.h: Likewise.
+       * sysdeps/generic/bits/shm.h: Likewise.
+       * sysdeps/generic/bits/sigaction.h: Likewise.
+       * sysdeps/generic/bits/sigcontext.h: Likewise.
+       * sysdeps/generic/bits/socket.h: Likewise.
+       * sysdeps/generic/bits/stat.h: Likewise.
+       * sysdeps/generic/bits/statfs.h: Likewise.
+       * sysdeps/generic/bits/stdio_lim.h: Likewise.
+       * sysdeps/generic/bits/termios.h: Likewise.
+       * sysdeps/generic/bits/time.h: Likewise.
+       * sysdeps/generic/bits/uio.h: Likewise.
+       * sysdeps/generic/bits/utmp.h: Likewise.
+       * sysdeps/generic/bits/utmpx.h: Likewise.
+       * sysdeps/generic/bits/utsname.h: Likewise.
+       * sysdeps/generic/bits/waitflags.h: Likewise.
+       * sysdeps/generic/bits/waitstatus.h: Likewise.
+       * sysdeps/gnu/bits/utmp.h: Likewise.
+       * sysdeps/gnu/bits/utmpx.h: Likewise.
+       * sysdeps/i386/bits/byteswap.h: Likewise.
+       * sysdeps/i386/bits/endian.h: Likewise.
+       * sysdeps/i386/bits/huge_val.h: Likewise.
+       * sysdeps/i386/bits/setjmp.h: Likewise.
+       * sysdeps/i386/fpu/bits/fenv.h: Likewise.
+       * sysdeps/ieee754/bits/huge_val.h: Likewise.
+       * sysdeps/m68k/bits/byteswap.h: Likewise.
+       * sysdeps/m68k/bits/endian.h: Likewise.
+       * sysdeps/m68k/bits/setjmp.h: Likewise.
+       * sysdeps/m68k/fpu/bits/fenv.h: Likewise.
+       * sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise.
+       * sysdeps/mach/hurd/bits/ioctls.h: Likewise.
+       * sysdeps/mach/hurd/bits/stat.h: Likewise.
+       * sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise.
+       * sysdeps/mach/hurd/i386/bits/sigcontext.h: Likewise.
+       * sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise.
+       * sysdeps/mips/bits/dlfcn.h: Likewise.
+       * sysdeps/mips/bits/endian.h: Likewise.
+       * sysdeps/mips/bits/setjmp.h: Likewise.
+       * sysdeps/mips/dec/bits/endian.h: Likewise.
+       * sysdeps/mips/mips64/bits/setjmp.h: Likewise.
+       * sysdeps/mips/mipsel/bits/endian.h: Likewise.
+       * sysdeps/mips/p40/bits/endian.h: Likewise.
+       * sysdeps/powerpc/bits/endian.h: Likewise.
+       * sysdeps/powerpc/bits/fenv.h: Likewise.
+       * sysdeps/powerpc/bits/setjmp.h: Likewise.
+       * sysdeps/sparc/sparc32/bits/endian.h: Likewise.
+       * sysdeps/sparc/sparc32/bits/setjmp.h: Likewise.
+       * sysdeps/sparc/sparc32/fpu/bits/fenv.h: Likewise.
+       * sysdeps/sparc/sparc64/bits/endian.h: Likewise.
+       * sysdeps/sparc/sparc64/fpu/bits/fenv.h: Likewise.
+       * sysdeps/unix/bsd/bits/dirent.h: Likewise.
+       * sysdeps/unix/bsd/bits/stat.h: Likewise.
+       * sysdeps/unix/bsd/bits/waitflags.h: Likewise.
+       * sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Likewise.
+       * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise.
+       * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
+       * sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h: Likewise.
+       * sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h: Likewise.
+       * sysdeps/unix/bsd/sun/sunos4/bits/resource.h: Likewise.
+       * sysdeps/unix/bsd/sun/sunos4/bits/termios.h: Likewise.
+       * sysdeps/unix/bsd/sun/sunos4/bits/utsname.h: Likewise.
+       * sysdeps/unix/bsd/ultrix4/bits/utsname.h: Likewise.
+       * sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h: Likewise.
+       * sysdeps/unix/common/bits/dirent.h: Likewise.
+       * sysdeps/unix/sysv/bits/dirent.h: Likewise.
+       * sysdeps/unix/sysv/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/bits/utmp.h: Likewise.
+       * sysdeps/unix/sysv/bits/utsname.h: Likewise.
+       * sysdeps/unix/sysv/irix4/bits/confname.h: Likewise.
+       * sysdeps/unix/sysv/irix4/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/dirent.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/in.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/ioctl-types.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/ioctls.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/ipc.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/msq.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/poll.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/resource.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/sched.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/sem.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/sigcontext.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/statfs.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/termios.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/time.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/uio.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/utsname.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/waitflags.h: Likewise.
+       * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/endian.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+       * sysdeps/unix/sysv/linux/mips/bits/time.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/bits/ioctls.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc32/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/bits/mman.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Likewise.
+       * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/sco3.2.4/bits/confname.h: Likewise.
+       * sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/bits/utsname.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/bits/waitflags.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/i386/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h: Likewise.
+       * sysdeps/vax/bits/huge_val.h: Likewise.
+       * sysdeps/vax/bits/setjmp.h: Likewise.
+       * sysdeps/wordsize-32/bits/elfclass.h: Likewise.
+       * sysdeps/wordsize-64/bits/elfclass.h: Likewise.
+
+1997-11-25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * libio/stdio.h: Correct comment of sys_nerr/sys_errlist
+
+1997-11-25  Paul Eggert  <eggert@shade.twinsun.com>
+
+       * strftime.c (strftime):
+       No longer any need to undef or declare if emacs is defined.
+       (my_strftime): When checking a -1 returned by mktime, don't blow up
+       if localtime_r returns NULL.
+
+1997-11-24  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * README.template: Fix spelling.
+
+1997-11-25  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * configure.in: Enhance --enable-add-ons description a wee bit.
+
+1997-11-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * glibcbug.in: Add more information of build environment and flags.
+
+1997-11-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * sysdeps/posix/getcwd.c: Recognize EOF from readdir and translate
+       it into ENOENT.
+
 1997-11-24 03:01  Ulrich Drepper  <drepper@cygnus.com>
 
        * elf/dl-support.c: Call __libc_init_secure to make sure
diff --git a/FAQ b/FAQ
index 653bbbfa7f48dc2c584891ac870f5aca5bec3db6..c2e23ad9e3ac37794e56fb7361cee271cc6e389c 100644 (file)
--- a/FAQ
+++ b/FAQ
@@ -109,6 +109,10 @@ please let me know.
          I get
            XXX: Symbol `_sys_errlist' has different size in shared object, consider re-linking
          Why?  What to do?''
+
+[Q31]  ``What's the problem with configure --enable-omitfp?''
+
+[Q32]  ``Why don't signals interrupt system calls anymore?''
 \f
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
 [Q1]   ``What systems does the GNU C Library run on?''
@@ -351,9 +355,8 @@ incompatibilities:
 * the `signal' function's behaviour corresponds to the BSD semantic and
   not the SysV semantic as it was in libc-5.  The interface on all GNU
   systems shall be the same and BSD is the semantic of choice.  To use
-  the SysV behaviour simply use `sysv_signal'.  The major difference is
-  that the SysV implementation sets the SA_ONESHOT flag and so the handler
-  gets removed after the first call.
+  the SysV behaviour simply use `sysv_signal', or define _XOPEN_SOURCE.
+  See question 32 for details.
 
 
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@@ -533,13 +536,15 @@ In this file you have to change a few things:
 
 - remove all expression `%{...:-lgmon}';  there is no libgmon in glibc
 
+- fix a minor bug by changing %{pipe:-} to %|
+
 
 Things are getting a bit more complicated if you have GNU libc
 installed in some other place than /usr, i.e., if you do not want to
 use it instead of the old libc.  In this case the needed startup files
 and libraries are not found in the regular places.  So the specs file
-must tell the compiler and linker exactly what to use.  Here is for
-example the gcc-2.7.2 specs file when GNU libc is installed at
+must tell the compiler and linker exactly what to use.  Here is what
+the gcc-2.7.2 specs file should look like when GNU libc is installed at
 /usr:
 
 -----------------------------------------------------------------------
@@ -547,7 +552,7 @@ example the gcc-2.7.2 specs file when GNU libc is installed at
 %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}
 
 *asm_final:
-%{pipe:-}
+%|
 
 *cpp:
 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
@@ -804,6 +809,66 @@ be possible that such a symbol size change slipped in though it must not
 happen.  So in case of doubt report such a warning message as a problem.
 
 
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
+[Q31]  ``What's the problem with configure --enable-omitfp?''
+
+{AJ} When configuring with --enable-omitfp the libraries are build
+without frame pointers. Some compilers produce in this situation buggy
+code and therefore we don't advise using it at the moment.
+
+If you use --enable-omitfp, you're on your own. If you encounter
+problems with a library that was build this way, I'll advise you to
+rebuild the library without --enable-omitfp.  If the problem vanishes
+consider tracking the problem down and report it as compiler failure.
+
+Since a library build with --enable-omitfp is undebuggable, a
+debuggable library is also build - you can recognize it by the suffix
+"_g" to the library names.
+
+The compilation of this extra libraries and the compiler optimizations
+slow down the build process and need more disk space.
+
+
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
+[Q32]  ``Why don't signals interrupt system calls anymore?''
+
+[A32] {ZW} By default GNU libc uses the BSD semantics for signal(),
+unlike Linux libc 5 which used System V semantics.  This is partially
+for compatibility with other systems and partially because the BSD
+semantics tend to make programming with signals easier.
+
+There are three differences:
+
+* BSD-style signals that occur in the middle of a system call do not
+  affect the system call; System V signals cause the system call to
+  fail and set errno to EINTR.
+
+* BSD signal handlers remain installed once triggered.  System V signal
+  handlers work only once, so one must reinstall them each time.
+
+* A BSD signal is blocked during the execution of its handler.  In other
+  words, a handler for SIGCHLD (for example) does not need to worry about
+  being interrupted by another SIGCHLD.  It may, however, be interrrupted
+  by other signals.
+
+There is general consensus that for `casual' programming with signals, the
+BSD semantics are preferable.  You don't need to worry about system calls
+returning EINTR, and you don't need to worry about the race conditions
+associated with one-shot signal handlers.
+
+If you are porting an old program that relies on the old semantics, you can
+quickly fix the problem by changing signal() to sysv_signal() throughout.
+Alternatively, define _XOPEN_SOURCE before including <signal.h>.
+
+For new programs, the sigaction() function allows you to specify precisely
+how you want your signals to behave.  All three differences listed above are
+individually switchable on a per-signal basis with this function.
+
+If all you want is for one specific signal to cause system calls to fail
+and return EINTR (for example, to implement a timeout) you can do this with
+siginterrupt().
+
+
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
 \f
 Answers were given by:
@@ -815,6 +880,7 @@ Answers were given by:
 {EY} Eric Youngdale, <eric@andante.jic.com>
 {PB} Phil Blundell, <Philip.Blundell@pobox.com>
 {MK} Mark Kettenis, <kettenis@phys.uva.nl>
+{ZW} Zack Weinberg, <zack@rabi.phys.columbia.edu>
 \f
 Local Variables:
  mode:text
index b9beed930312b2ba0fef46fc0383aec180dfa8f4..50e29d1d66c61778faf3681c472ea35087e3fc82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -334,6 +334,9 @@ FORCE:
 rpm/%: subdir_distinfo
        $(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F)
 
+iconvdata/%:
+       $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+
 # This is a special goal for people making binary distributions.  Normally
 # everybody uses the DES based crypt library but for the distribution we
 # need the only-MD5 based one as well.
index 56873846cdad7dc8bf2ddbd9fecc382217f7c447..600a3e6d54a59452b0266065cc495f66209df3ca 100644 (file)
@@ -80,7 +80,7 @@ in the GNU C library, explaining how you can tell the library what
 facilities you want it to make available.
 
 We prefer to get bug reports sent using the `glibcbug' shell script which
-is install together with the rest of the GNU libc to <bugs@gnu.org>.
+is installed together with the rest of the GNU libc to <bugs@gnu.org>.
 Simply run this shell script and fill in the information.  Nevertheless
 you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
 electronic mails.
index 9404cc452e334821e647bf258bc846fbe80cabdf..04a5efe9f096f0bb152bb479263e5da0d10d643c 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H       1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
 
 /* Swap bytes in 16 bit value.  */
 #define __bswap_16(x) \
@@ -39,5 +40,3 @@
        __r.__l[1] = __bswap_32 (__v.__l[0]);                                 \
        __r.__ll; })
 #endif
-
-#endif /* bits/byteswap.h */
index 40228e11eded19488bef691dfa14a4efe9d3a59c..46538874687a126c740b63c182d6cfc5fad811de 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
 /* Values for the NAME argument to `pathconf' and `fpathconf'.  */
 enum
   {
index 2f7dca78aa8a4671b0d2cdc8998f4698654097fc..366cdf8ce2295f94bd46e6516e2f93849d304ebb 100644 (file)
@@ -1,5 +1,5 @@
 /* Directory entry structure `struct dirent'.  Stub version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     char d_name[1];            /* Variable length.  */
index 79604fe8ff733a9423fcb776a3f278602e98a3ee..7c33694018b8cf66939b517623f6ab95bb23b64e 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef        _BITS_DLFCN_H
-#define        _BITS_DLFCN_H 1
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
 
 /* The MODE argument to `dlopen' contains one of the following: */
 #define RTLD_LAZY      0x001   /* Lazy function call binding.  */
@@ -29,5 +30,3 @@
    the symbols of the loaded object and its dependencies are made
    visible as if the object were linked directly into the program.  */
 #define RTLD_GLOBAL    0x100
-
-#endif /* bits/dlfcn.h */
index 597f079a0f05a4375ea4bd90d0a66ef2e6b881ec..45afd4ae47708c0c1953a06ed95aa6f3a8da302f 100644 (file)
@@ -6,4 +6,8 @@
    So if cross-compiling to a machine with a different byte order,
    the bits/endian.h file for that machine must exist.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #error Machine byte order unknown.
index f45deb07c10721a37e486dc577960e708a1385bb..c42540fa6177acc0a134dbbfb0be938b34fb1d8e 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
index 8f137d17347e13e1bfca58965b4ae22a6195fd89..0c30c86f334fda367fbf04e13d50475e19038a91 100644 (file)
@@ -1,6 +1,6 @@
 /* Stub `HUGE_VAL' constant.
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1992, 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
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
 #endif
 
 
index 7241bd24c3785a73821eee1b953709c0a5ec6ce7..83d7ae6b10bd0127a903981e3980b3f5b65c8cdd 100644 (file)
--- a/bits/in.h
+++ b/bits/in.h
@@ -18,8 +18,9 @@
 
 /* Generic version.  */
 
-#ifndef _NETINET_INBITS_H
-#define _NETINET_INBITS_H 1
+#ifndef _NETINET_IN_H
+# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
+#endif
 
 /* Link numbers.  */
 #define        IMPLINK_IP              155
@@ -55,10 +56,10 @@ struct ip_opts
 
 /* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
 struct ip_mreq
-{
-  struct in_addr imr_multiaddr;        /* IP multicast address of group */
-  struct in_addr imr_interface;        /* local IP address of interface */
-};
+  {
+    struct in_addr imr_multiaddr;      /* IP multicast address of group */
+    struct in_addr imr_interface;      /* local IP address of interface */
+  };
 
 /* IPV6 socket options.  */
 #define IPV6_ADDRFORM          1
@@ -80,5 +81,3 @@ struct ip_mreq
 #define IPV6_MULTICAST_LOOP    19
 #define IPV6_ADD_MEMBERSHIP    20
 #define IPV6_DROP_MEMBERSHIP   21
-
-#endif /* netinet/inbits.h */
index 1d5c8a002f29db8fb007baa3de7171079cb5fefa..26283a0f101605d38b6645335b7bcedcbb9c26e6 100644 (file)
@@ -1,5 +1,5 @@
 /* Structure types for pre-termios terminal ioctls.  Generic Unix version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
-
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
 
-#if    defined(TIOCGETC) || defined(TIOCSETC)
+#if defined TIOCGETC || defined TIOCSETC
 /* Type of ARG for TIOCGETC and TIOCSETC requests.  */
 struct tchars
 {
@@ -41,7 +37,7 @@ struct tchars
   _IOT (_IOTS (char), 6, 0, 0, 0, 0)
 #endif
 
-#if    defined(TIOCGLTC) || defined(TIOCSLTC)
+#if defined TIOCGLTC || defined TIOCSLTC
 /* Type of ARG for TIOCGLTC and TIOCSLTC requests.  */
 struct ltchars
 {
@@ -70,7 +66,7 @@ struct sgttyb
 #define        _IOT_sgttyb     /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
 
-#if    defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
+#if defined TIOCGWINSZ || defined TIOCSWINSZ
 /* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests.  */
 struct winsize
 {
@@ -86,13 +82,13 @@ struct winsize
   _IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
 #endif
 
-#if    defined (TIOCGSIZE) || defined (TIOCSSIZE)
+#if defined TIOCGSIZE || defined TIOCSSIZE
 /* The BSD-style ioctl constructor macros use `sizeof', which can't be used
    in a preprocessor conditional.  Since the commands are always unique
    regardless of the size bits, we can safely define away `sizeof' for the
    purpose of the conditional.  */
 #  define sizeof(type) 0
-#  if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
+#  if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
 /* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
    compatibility with Sun; they define `struct ttysize' to have identical
    layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
@@ -116,6 +112,3 @@ struct ttysize
 #  endif
 #  undef sizeof                        /* See above.  */
 #endif
-
-
-#endif /* bits/ioctl-types.h */
index 3b6178bfae0ffcdfd637c2901a68f2cb0978816a..d3ecad9515ad1ac9cd2fab7a94019c7174dc5475 100644 (file)
@@ -1 +1,5 @@
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
+
 /* This space intentionally left blank.  */
index a5ecbd90b7a793a78f948e0a18fc55452946ebc2..58f419be1df3972585b6711d8e8de4abe03be38d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* 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.
 
    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>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
 
 #include <sys/types.h>
 
 #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 */
+  {
+    __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 */
+  };
index 37daa9bf8c51855851b9357807cddbb2721d85f1..a263869a0e1a44662ee9644f4660ed03718dc65b 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
 #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.  */
@@ -43,5 +39,3 @@ struct msqid_ds
   __pid_t msg_lspid;           /* pid of last msgsnd() */
   __pid_t msg_lrpid;           /* pid of last msgrcv() */
 };
-
-__END_DECLS
index 55ec70e3639d8d0dea2a942a8374573e416d92a0..68f611a428e80fc087209bbba20ffa6e8ce2824b 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 46cf9a7af59e6973fcf7d140cf28b3a072dd0683..d0ebeb56c8346a9bcb0ee6b516026a776ab1a58b 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
 /* These are the values for 4.4 BSD and GNU.  Earlier BSD systems have a
    subset of these kinds of resource limit.  In systems where `getrlimit'
    and `setrlimit' are not system calls, these are the values used by the C
@@ -107,7 +111,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
   };
 
-#include <sys/time.h>           /* For `struct timeval'.  */
+#define __need_timeval
+#include <bits/time.h>           /* For `struct timeval'.  */
 
 /* Structure which says how much of each resource has been used.  */
 struct rusage
index bb5da5676f72f5214826de80d2fc212d93c24b73..0c246c8f9a03c72de7a223a6af4680f7282cbf77 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of constants and data structure for POSIX 1003.1b-1993
    scheduling interface.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
@@ -19,7 +19,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #ifndef _SCHED_H
-#error "Never use <bits/sched.h> directly; include <sched.h> instead."
+# error "Never include <bits/sched.h> directly; use <sched.h> instead."
 #endif
 
 
index 1d3e41bd56a010eee059359a0dfaa8a1e4761ab0..8b9f97c62a3eb78b56a8af5f5d9de608c0d4100c 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SEM_H
-#error "Never use <bits/sem.h> directly; include <sys/sem.h> instead."
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
 #endif
 
-
-#include <features.h>
 #include <sys/types.h>
 
 /* Flags for `semop'.  */
@@ -38,8 +35,6 @@
 #define SETALL         17              /* set all semval's */
 
 
-__BEGIN_DECLS
-
 /* Data structure describing a set of semaphores.  */
 struct semid_ds
 {
@@ -57,5 +52,3 @@ union semun
   unsigned short int *array;           /* array for GETALL & SETALL */
   struct seminfo *__buf;               /* buffer for IPC_INFO */
  };
-
-__END_DECLS
index 6620e5ab15257b2c77222399dc9c3534c439e674..9150d8d7647c755333acea7da58ddf00db4a9ab5 100644 (file)
@@ -1,3 +1,7 @@
 /* Define the machine-dependent type `jmp_buf'.  Stub version.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef int __jmp_buf[1];
index b41d0c1e86bc3d01a6a1725269070d66f34d9440..8c97999626616168920994eb4b568b0d0ee9b051 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SHM_H
-#error "Never use <bits/shm.h> directly; include <sys/shm.h> instead."
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
 #endif
 
-
-#include <features.h>
 #include <sys/types.h>
 
 /* Flags for `shmat'.  */
 #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
+  {
+    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 */
+  };
index e89479bd1c28fb9fb170d1f9005ac9949cd5b570..4499517b1a68daea5cafa9781ee2dce49a137ab4 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* These definitions match those used by the 4.4 BSD kernel.
    If the operating system has a `sigaction' system call that correctly
    implements the POSIX.1 behavior, there should be a system-dependent
index 46e4df8c64956b916a8424cff6b37f7558e42703..576fd30c3745e1bce3239f73051143fc6e187b78 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* State of this thread when the signal was taken.  */
 struct sigcontext
   {
index af42dfac78f131348bc525188b05b3005a2c3cd0..a2858b8de84300c652865becbd36e96bb2a2c53e 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SOCKET_H
-#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif
 
-
-#include <features.h>
-
 #define        __need_size_t
 #include <stddef.h>
 
-__BEGIN_DECLS
-
 /* Type for length arguments in socket calls.  */
 typedef unsigned int socklen_t;
 
@@ -201,5 +196,3 @@ struct linger
     int l_onoff;               /* Nonzero to linger on close.  */
     int l_linger;              /* Time to linger.  */
   };
-
-__END_DECLS
index 3648fed7383b58a4ad8f4e2d4ecd7c1544837b37..a0edf2be52ffbfbc8c5c7f3bcf4d2d3dae5fec4d 100644 (file)
    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.
- */
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 /* 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.  */
@@ -73,20 +70,17 @@ struct stat
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-    __dev_t st_dev;                    /* Device.  */
-
-    __ino64_t st_ino;                  /* File serial number.  */
-    __mode_t st_mode;                  /* File mode.  */
-    __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.*/
-    __off64_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.  */
-  };
-#endif
+    __dev_t st_dev;            /* Device.  */
 
+    __ino64_t st_ino;          /* File serial number.  */
+    __mode_t st_mode;          /* File mode.  */
+    __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.*/
+    __off64_t st_size;         /* Size of file, in bytes.  */
 
-#endif /* bits/stat.h */
+    __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.  */
+  };
+#endif
index 9fa3388801816f8539975fce023e174ff674afb6..a92cf523157e46120668583e89169bbdca9701bd 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
-
-#ifndef        _BITS_STATFS_H
-#define        _BITS_STATFS_H  1
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -47,6 +44,3 @@ struct statfs
     unsigned int f_namelen;
     unsigned int f_spare[6];
   };
-
-
-#endif /* bits/statfs.h */
index 9a6aed2bba523bb1d7db05490a9a80686617dbcf..da059cbf0652cdcfd8967f1e28a08357060bd96b 100644 (file)
@@ -1,5 +1,5 @@
 /* termios type and macro definitions.  4.4 BSD/generic GNU version.
-   Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
+
 /* These macros are also defined in some <bits/ioctls.h> files (with
    numerically identical values), but this serves to shut up cpp's
    complaining. */
 #ifdef __USE_BSD
 
-#ifdef MDMBUF
-#undef MDMBUF
-#endif
-#ifdef FLUSHO
-#undef FLUSHO
-#endif
-#ifdef PENDIN
-#undef PENDIN
-#endif
+# ifdef MDMBUF
+#  undef MDMBUF
+# endif
+# ifdef FLUSHO
+#  undef FLUSHO
+# endif
+# ifdef PENDIN
+#  undef PENDIN
+# endif
 
 #endif /* __USE_BSD */
 
 #ifdef ECHO
-#undef ECHO
+# undef ECHO
 #endif
 #ifdef TOSTOP
-#undef TOSTOP
+# undef TOSTOP
 #endif
 #ifdef NOFLSH
-#undef NOFLSH
+# undef NOFLSH
 #endif
 
 
@@ -85,15 +89,15 @@ struct termios
   tcflag_t c_oflag;
 #define        OPOST   (1 << 0)        /* Perform output processing.  */
 #ifdef __USE_BSD
-#define        ONLCR   (1 << 1)        /* Map NL to CR-NL on output.  */
-#define        OXTABS  (1 << 2)        /* Expand tabs to spaces.  */
-#define        ONOEOT  (1 << 8)        /* Discard EOT (^D) on output.  */
+# define ONLCR (1 << 1)        /* Map NL to CR-NL on output.  */
+# define OXTABS        (1 << 2)        /* Expand tabs to spaces.  */
+# define ONOEOT        (1 << 8)        /* Discard EOT (^D) on output.  */
 #endif
 
   /* Control modes.  */
   tcflag_t c_cflag;
 #ifdef __USE_BSD
-#define        CIGNORE (1 << 0)        /* Ignore these control flags.  */
+# define CIGNORE       (1 << 0)        /* Ignore these control flags.  */
 #endif
 #define        CSIZE   (CS5|CS6|CS7|CS8)       /* Number of bits per byte (mask).  */
 #define        CS5     0               /* 5 bits per byte.  */
@@ -107,15 +111,15 @@ struct termios
 #define        HUPCL   (1 << 14)       /* Hang up on last close.  */
 #define        CLOCAL  (1 << 15)       /* Ignore modem status lines.  */
 #ifdef __USE_BSD
-#define        CCTS_OFLOW      (1 << 16)       /* CTS flow control of output.  */
-#define        CRTS_IFLOW      (1 << 17)       /* RTS flow control of input.  */
-#define        MDMBUF          (1 << 20)       /* Carrier flow control of output.  */
+# define CCTS_OFLOW    (1 << 16)       /* CTS flow control of output.  */
+# define CRTS_IFLOW    (1 << 17)       /* RTS flow control of input.  */
+# define MDMBUF                (1 << 20)       /* Carrier flow control of output.  */
 #endif
 
   /* Local modes.  */
   tcflag_t c_lflag;
 #ifdef __USE_BSD
-#define        ECHOKE  (1 << 0)        /* Visual erase for KILL.  */
+# define ECHOKE        (1 << 0)        /* Visual erase for KILL.  */
 #endif
 #define        _ECHOE  (1 << 1)        /* Visual erase for ERASE.  */
 #define        ECHOE   _ECHOE
@@ -126,15 +130,15 @@ struct termios
 #define        _ECHONL (1 << 4)        /* Echo NL even if ECHO is off.  */
 #define        ECHONL  _ECHONL
 #ifdef __USE_BSD
-#define        ECHOPRT (1 << 5)        /* Hardcopy visual erase.  */
-#define        ECHOCTL (1 << 6)        /* Echo control characters as ^X.  */
+# define ECHOPRT       (1 << 5)        /* Hardcopy visual erase.  */
+# define ECHOCTL       (1 << 6)        /* Echo control characters as ^X.  */
 #endif
 #define        _ISIG   (1 << 7)        /* Enable signals.  */
 #define        ISIG    _ISIG
 #define        _ICANON (1 << 8)        /* Do erase and kill processing.  */
 #define        ICANON  _ICANON
 #ifdef __USE_BSD
-#define        ALTWERASE (1 << 9)      /* Alternate WERASE algorithm.  */
+# define ALTWERASE (1 << 9)    /* Alternate WERASE algorithm.  */
 #endif
 #define        _IEXTEN (1 << 10)       /* Enable DISCARD and LNEXT.  */
 #define        IEXTEN  _IEXTEN
@@ -142,9 +146,9 @@ struct termios
 #define        _TOSTOP (1 << 22)       /* Send SIGTTOU for background output.  */
 #define        TOSTOP  _TOSTOP
 #ifdef __USE_BSD
-#define        FLUSHO  (1 << 23)       /* Output being flushed (state).  */
-#define        NOKERNINFO (1 << 25)    /* Disable VSTATUS.  */
-#define        PENDIN  (1 << 29)       /* Retype pending input (state).  */
+# define FLUSHO        (1 << 23)       /* Output being flushed (state).  */
+# define NOKERNINFO (1 << 25)  /* Disable VSTATUS.  */
+# define PENDIN        (1 << 29)       /* Retype pending input (state).  */
 #endif
 #define        _NOFLSH (1 << 31)       /* Disable flush after interrupt.  */
 #define        NOFLSH  _NOFLSH
@@ -153,32 +157,32 @@ struct termios
 #define        VEOF    0               /* End-of-file character [ICANON].  */
 #define        VEOL    1               /* End-of-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VEOL2   2               /* Second EOL character [ICANON].  */
+# define VEOL2 2               /* Second EOL character [ICANON].  */
 #endif
 #define        VERASE  3               /* Erase character [ICANON].  */
 #ifdef __USE_BSD
-#define        VWERASE 4               /* Word-erase character [ICANON].  */
+# define VWERASE       4               /* Word-erase character [ICANON].  */
 #endif
 #define        VKILL   5               /* Kill-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VREPRINT 6              /* Reprint-line character [ICANON].  */
+# define VREPRINT 6            /* Reprint-line character [ICANON].  */
 #endif
 #define        VINTR   8               /* Interrupt character [ISIG].  */
 #define        VQUIT   9               /* Quit character [ISIG].  */
 #define        VSUSP   10              /* Suspend character [ISIG].  */
 #ifdef __USE_BSD
-#define        VDSUSP  11              /* Delayed suspend character [ISIG].  */
+# define VDSUSP        11              /* Delayed suspend character [ISIG].  */
 #endif
 #define        VSTART  12              /* Start (X-ON) character [IXON, IXOFF].  */
 #define        VSTOP   13              /* Stop (X-OFF) character [IXON, IXOFF].  */
 #ifdef __USE_BSD
-#define        VLNEXT  14              /* Literal-next character [IEXTEN].  */
-#define        VDISCARD 15             /* Discard character [IEXTEN].  */
+# define VLNEXT        14              /* Literal-next character [IEXTEN].  */
+# define VDISCARD 15           /* Discard character [IEXTEN].  */
 #endif
 #define        VMIN    16              /* Minimum number of bytes read at once [!ICANON].  */
 #define        VTIME   17              /* Time-out value (tenths of a second) [!ICANON].  */
 #ifdef __USE_BSD
-#define        VSTATUS 18              /* Status character [ICANON].  */
+# define VSTATUS       18              /* Status character [ICANON].  */
 #endif
 #define        NCCS    20              /* Value duplicated in <hurd/tioctl.defs>.  */
   cc_t c_cc[NCCS];
@@ -202,8 +206,8 @@ struct termios
 #define        B19200  19200           /* 19200 baud.  */
 #define        B38400  38400           /* 38400 baud.  */
 #ifdef __USE_BSD
-#define        EXTA    19200
-#define        EXTB    38400
+# define EXTA  19200
+# define EXTB  38400
 #endif
 };
 
@@ -215,7 +219,7 @@ struct termios
 #define        TCSADRAIN       1       /* Change when pending output is written.  */
 #define        TCSAFLUSH       2       /* Flush pending input before changing.  */
 #ifdef __USE_BSD
-#define        TCSASOFT        0x10    /* Flag: Don't alter hardware state.  */
+# define TCSASOFT      0x10    /* Flag: Don't alter hardware state.  */
 #endif
 
 /* Values for the QUEUE_SELECTOR argument to `tcflush'.  */
index e41a991b449d4a15fd23a1e90590dda0cee4afe3..cdbd39f91d97fa30f0fe1d4fba6302e05a62420f 100644 (file)
  * Never include this file directly; use <time.h> instead.
  */
 
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+#  define _BITS_TIME_H 1
+
+#  define CLOCKS_PER_SEC 60
+
+# endif        /* bits/time.h */
+#endif
+
+
 #ifdef __need_timeval
 # undef __need_timeval
 # ifndef _STRUCT_TIMEVAL
@@ -34,11 +44,3 @@ struct timeval
   };
 # endif        /* struct timeval */
 #endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define        _BITS_TIME_H    1
-
-#define CLOCKS_PER_SEC 60
-
-#endif /* bits/time.h */
index 1a12697008a344d7a797e10aa70de031a160378f..56533c1c587d180b83694bf7775d081c9997b467 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_UIO_H
-#error "Never use <bits/uio.h> directly; include <sys/uio.h> instead."
+# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
 #endif
 
 
index ccc318bfa1058173fdd8491747a08be3bc096b04..62817d36d17ae7e5401d3aaf5da406efaa7ff73e 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMP_H
-# error "Never use <bits/utmp.h> directly; include <utmp.h> instead."
+# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
 #endif
 
-
-#include <features.h>
-
 #include <paths.h>
 #include <time.h>
 
@@ -31,7 +28,6 @@
 #define        UT_LINESIZE     8
 #define        UT_HOSTSIZE     16
 
-__BEGIN_DECLS
 
 struct lastlog
   {
@@ -51,5 +47,3 @@ struct utmp
 
 
 #define _HAVE_UT_HOST 1                /* We have the ut_host field.  */
-
-__END_DECLS
index 5594bcc4dacc4c1cb8effe978781bdf27d1632b8..ea3f163cefbc2fc4ece681a6ced5c6b4a81c9a47 100644 (file)
@@ -1,3 +1,25 @@
+/* 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 /* The size of the character arrays used to hold the information
    in a `struct utsname'.  Enlarge this as necessary.  */
 #define        _UTSNAME_LENGTH 1024
index 127eb6ce4cb8a66df6af80ccc18d659fa97be8fe..596df932b7d6f03980f6adbc52415acd65084c4c 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
 #endif
 
 
index 8e97f2702c8182ffdee5a1958d88616211882705..1ec55107f98b9861798df05b3414eb9ed511aa9e 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitstatus.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
 #endif
 
 
 
 /* Nonzero if STATUS indicates termination by a signal.  */
 #ifdef __GNUC__
-#define        __WIFSIGNALED(status)                                                 \
+# define __WIFSIGNALED(status) \
   (__extension__ ({ int __status = (status);                                 \
                    !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
 #else  /* Not GCC.  */
-#define        __WIFSIGNALED(status)   (!__WIFSTOPPED(status) && !__WIFEXITED(status))
+# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
 #endif /* GCC.  */
 
 /* Nonzero if STATUS indicates the child is stopped.  */
 
 #ifdef __USE_BSD
 
-#include <endian.h>
+# include <endian.h>
 
 union wait
   {
     int w_status;
     struct
       {
-#if    __BYTE_ORDER == __LITTLE_ENDIAN
+# if   __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int __w_termsig:7; /* Terminating signal.  */
        unsigned int __w_coredump:1; /* Set if dumped core.  */
        unsigned int __w_retcode:8; /* Return code if exited normally.  */
        unsigned int:16;
-#endif                         /* Little endian.  */
-#if    __BYTE_ORDER == __BIG_ENDIAN
+# endif                                /* Little endian.  */
+# if   __BYTE_ORDER == __BIG_ENDIAN
        unsigned int:16;
        unsigned int __w_retcode:8;
        unsigned int __w_coredump:1;
        unsigned int __w_termsig:7;
-#endif                         /* Big endian.  */
+# endif                                /* Big endian.  */
       } __wait_terminated;
     struct
       {
-#if    __BYTE_ORDER == __LITTLE_ENDIAN
+# if   __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
        unsigned int __w_stopsig:8; /* Stopping signal.  */
        unsigned int:16;
-#endif                         /* Little endian.  */
-#if    __BYTE_ORDER == __BIG_ENDIAN
+# endif                                /* Little endian.  */
+# if   __BYTE_ORDER == __BIG_ENDIAN
        unsigned int:16;
        unsigned int __w_stopsig:8; /* Stopping signal.  */
        unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
-#endif                         /* Big endian.  */
+# endif                                /* Big endian.  */
       } __wait_stopped;
   };
 
-#define        w_termsig       __wait_terminated.__w_termsig
-#define        w_coredump      __wait_terminated.__w_coredump
-#define        w_retcode       __wait_terminated.__w_retcode
-#define        w_stopsig       __wait_stopped.__w_stopsig
-#define        w_stopval       __wait_stopped.__w_stopval
+# define w_termsig     __wait_terminated.__w_termsig
+# define w_coredump    __wait_terminated.__w_coredump
+# define w_retcode     __wait_terminated.__w_retcode
+# define w_stopsig     __wait_stopped.__w_stopsig
+# define w_stopval     __wait_stopped.__w_stopval
 
 #endif /* Use BSD.  */
index 0fffa4b7fbae14c4fa121320ac7ed59042867dda..194bee375506122416215eff9649dda35956dc67 100755 (executable)
--- a/configure
+++ b/configure
@@ -49,7 +49,7 @@ ac_help="$ac_help
   --disable-versioning    do not include versioning information in the
                           library objects [default=yes if supported]"
 ac_help="$ac_help
-  --enable-add-ons=DIR... configure and build named extra directories"
+  --enable-add-ons=DIR1,DIR2... configure and build named extra directories"
 ac_help="$ac_help
   --enable-static-nss     build static NSS modules [default=no]"
 
@@ -1989,7 +1989,7 @@ fi
 
 if test $VERSIONING = no; then
   echo "\
-*** WARNING: You should not compile GNU libc without versioning. Not using 
+*** WARNING: You should not compile GNU libc without versioning. Not using
 *** versioning will introduce incompatibilities so that old binaries
 *** will not run anymore.
 *** For versioning you need recent binutils (binutils-2.8.1.0.17 or newer)."
index ead9e630da555b4e4f3c4d5f077d7ef211c35430..b0db91f91159946e1b528061c25e4fc01764f478 100644 (file)
@@ -1,4 +1,4 @@
-Dnl Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
 AC_REVISION([$CVSid$])
 AC_PREREQ(2.11)dnl             dnl Minimum Autoconf version required.
 AC_INIT(include/features.h)
@@ -81,7 +81,7 @@ AC_ARG_ENABLE(versioning, dnl
 
 dnl Generic infrastructure for drop-in additions to libc.
 AC_ARG_ENABLE(add-ons, dnl
-[  --enable-add-ons=DIR... configure and build named extra directories],
+[  --enable-add-ons=DIR1,DIR2... configure and build named extra directories],
              [add_ons=`echo "$enableval" | sed 's/,/ /g'`],
              [add_ons=])
 AC_CONFIG_SUBDIRS($add_ons)
@@ -633,7 +633,7 @@ AC_SUBST(VERSIONING)
 
 if test $VERSIONING = no; then
   echo "\
-*** WARNING: You should not compile GNU libc without versioning. Not using 
+*** WARNING: You should not compile GNU libc without versioning. Not using
 *** versioning will introduce incompatibilities so that old binaries
 *** will not run anymore.
 *** For versioning you need recent binutils (binutils-2.8.1.0.17 or newer)."
index 1a4f6b31059eb76709fe395731958769549943ce..f67b5d08b539b7b5a3b12f239e41006eb449ec1b 100644 (file)
@@ -402,7 +402,16 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
 
   /* Setup counting data.  */
   if (kcountsize < highpc - lowpc)
-    s_scale = ((double) kcountsize / (highpc - lowpc)) * SCALE_1_TO_1;
+    {
+      /* XXX I've not yet verified that the second expression is really
+        well suited but something like this is in any case necessary
+        for targets without hardware FP support.  --drepper  */
+#if 0
+      s_scale = ((double) kcountsize / (highpc - lowpc)) * SCALE_1_TO_1;
+#else
+      s_scale = (kcountsize * SCALE_1_TO_1) / (highpc - lowpc);
+#endif
+    }
   else
     s_scale = SCALE_1_TO_1;
 
index 69496b6e1ab1f0752a30004511ef5b1b71f4193f..beb9d07c23f5926df25589eb1ce57a839d5cfd5b 100644 (file)
@@ -9,6 +9,17 @@ VERSION="@VERSION@"
 BUGGLIBC="bugs@gnu.org"
 ADDONS="@subdirs@"
 HOST="@host@"
+CC='@CC@'
+CFLAGS="@CFLAGS@"
+VERSIONING="@VERSIONING@"
+BUILD_STATIC="@static@"
+BUILD_SHARED="@shared@"
+BUILD_PIC_DEFAULT="@pic_default@"
+BUILD_PROFILE="@profile@"
+BUILD_OMITFP="@omitfp@"
+BUILD_BOUNDED="@bounded@"
+BUILD_STATIC_NSS="@static_nss@"
+STDIO="@stdio@"
 
 PATH=/bin:/usr/bin:/usr/local/bin:$PATH
 export PATH
@@ -125,6 +136,17 @@ ${ORGANIZATION- $ORGANIZATION_C}
 `[ -n "$ARCH" ] && echo Architecture: $ARCH`
 `[ -n "$MACHINE" ] && echo Machine: $MACHINE`
 `[ -n "$ADDONS" ] && echo Addons: $ADDONS`
+`[ -n "$CFLAGS" ] && echo Build CFLAGS: $CFLAGS`
+`[ -n "$CC" ] && echo Build CC: $CC`
+`[ -n "$VERSIONING" ] && echo Versioning: $VERSIONING`
+`[ -n "$BUILD_STATIC" ] && echo Build static: $BUILD_STATIC`
+`[ -n "$BUILD_SHARED" ] && echo Build shared: $BUILD_SHARED`
+`[ -n "$BUILD_PIC_DEFAULT" ] && echo Build pic-default: $BUILD_PIC_DEFAULT`
+`[ -n "$BUILD_PROFILE" ] && echo Build profile: $BUILD_PROFILE`
+`[ -n "$BUILD_OMITFP" ] && echo Build omitfp: $BUILD_OMITFP`
+`[ -n "$BUILD_BOUNDED" ] && echo Build bounded: $BUILD_BOUNDED`
+`[ -n "$BUILD_STATIC_NSS" ] && echo Build static-nss: $BUILD_STATIC_NSS`
+`[ -n "$STDIO" ] && echo Stdio: $STDIO`
 
 >Description:
        $DESCRIPTION_C
index 791c0259a3938a1eee3c51dabd809e7309554e5c..912fa26d13e66178043530614cd5dc81b8e3ed39 100644 (file)
@@ -40,11 +40,11 @@ __gconv_close (gconv_t cd)
       if (srunp->end_fct != NULL)
        (*srunp->end_fct) (drunp);
       else
-       {
-         free (drunp->outbuf);
-         if (drunp->data != NULL)
-           free (drunp->data);
-       }
+       if (drunp->data != NULL)
+         free (drunp->data);
+
+      if (!drunp->is_last && drunp->outbuf != NULL)
+       free (drunp->outbuf);
 
       /* Next step.  */
       ++srunp;
index f7697952734cb2ecb706b3bc77f043eb06538164..51e4673b2dc7c24973a000e05f6139b463169ad3 100644 (file)
@@ -18,6 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <errno.h>
 #include <gconv.h>
 #include <stdlib.h>
 #include <string.h>
@@ -112,16 +113,20 @@ __gconv_transform_ucs4_utf8 (struct gconv_step *step,
     }
   else
     {
+      int save_errno = errno;
       do_write = 0;
 
       do
        {
          const char *newinbuf = inbuf;
-         size_t actually = __wmemrtombs (&data->outbuf[data->outbufavail],
-                                         (const wchar_t **) &newinbuf,
-                                         *inlen / sizeof (wchar_t),
-                                         data->outbufsize - data->outbufavail,
-                                         (mbstate_t *) data->data);
+         size_t actually;
+
+         errno = 0;
+         actually = __wmemrtombs (&data->outbuf[data->outbufavail],
+                                  (const wchar_t **) &newinbuf,
+                                  *inlen / sizeof (wchar_t),
+                                  data->outbufsize - data->outbufavail,
+                                  (mbstate_t *) data->data);
 
          /* Remember how much we converted.  */
          do_write += newinbuf - inbuf;
@@ -129,6 +134,13 @@ __gconv_transform_ucs4_utf8 (struct gconv_step *step,
 
          data->outbufavail += actually;
 
+         /* Check whether an illegal character appeared.  */
+         if (errno != 0)
+           {
+             result = GCONV_ILLEGAL_INPUT;
+             break;
+           }
+
          if (data->is_last)
            {
              /* This is the last step.  */
@@ -159,6 +171,8 @@ __gconv_transform_ucs4_utf8 (struct gconv_step *step,
            }
        }
       while (*inlen > 0 && result == GCONV_EMPTY_INPUT);
+
+      __set_errno (save_errno);
     }
 
   if (written != NULL && data->is_last)
@@ -201,17 +215,20 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
     }
   else
     {
+      int save_errno = errno;
       do_write = 0;
 
       do
        {
          const char *newinbuf = inbuf;
-         size_t actually = __wmemrtowcs ((wchar_t *) &data->outbuf[data->outbufavail],
-                                         &newinbuf, *inlen,
-                                         ((data->outbufsize
-                                           - data->outbufavail)
-                                          / sizeof (wchar_t)),
-                                         (mbstate_t *) data->data);
+         size_t actually;
+
+         errno = 0;
+         actually = __wmemrtowcs ((wchar_t *) &data->outbuf[data->outbufavail],
+                                  &newinbuf, *inlen,
+                                  ((data->outbufsize
+                                    - data->outbufavail) / sizeof (wchar_t)),
+                                  (mbstate_t *) data->data);
 
          /* Remember how much we converted.  */
          do_write += actually;
@@ -219,6 +236,20 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
 
          data->outbufavail += actually * sizeof (wchar_t);
 
+         /* Check whether an illegal character appeared.  */
+         if (errno != 0)
+           {
+             result = GCONV_ILLEGAL_INPUT;
+             break;
+           }
+
+         if (*inlen == 0 && !mbsinit ((mbstate_t *) data->data))
+           {
+             /* We have an incomplete character at the end.  */
+             result = GCONV_INCOMPLETE_INPUT;
+             break;
+           }
+
          if (data->is_last)
            {
              /* This is the last step.  */
@@ -249,6 +280,8 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
            }
        }
       while (*inlen > 0 && result == GCONV_EMPTY_INPUT);
+
+      __set_errno (save_errno);
     }
 
   if (written != NULL && data->is_last)
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
new file mode 100644 (file)
index 0000000..a79e12a
--- /dev/null
@@ -0,0 +1,119 @@
+# 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.
+
+#
+#      Makefile for iconv data and code.
+#
+subdir := iconvdata
+
+# Names of all the shared objects which implement the transformations.
+modules        := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5    \
+          ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10   \
+          T.61 ISO_6937
+modules.so := $(addsuffix .so, $(modules))
+
+
+ISO8859-1-routines := iso8859-1
+ISO8859-2-routines := iso8859-2
+ISO8859-3-routines := iso8859-3
+ISO8859-4-routines := iso8859-4
+ISO8859-5-routines := iso8859-5
+ISO8859-6-routines := iso8859-6
+ISO8859-7-routines := iso8859-7
+ISO8859-8-routines := iso8859-8
+ISO8859-9-routines := iso8859-9
+ISO8859-10-routines := iso8859-10
+T.61-routines := t61
+ISO_6937-routines := iso6937
+
+distribute := iso8859-generic.c \
+             iso8859-1.c iso8859-2.c iso8859-3.c iso8859-4.c iso8859-5.c \
+             iso8859-6.c iso8859-7.c iso8859-8.c iso8859-9.c iso8859-10.c\
+             iso8859-2.h iso8859-3.h iso8859-4.h iso8859-5.h iso8859-6.h \
+             iso8859-7.h iso8859-8.h iso8859-9.h iso8859-10.h t61.c      \
+             iso6937.c
+
+include ../Makeconfig
+
+# We build the transformation modules only when we build shared libs.
+ifeq (yes,$(build-shared))
+
+# This macro is similar to build-shlib but it does not define a soname
+# and it does not depend on the destination name to start with `lib'.
+define build-module
+$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
+         -B$(csu-objpfx) $(load-map-file:%=-Wl,--version-script=%) \
+         $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
+         -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
+         -Wl,--whole-archive \
+         $(filter-out $($(@F:.so=)-map) $(+preinit) $(+postinit),$^) \
+         $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
+endef
+
+# Rule to generate the shared objects.
+extra-modules-left := $(modules)
+include extra-module.mk
+
+
+extra-objs     += $(modules.so)
+install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
+                 $(inst_gconvdir)/gconv-modules
+
+# If we have the localedata add-on available we can build the conversion
+# tables for numerous charsets.
+ifneq (,$(findstring localedata,$(add-ons)))
+define generate-8bit-table
+( echo "static const wchar_t to_ucs4[256] = {"; \
+  sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\1] = 0x\2,/p' -e d $^ | sort -u; \
+  echo "};"; \
+  echo "static const char from_ucs4[] = {"; \
+  sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/  [0x\2] = 0x\1,/p' -e d $^ | sort -u; \
+  echo "};" ) > $@.new && rm -f $@ && mv $@.new $@
+endef
+
+iso8859-2.h: ../localedata/charmaps/ISO-8859-2
+       $(generate-8bit-table)
+iso8859-3.h: ../localedata/charmaps/ISO-8859-3
+       $(generate-8bit-table)
+iso8859-4.h: ../localedata/charmaps/ISO-8859-4
+       $(generate-8bit-table)
+iso8859-5.h: ../localedata/charmaps/ISO-8859-5
+       $(generate-8bit-table)
+iso8859-6.h: ../localedata/charmaps/ISO-8859-6
+       $(generate-8bit-table)
+iso8859-7.h: ../localedata/charmaps/ISO-8859-7
+       $(generate-8bit-table)
+iso8859-8.h: ../localedata/charmaps/ISO-8859-8
+       $(generate-8bit-table)
+iso8859-9.h: ../localedata/charmaps/ISO-8859-9
+       $(generate-8bit-table)
+iso8859-10.h: ../localedata/charmaps/ISO-8859-10
+       $(generate-8bit-table)
+
+headers: iso8859-2.h iso8859-3.h iso8859-4.h iso8859-5.h iso8859-6.h   \
+        iso8859-7.h iso8859-8.h iso8859-9.h iso8859-10.h
+endif
+
+
+$(addprefix $(inst_gconvdir)/, $(modules.so)): $(inst_gconvdir)/%: $(objpfx)%
+       $(do-install-program)
+$(inst_gconvdir)/gconv_modules: gconv-modules
+       $(do-install)
+endif
+
+include ../Rules
diff --git a/iconvdata/configure b/iconvdata/configure
new file mode 100755 (executable)
index 0000000..3eafc93
--- /dev/null
@@ -0,0 +1,5 @@
+# This is only to keep the GNU C library configure mechanism happy.
+#
+# Perhaps some day we need a real configuration script for different
+# kernel versions or so.
+exit 0
diff --git a/iconvdata/extra-module.mk b/iconvdata/extra-module.mk
new file mode 100644 (file)
index 0000000..88c6804
--- /dev/null
@@ -0,0 +1,16 @@
+mod := $(firstword $(extra-modules-left))
+extra-modules-left := $(strip $(filter-out $(mod),$(extra-modules-left)))
+
+extra-objs += $(patsubst %,%.os,$($(mod)-routines))
+
+$(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))
+       $(build-module)
+
+# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
+# This ensures they will load libc.so for needed symbols if loaded by
+# a statically-linked program that hasn't already loaded it.
+$(objpfx)$(mod).so: $(common-objpfx)libc.so
+
+ifneq (,$(extra-modules-left))
+include extra-module.mk
+endif
diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules
new file mode 100644 (file)
index 0000000..270ac14
--- /dev/null
@@ -0,0 +1,145 @@
+# GNU libc iconv configuration.
+# Copyright (C) 1997 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+#
+# 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.  */
+
+# All lines contain the following information:
+
+# If the lines start with `module'
+#  fromset:    either a name triple or a regular expression triple.
+#  toset:      a name triple or an expression with \N to get regular
+#              expression matching results.
+#  filename:   filename of the module implementing the transformation.
+#              If it is not absolute the path is made absolute by prepending
+#              the directory the configuration file is found in.
+#  cost:       optional cost of the transformation.  Default is 1.
+
+# If the lines start with `alias'
+#  alias:      alias name which is not really recognized.
+#  name:       the real name of the character set
+
+#      from                      to                      module        cost
+alias  ISO-10646//             ISO-10646/UCS4/
+alias  10646-1:1993//          ISO-10646/UCS4/
+alias  10646-1:1993/UCS4/      ISO-10646/UCS4/
+
+#      from                      to                      module        cost
+alias  ISO-IR-100//            ISO-8859-1//
+alias  ISO_8859-1:1987//       ISO-8859-1//
+alias  ISO_8859-1//            ISO-8859-1//
+alias  LATIN1//                ISO-8859-1//
+alias  L1//                    ISO-8859-1//
+alias  IBM819//                ISO-8859-1//
+alias  CP819//                 ISO-8859-1//
+module ISO-8859-1//            ISO-10646/UCS4/         ISO8859-1       1
+module ISO-10646/UCS4/         ISO-8859-1//            ISO8859-1       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-101//            ISO-8859-2//
+alias  ISO_8859-2:1987//       ISO-8859-2//
+alias  ISO_8859-2//            ISO-8859-2//
+alias  LATIN2//                ISO-8859-2//
+alias  L2//                    ISO-8859-2//
+module ISO-8859-2//            ISO-10646/UCS4/         ISO8859-2       1
+module ISO-10646/UCS4/         ISO-8859-2//            ISO8859-2       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-109//            ISO-8859-3//
+alias  ISO_8859-3:1988//       ISO-8859-3//
+alias  ISO_8859-3//            ISO-8859-3//
+alias  LATIN3//                ISO-8859-3//
+alias  L3//                    ISO-8859-3//
+module ISO-8859-3//            ISO-10646/UCS4/         ISO8859-3       1
+module ISO-10646/UCS4/         ISO-8859-3//            ISO8859-3       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-110//            ISO-8859-4//
+alias  ISO_8859-4:1988//       ISO-8859-4//
+alias  ISO_8859-4//            ISO-8859-4//
+alias  LATIN4//                ISO-8859-4//
+alias  L4//                    ISO-8859-4//
+module ISO-8859-4//            ISO-10646/UCS4/         ISO8859-4       1
+module ISO-10646/UCS4/         ISO-8859-4//            ISO8859-4       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-144//            ISO-8859-5//
+alias  ISO_8859-5:1988//       ISO-8859-5//
+alias  ISO_8859-5//            ISO-8859-5//
+alias  CYRILLIC//              ISO-8859-5//
+module ISO-8859-5//            ISO-10646/UCS4/         ISO8859-5       1
+module ISO-10646/UCS4/         ISO-8859-5//            ISO8859-5       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-127//            ISO-8859-6//
+alias  ISO_8859-6:1987//       ISO-8859-6//
+alias  ISO_8859-6//            ISO-8859-6//
+alias  ECMA-114//              ISO-8859-6//
+alias  ASMO-708//              ISO-8859-6//
+alias  ARABIC//                ISO-8859-6//
+module ISO-8859-6//            ISO-10646/UCS4/         ISO8859-6       1
+module ISO-10646/UCS4/         ISO-8859-6//            ISO8859-6       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-126//            ISO-8859-7//
+alias  ISO_8859-7:1987//       ISO-8859-7//
+alias  ISO_8859-7//            ISO-8859-7//
+alias  ELOT_928//              ISO-8859-7//
+alias  ECMA-118//              ISO-8859-7//
+alias  GREEK//                 ISO-8859-7//
+alias  GREEK8//                ISO-8859-7//
+module ISO-8859-7//            ISO-10646/UCS4/         ISO8859-7       1
+module ISO-10646/UCS4/         ISO-8859-7//            ISO8859-7       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-138//            ISO-8859-8//
+alias  ISO_8859-8:1988//       ISO-8859-8//
+alias  ISO_8859-8//            ISO-8859-8//
+alias  HEBREW//                ISO-8859-8//
+module ISO-8859-8//            ISO-10646/UCS4/         ISO8859-8       1
+module ISO-10646/UCS4/         ISO-8859-8//            ISO8859-8       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-148//            ISO-8859-9//
+alias  ISO_8859-9:1989//       ISO-8859-9//
+alias  ISO_8859-9//            ISO-8859-9//
+alias  LATIN5//                ISO-8859-9//
+alias  L5//                    ISO-8859-9//
+module ISO-8859-9//            ISO-10646/UCS4/         ISO8859-9       1
+module ISO-10646/UCS4/         ISO-8859-9//            ISO8859-9       1
+
+#      from                      to                      module        cost
+alias  ISO-IR-157//            ISO-8859-10//
+alias  ISO_8859-10:1993//      ISO-8859-10//
+alias  ISO_8859-10//           ISO-8859-10//
+alias  LATIN6//                ISO-8859-10//
+alias  L6//                    ISO-8859-10//
+module ISO-8859-10//           ISO-10646/UCS4/         ISO8859-10      1
+module ISO-10646/UCS4/         ISO-8859-10//           ISO8859-10      1
+
+#      from                      to                      module        cost
+alias  T.61//                  T.61-8BIT//
+alias  ISO-IR-103//            T.61-8BIT//
+module T.61-8BIT//             ISO-10646/UCS4/         T.61            1
+module ISO-10646/UCS4/         T.61-8BIT//             T.61            1
+
+#      from                      to                      module        cost
+alias  ISO-IR-156//            ISO_6937//
+alias  ISO_6937:1992//         ISO_6937//
+alias  ISO6937//               ISO_6937//
+module ISO_6937//              ISO-10646/UCS4/         ISO_6937        1
+module ISO-10646/UCS4/         ISO_6937//              ISO_6937        1
diff --git a/iconvdata/iso6937.c b/iconvdata/iso6937.c
new file mode 100644 (file)
index 0000000..dc6da3b
--- /dev/null
@@ -0,0 +1,681 @@
+/* Generic conversion to and from ISO 6937.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <gconv.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Data taken from the WG15 tables.  */
+static const wchar_t to_ucs4[256] =
+{
+  /* 0x00 */ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+  /* 0x08 */ 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+  /* 0x10 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+  /* 0x18 */ 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
+  /* 0x20 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0034, 0x0025, 0x0026, 0x0027,
+  /* 0x28 */ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
+  /* 0x30 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+  /* 0x38 */ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
+  /* 0x40 */ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+  /* 0x48 */ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
+  /* 0x50 */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+  /* 0x58 */ 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
+  /* 0x60 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+  /* 0x68 */ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+  /* 0x70 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+  /* 0x78 */ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f,
+  /* 0x80 */ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+  /* 0x88 */ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+  /* 0x90 */ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+  /* 0x98 */ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+  /* 0xa0 */ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x0000, 0x00a5, 0x0000, 0x00a7,
+  /* 0xa8 */ 0x00a4, 0x2018, 0x201c, 0x00ab, 0x2190, 0x2191, 0x2192, 0x2193,
+  /* 0xb0 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+  /* 0xb8 */ 0x00f7, 0x2019, 0x201d, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+  /* 0xc0 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xc8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xd0 */ 0x2014, 0x00b9, 0x00ae, 0x00a9, 0x2122, 0x266a, 0x00ac, 0x00a6,
+  /* 0xd8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e,
+  /* 0xe0 */ 0x2126, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0x0000, 0x0132, 0x013f,
+  /* 0xe8 */ 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0x0149,
+  /* 0xf0 */ 0x0138, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0140,
+  /* 0xf8 */ 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x00ad
+};
+
+/* The outer array range runs from 0xc1 to 0xcf, the inner range from 0x20
+   to 0x7f.  */
+static const wchar_t to_ucs4_comb[15][96] =
+{
+  /* 0xc1 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c0, 0x0000, 0x0000, 0x0000, 0x00c8, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d2,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d9, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e0, 0x0000, 0x0000, 0x0000, 0x00e8, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ec, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f2,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f9, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc2 */
+  {
+    /* 0x20 */ 0x00b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c1, 0x0000, 0x0106, 0x0000, 0x00c9, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cd, 0x0000, 0x0000, 0x0139, 0x0000, 0x0143, 0x00d3,
+    /* 0x50 */ 0x0000, 0x0000, 0x0154, 0x015a, 0x0000, 0x00da, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x00dd, 0x0179, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e1, 0x0000, 0x0107, 0x0000, 0x00e9, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ed, 0x0000, 0x0000, 0x013a, 0x0000, 0x0144, 0x00f3,
+    /* 0x70 */ 0x0000, 0x0000, 0x0155, 0x015b, 0x0000, 0x00fa, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x00fd, 0x017a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc3 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c2, 0x0000, 0x0108, 0x0000, 0x00ca, 0x0000, 0x011c,
+    /* 0x48 */ 0x0124, 0x00ce, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d4,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x015c, 0x0000, 0x00db, 0x0000, 0x0174,
+    /* 0x58 */ 0x0000, 0x0176, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e2, 0x0000, 0x0109, 0x0000, 0x00ea, 0x0000, 0x011d,
+    /* 0x68 */ 0x0125, 0x00ee, 0x0135, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f4,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x015d, 0x0000, 0x00fb, 0x0000, 0x0175,
+    /* 0x78 */ 0x0000, 0x0177, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc4 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0128, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d1, 0x00d5,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0168, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0129, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f1, 0x00f5,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0169, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc5 */
+  {
+    /* 0x20 */ 0x00af, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0100, 0x0000, 0x0000, 0x0000, 0x0112, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x012a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x014c,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016a, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0101, 0x0000, 0x0000, 0x0000, 0x0113, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x012b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x014d,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016b, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc6 */
+  {
+    /* 0x20 */ 0x02d8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x011e,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0103, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x011f,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc7 */
+  {
+    /* 0x20 */ 0x02d9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x010a, 0x0000, 0x0116, 0x0000, 0x0120,
+    /* 0x48 */ 0x0000, 0x0130, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x017b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x010b, 0x0000, 0x0117, 0x0000, 0x0121,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x017c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc8 */
+  {
+    /* 0x20 */ 0x00a8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c4, 0x0000, 0x0000, 0x0000, 0x00cb, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cf, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d6,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00dc, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0178, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e4, 0x0000, 0x0000, 0x0000, 0x00eb, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ef, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f6,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00fc, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc9 */
+  {
+    0x0000,
+  },
+  /* 0xca */
+  {
+    /* 0x20 */ 0x02da, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016e, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016f, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcb */
+  {
+    /* 0x20 */ 0x00b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x00c7, 0x0000, 0x0000, 0x0000, 0x0122,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0136, 0x013b, 0x0000, 0x0145, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0156, 0x015e, 0x0162, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x00e7, 0x0000, 0x0000, 0x0000, 0x0123,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0137, 0x013c, 0x0000, 0x0146, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0157, 0x015f, 0x0163, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcc */
+  {
+    0x0000,
+  },
+  /* 0xcd */
+  {
+    /* 0x20 */ 0x02dd, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0150,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0170, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0151,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0171, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xce */
+  {
+    /* 0x20 */ 0x02db, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0104, 0x0000, 0x0000, 0x0000, 0x0118, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x012e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0172, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0105, 0x0000, 0x0000, 0x0000, 0x0119, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x012f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0173, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcf */
+  {
+    /* 0x20 */ 0x02c7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x010c, 0x010e, 0x011a, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x013d, 0x0000, 0x0147, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0158, 0x0160, 0x0164, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x017d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x010d, 0x010f, 0x011b, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x013e, 0x0000, 0x0148, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0159, 0x0161, 0x0165, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x017e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  }
+};
+
+
+static const char from_ucs4[][2] =
+{
+  /* 0x0000 */ "\x00\x00", "\x01\x00", "\x02\x00", "\x03\x00", "\x04\x00",
+  /* 0x0005 */ "\x05\x00", "\x06\x00", "\x07\x00", "\x08\x00", "\x09\x00",
+  /* 0x000a */ "\x0a\x00", "\x0b\x00", "\x0c\x00", "\x0d\x00", "\x0e\x00",
+  /* 0x000f */ "\x0f\x00", "\x10\x00", "\x11\x00", "\x12\x00", "\x13\x00",
+  /* 0x0014 */ "\x14\x00", "\x15\x00", "\x16\x00", "\x17\x00", "\x18\x00",
+  /* 0x0019 */ "\x19\x00", "\x1a\x00", "\x1b\x00", "\x1c\x00", "\x1d\x00",
+  /* 0x001e */ "\x1e\x00", "\x1f\x00", "\x20\x00", "\x21\x00", "\x22\x00",
+  /* 0x0023 */ "\x23\x00", "\x24\x00", "\x25\x00", "\x26\x00", "\x27\x00",
+  /* 0x0028 */ "\x28\x00", "\x29\x00", "\x2a\x00", "\x2b\x00", "\x2c\x00",
+  /* 0x002d */ "\x2d\x00", "\x2e\x00", "\x2f\x00", "\x30\x00", "\x31\x00",
+  /* 0x0032 */ "\x32\x00", "\x33\x00", "\x34\x00", "\x35\x00", "\x36\x00",
+  /* 0x0037 */ "\x37\x00", "\x38\x00", "\x39\x00", "\x3a\x00", "\x3b\x00",
+  /* 0x003c */ "\x3c\x00", "\x3d\x00", "\x3e\x00", "\x3f\x00", "\x40\x00",
+  /* 0x0041 */ "\x41\x00", "\x42\x00", "\x43\x00", "\x44\x00", "\x45\x00",
+  /* 0x0046 */ "\x46\x00", "\x47\x00", "\x48\x00", "\x49\x00", "\x4a\x00",
+  /* 0x004b */ "\x4b\x00", "\x4c\x00", "\x4d\x00", "\x4e\x00", "\x4f\x00",
+  /* 0x0050 */ "\x50\x00", "\x51\x00", "\x52\x00", "\x53\x00", "\x54\x00",
+  /* 0x0055 */ "\x55\x00", "\x56\x00", "\x57\x00", "\x58\x00", "\x59\x00",
+  /* 0x005a */ "\x5a\x00", "\x5b\x00", "\x5c\x00", "\x5d\x00", "\x5e\x00",
+  /* 0x005f */ "\x5f\x00", "\x60\x00", "\x61\x00", "\x62\x00", "\x63\x00",
+  /* 0x0064 */ "\x64\x00", "\x65\x00", "\x66\x00", "\x67\x00", "\x68\x00",
+  /* 0x0069 */ "\x69\x00", "\x6a\x00", "\x6b\x00", "\x6c\x00", "\x6d\x00",
+  /* 0x006e */ "\x6e\x00", "\x6f\x00", "\x70\x00", "\x71\x00", "\x72\x00",
+  /* 0x0073 */ "\x73\x00", "\x74\x00", "\x75\x00", "\x76\x00", "\x77\x00",
+  /* 0x0078 */ "\x78\x00", "\x79\x00", "\x7a\x00", "\x7b\x00", "\x7c\x00",
+  /* 0x007d */ "\x7d\x00", "\x7e\x00", "\x7f\x00", "\x00\x80", "\x00\x81",
+  /* 0x0082 */ "\x82\x00", "\x83\x00", "\x84\x00", "\x85\x00", "\x86\x00",
+  /* 0x0087 */ "\x87\x00", "\x88\x00", "\x89\x00", "\x8a\x00", "\x8b\x00",
+  /* 0x008c */ "\x8c\x00", "\x8d\x00", "\x8e\x00", "\x8f\x00", "\x90\x00",
+  /* 0x0091 */ "\x91\x00", "\x92\x00", "\x93\x00", "\x94\x00", "\x95\x00",
+  /* 0x0096 */ "\x96\x00", "\x97\x00", "\x98\x00", "\x99\x00", "\x9a\x00",
+  /* 0x009b */ "\x9b\x00", "\x9c\x00", "\x9d\x00", "\x9e\x00", "\x9f\x00",
+  /* 0x00a0 */ "\xa0\x00", "\xa1\x00", "\xa2\x00", "\xa3\x00", "\xa4\x00",
+  /* 0x00a5 */ "\xa5\x00", "\xd7\x00", "\xa7\x00", "\xc8\x20", "\xd3\x00",
+  /* 0x00aa */ "\xe3\x00", "\xab\x00", "\xd6\x00", "\xff\x00", "\xd2\x00",
+  /* 0x00af */ "\xc5\x20", "\xb0\x00", "\xb1\x00", "\xb2\x00", "\xb3\x00",
+  /* 0x00b4 */ "\xc2\x20", "\xb5\x00", "\xb6\x00", "\xb7\x00", "\xcb\x20",
+  /* 0x00b9 */ "\xc1\x00", "\xeb\x00", "\xbb\x00", "\xbc\x00", "\xbd\x00",
+  /* 0x00be */ "\xbe\x00", "\xbf\x00", "\xc1\x41", "\xc2\x41", "\xc3\x41",
+  /* 0x00c3 */ "\xc4\x41", "\xc8\x41", "\xca\x41", "\xe1\x00", "\xcb\x43",
+  /* 0x00c8 */ "\xc1\x45", "\xc2\x45", "\xc3\x45", "\xc8\x45", "\xc1\x49",
+  /* 0x00cd */ "\xc2\x49", "\xc3\x49", "\xc8\x49", "\xe2\x00", "\xc4\x4e",
+  /* 0x00d2 */ "\xc1\x4f", "\xc2\x4f", "\xc3\x4f", "\xc4\x4f", "\xc8\x4f",
+  /* 0x00d7 */ "\xb4\x00", "\xe9\x00", "\xc1\x55", "\xc2\x55", "\xc3\x55",
+  /* 0x00dc */ "\xc8\x55", "\xc2\x59", "\xec\x00", "\xfb\x00", "\xc1\x61",
+  /* 0x00e1 */ "\xc2\x61", "\xc3\x61", "\xc4\x61", "\xc8\x61", "\xca\x61",
+  /* 0x00e6 */ "\xf1\x00", "\xcb\x63", "\xc1\x65", "\xc2\x65", "\xc3\x65",
+  /* 0x00eb */ "\xc8\x65", "\xc1\x69", "\xc2\xe9", "\xc3\x69", "\xc8\x69",
+  /* 0x00f0 */ "\xf3\x00", "\xc4\x6e", "\xc1\x6f", "\xc2\x6f", "\xc3\x6f",
+  /* 0x00f5 */ "\xc4\x6f", "\xc8\x6f", "\xb8\x00", "\xf9\x00", "\xc1\x75",
+  /* 0x00fa */ "\xc2\x75", "\xc3\x75", "\xc8\x75", "\xc2\x79", "\xfc\x00",
+  /* 0x00ff */ "\xc8\x79", "\xc5\x41", "\xc5\x61", "\xc6\x41", "\xc6\x61",
+  /* 0x0104 */ "\xce\x41", "\xce\x61", "\xc2\x43", "\xc2\x63", "\xc3\x43",
+  /* 0x0109 */ "\xc3\x63", "\xc7\x43", "\xc7\x63", "\xcf\x43", "\xcf\x63",
+  /* 0x010e */ "\xcf\x44", "\xcf\x64", "\x00\x00", "\xf2\x00", "\xc5\x45",
+  /* 0x0113 */ "\xc5\x65", "\x00\x00", "\x00\x00", "\xc7\x45", "\xc7\x65",
+  /* 0x0118 */ "\xce\x45", "\xce\x65", "\xcf\x45", "\xcf\x65", "\xc3\x47",
+  /* 0x011d */ "\xc3\x67", "\xc6\x47", "\xc6\x67", "\xc7\x47", "\xc7\x67",
+  /* 0x0122 */ "\xcb\x47", "\xcb\x67", "\xc3\x48", "\xc3\x68", "\xe4\x00",
+  /* 0x0127 */ "\xf4\x00", "\xc4\x49", "\xc4\x69", "\xc5\x49", "\xc5\x69",
+  /* 0x012c */ "\x00\x00", "\x00\x00", "\xce\x49", "\xce\x69", "\xc7\x49",
+  /* 0x0131 */ "\xf5\x00", "\xe6\x00", "\xf6\x00", "\xc3\x4a", "\xc3\x6a",
+  /* 0x0136 */ "\xcb\x4b", "\xcb\x6b", "\xf0\x00", "\xc2\x4c", "\xc2\x6c",
+  /* 0x013b */ "\xcb\x4c", "\xcb\x6c", "\xcf\x4c", "\xcf\x6c", "\xe7\x00",
+  /* 0x0140 */ "\xf7\x00", "\xe8\x00", "\xf8\x00", "\xc2\x4e", "\xc2\x6e",
+  /* 0x0145 */ "\xcb\x4e", "\xcb\x6e", "\xcf\x4e", "\xcf\x6e", "\xef\x00",
+  /* 0x014a */ "\xee\x00", "\xfe\x00", "\xc5\x4f", "\xc5\x6f", "\x00\x00",
+  /* 0x014f */ "\x00\x00", "\xcd\x4f", "\xcd\x6f", "\xea\x00", "\xfa\x00",
+  /* 0x0154 */ "\xc2\x52", "\xc2\x72", "\xcb\x52", "\xcb\x72", "\xcf\x52",
+  /* 0x0159 */ "\xcf\x72", "\xc2\x53", "\xc2\x73", "\xc3\x53", "\xc3\x73",
+  /* 0x015e */ "\xcb\x53", "\xcb\x73", "\xcf\x53", "\xcf\x73", "\xcb\x54",
+  /* 0x0163 */ "\xcb\x74", "\xcf\x54", "\xcf\x74", "\xed\x00", "\xfd\x00",
+  /* 0x0168 */ "\xc4\x55", "\xc4\x75", "\xc5\x55", "\xc5\x75", "\xc6\x55",
+  /* 0x016d */ "\xc6\x75", "\xca\x55", "\xca\x75", "\xcd\x55", "\xcd\x75",
+  /* 0x0172 */ "\xce\x55", "\xce\x75", "\xc3\x57", "\xc3\x77", "\xc3\x59",
+  /* 0x0177 */ "\xc3\x79", "\xc8\x59", "\xc2\x5a", "\xc2\x7a", "\xc7\x5a",
+  /* 0x017c */ "\xc7\x7a", "\xcf\x5a", "\xcf\x7a"
+/*
+   This table does not cover the following positions:
+
+     0x02c7    "\xcf\x20",
+     ...
+     0x02d8    "\xc6\x20", "\xc7\x20", "\xca\x20", "\xce\x20", "\x00\x00",
+     0x02dd    "\xcd\x20",
+     ...
+     0x2014    "\xd0\x00", "\x00\x00", "\x00\x00", "\x00\x00", "\xa9\x00",
+     0x2019    "\xb9\x00", "\x00\x00", "\x00\x00", "\xaa\x00", "\xba\x00",
+     0x201e    "\x00\x00", "\x00\x00", "\x00\x00", "\x00\x00", "\xd4\x00",
+     0x2123    "\x00\x00", "\x00\x00", "\x00\x00", "\xe0\x00", "\x00\x00",
+     ...
+     0x215b    "\xdc\x00", "\xdd\x00", "\xde\x00"
+     ...
+     0x2190    "\xac\x00", "\xad\x00", "\xae\x00", "\xaf\x00",
+     ...
+     0x266a    "\xd5\x00"
+
+   These would blow up the table and are therefore handled specially in
+   the code.
+*/
+};
+
+/* Direction of the transformation.  */
+enum direction
+{
+  illegal,
+  to_iso6937,
+  from_iso6937
+};
+
+struct iso6937_data
+{
+  enum direction dir;
+};
+
+
+int
+gconv_init (struct gconv_step *step, struct gconv_step_data *data)
+{
+  /* Determine which direction.  */
+  struct iso6937_data *new_data;
+  enum direction dir;
+  int result;
+
+  if (__strcasestr (step->from_name, "ISO_6937") != NULL)
+    dir = from_iso6937;
+  else if (__strcasestr (step->to_name, "ISO_6937") != NULL)
+    dir = to_iso6937;
+  else
+    dir = illegal;
+
+  result = GCONV_NOCONV;
+  if (dir != illegal
+      && ((new_data
+          = (struct iso6937_data *) malloc (sizeof (struct iso6937_data)))
+         != NULL))
+    {
+      new_data->dir = dir;
+      data->data = new_data;
+      result = GCONV_OK;
+    }
+
+  return result;
+}
+
+
+void
+gconv_end (struct gconv_step_data *data)
+{
+  free (data->data);
+}
+
+
+int
+gconv (struct gconv_step *step, struct gconv_step_data *data,
+       const char *inbuf, size_t *inbufsize, size_t *written, int do_flush)
+{
+  struct gconv_step *next_step = step + 1;
+  struct gconv_step_data *next_data = data + 1;
+  gconv_fct fct = next_step->fct;
+  size_t do_write;
+  int result;
+
+  /* If the function is called with no input this means we have to reset
+     to the initial state.  The possibly partly converted input is
+     dropped.  */
+  if (do_flush)
+    {
+      do_write = 0;
+
+      /* Call the steps down the chain if there are any.  */
+      if (data->is_last)
+       result = GCONV_OK;
+      else
+       {
+         struct gconv_step *next_step = step + 1;
+         struct gconv_step_data *next_data = data + 1;
+
+         result = (*fct) (next_step, next_data, NULL, 0, written, 1);
+
+         /* Clear output buffer.  */
+         data->outbufavail = 0;
+       }
+    }
+  else
+    {
+      enum direction dir = ((struct iso6937_data *) data->data)->dir;
+
+      do_write = 0;
+
+      do
+       {
+         result = GCONV_OK;
+
+         if (dir == from_iso6937)
+           {
+             size_t inchars = *inbufsize;
+             size_t outwchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (cnt < inchars
+                    && (outwchars + sizeof (wchar_t) <= data->outbufsize))
+               {
+                 int inchar = inbuf[cnt];
+                 wchar_t ch;
+
+                 if (inchar >= '\xc1' && inchar <= '\xcf')
+                   {
+                     /* Composed character.  First test whether the next
+                        character is also available.  */
+                     int inchar2;
+
+                     if (cnt + 1 >= inchars)
+                       {
+                         /* The second character is not available.  Store
+                            the intermediate result.  */
+                         result = GCONV_INCOMPLETE_INPUT;
+                         break;
+                       }
+
+                     inchar2 = inbuf[++cnt];
+
+                     if (inchar2 < '\x20' || inchar2 >= '\x80')
+                       /* This is illegal.  */
+                       ch = L'\0';
+                     else
+                       ch = to_ucs4_comb[inchar - 0xc1][inchar2 - 0x20];
+                   }
+                 else
+                   ch = to_ucs4[inchar];
+
+                 if (ch == L'\0' && inbuf[cnt] != '\0')
+                   {
+                     /* This is an illegal character.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+
+                 *((wchar_t *) (outbuf + outwchars)) = ch;
+                 ++do_write;
+                 outwchars += sizeof (wchar_t);
+                 ++cnt;
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outwchars;
+           }
+         else
+           {
+             size_t inwchars = *inbufsize;
+             size_t outchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+             int extra = 0;
+
+             while (inwchars >= cnt + sizeof (wchar_t)
+                    && outchars < data->outbufsize)
+               {
+                 char tmp[2];
+                 int ch = *((wchar_t *) (inbuf + cnt));
+                 const char *cp;
+
+                 if (ch >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))
+                   {
+                     int fail = 0;
+                     switch (ch)
+                       {
+                       case 0x2c7:
+                         cp = "\xcf\x20";
+                         break;
+                       case 0x2d8 ... 0x2dd:
+                         {
+                           static const char map[5] = "\xc6\xc7\xca\xce\xcd";
+
+                           tmp[0] = map[ch - 0x2d8];
+                           tmp[1] = ' ';
+                           cp = tmp;
+                         }
+                         break;
+                       case 0x2014:
+                         cp = "\xd0";
+                         break;
+                       case 0x2018:
+                         cp = "\xa9";
+                         break;
+                       case 0x2019:
+                         cp = "\xb9";
+                         break;
+                       case 0x201c:
+                         cp = "\xaa";
+                         break;
+                       case 0x201d:
+                         cp = "\xba";
+                         break;
+                       case 0x2122:
+                         cp = "\xd4";
+                         break;
+                       case 0x2126:
+                         cp = "\xe0";
+                         break;
+                       case 0x215b ... 0x215e:
+                         tmp[0] = 0xdc + (ch - 0x215b);
+                         tmp[1] = '\0';
+                         cp = tmp;
+                         break;
+                       case 0x2190 ... 0x2193:
+                         tmp[0] = 0xac + (ch - 0x2190);
+                         tmp[1] = '\0';
+                         cp = tmp;
+                         break;
+                       case 0x266a:
+                         cp = "\xd5";
+                         break;
+                       default:
+                         cp = NULL;
+                         fail = 1;
+                       }
+
+                     if (fail)
+                       /* Illegal characters.  */
+                       break;
+                   }
+                 else if (ch < 0 || (from_ucs4[ch][0] == '\0' && ch != 0))
+                   break;
+                 else
+                   cp = from_ucs4[ch];
+
+                 outbuf[outchars] = cp[0];
+                 /* Now test for a possible second byte and write this
+                    if possible.  */
+                 if (cp[1] != '\0')
+                   {
+                     if (outchars + 1 >= data->outbufsize)
+                       {
+                         /* The result does not fit into the buffer.  */
+                         extra = 1;
+                         break;
+                       }
+                     outbuf[++outchars] = cp[1];
+                   }
+
+                 ++do_write;
+                 ++outchars;
+                 cnt += sizeof (wchar_t);
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outchars;
+
+             if (outchars + extra < data->outbufsize)
+               {
+                 /* If there is still room in the output buffer something
+                    is wrong with the input.  */
+                 if (inwchars >= cnt + sizeof (wchar_t))
+                   {
+                     /* An error occurred.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+                 if (inwchars != cnt)
+                   {
+                     /* There are some unprocessed bytes at the end of the
+                        input buffer.  */
+                     result = GCONV_INCOMPLETE_INPUT;
+                     break;
+                   }
+               }
+           }
+
+         if (result != GCONV_OK)
+           break;
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (*inbufsize > (dir == from_iso6937
+                                     ? 0 : sizeof (wchar_t) - 1)
+                       ? GCONV_FULL_OUTPUT : GCONV_EMPTY_INPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
+         if (data->outbufavail > 0)
+           {
+             /* Call the functions below in the chain.  */
+             size_t newavail = data->outbufavail;
+
+             result = (*fct) (next_step, next_data, data->outbuf, &newavail,
+                              written, 0);
+
+             /* Correct the output buffer.  */
+             if (newavail != data->outbufavail && newavail > 0)
+               {
+                 memmove (data->outbuf,
+                          &data->outbuf[data->outbufavail - newavail],
+                          newavail);
+                 data->outbufavail = newavail;
+               }
+           }
+       }
+      while (*inbufsize > 0 && result == GCONV_EMPTY_INPUT);
+    }
+
+  if (written != NULL && data->is_last)
+    *written = do_write;
+
+  return result;
+}
diff --git a/iconvdata/iso8859-1.c b/iconvdata/iso8859-1.c
new file mode 100644 (file)
index 0000000..94128fe
--- /dev/null
@@ -0,0 +1,219 @@
+/* Conversion to and from ISO 8859-1.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <gconv.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Direction of the transformation.  */
+enum direction
+{
+  illegal,
+  to_iso88591,
+  from_iso88591
+};
+
+struct iso88591_data
+{
+  enum direction dir;
+};
+
+
+int
+gconv_init (struct gconv_step *step, struct gconv_step_data *data)
+{
+  /* Determine which direction.  */
+  struct iso88591_data *new_data;
+  enum direction dir;
+  int result;
+
+  if (__strcasestr (step->from_name, "ISO-8859-1") != NULL)
+    dir = from_iso88591;
+  else if (__strcasestr (step->to_name, "ISO-8859-1") != NULL)
+    dir = to_iso88591;
+  else
+    dir = illegal;
+
+  result = GCONV_NOCONV;
+  if (dir != illegal
+      && ((new_data
+          = (struct iso88591_data *) malloc (sizeof (struct iso88591_data)))
+         != NULL))
+    {
+      new_data->dir = dir;
+      data->data = new_data;
+      result = GCONV_OK;
+    }
+
+  return result;
+}
+
+
+void
+gconv_end (struct gconv_step_data *data)
+{
+  free (data->data);
+}
+
+
+int
+gconv (struct gconv_step *step, struct gconv_step_data *data,
+       const char *inbuf, size_t *inbufsize, size_t *written, int do_flush)
+{
+  struct gconv_step *next_step = step + 1;
+  struct gconv_step_data *next_data = data + 1;
+  gconv_fct fct = next_step->fct;
+  size_t do_write;
+  int result;
+
+  /* If the function is called with no input this means we have to reset
+     to the initial state.  The possibly partly converted input is
+     dropped.  */
+  if (do_flush)
+    {
+      do_write = 0;
+
+      /* Call the steps down the chain if there are any.  */
+      if (data->is_last)
+       result = GCONV_OK;
+      else
+       {
+         struct gconv_step *next_step = step + 1;
+         struct gconv_step_data *next_data = data + 1;
+
+         result = (*fct) (next_step, next_data, NULL, 0, written, 1);
+
+         /* Clear output buffer.  */
+         data->outbufavail = 0;
+       }
+    }
+  else
+    {
+      enum direction dir = ((struct iso88591_data *) data->data)->dir;
+
+      do_write = 0;
+
+      do
+       {
+         result = GCONV_OK;
+
+         if (dir == from_iso88591)
+           {
+             size_t inchars = *inbufsize;
+             size_t outwchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (cnt < inchars
+                    && (outwchars + sizeof (wchar_t) <= data->outbufsize))
+               {
+                 *((wchar_t *) (outbuf + outwchars)) = inbuf[cnt];
+                 ++do_write;
+                 outwchars += sizeof (wchar_t);
+                 ++cnt;
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outwchars;
+           }
+         else
+           {
+             size_t inwchars = *inbufsize;
+             size_t outchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (inwchars >= cnt + sizeof (wchar_t)
+                    && outchars < data->outbufsize)
+               {
+                 if (*((wchar_t *) (inbuf + cnt)) <= L'\377')
+                   outbuf[outchars] = *((wchar_t *) (inbuf + cnt));
+                 else
+                   /* Here is where the transliteration would enter the
+                      scene.  */
+                   break;
+
+                 ++do_write;
+                 ++outchars;
+                 cnt += sizeof (wchar_t);
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outchars;
+
+             if (outchars < data->outbufsize)
+               {
+                 /* If there is still room in the output buffer something
+                    is wrong with the input.  */
+                 if (inwchars >= cnt + sizeof (wchar_t))
+                   {
+                     /* An error occurred.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+                 if (inwchars != cnt)
+                   {
+                     /* There are some unprocessed bytes at the end of the
+                        input buffer.  */
+                     result = GCONV_INCOMPLETE_INPUT;
+                     break;
+                   }
+               }
+           }
+
+         if (result != GCONV_OK)
+           break;
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (*inbufsize > (dir == from_iso88591
+                                     ? 0 : sizeof (wchar_t) - 1)
+                       ? GCONV_FULL_OUTPUT : GCONV_EMPTY_INPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
+         if (data->outbufavail > 0)
+           {
+             /* Call the functions below in the chain.  */
+             size_t newavail = data->outbufavail;
+
+             result = (*fct) (next_step, next_data, data->outbuf, &newavail,
+                              written, 0);
+
+             /* Correct the output buffer.  */
+             if (newavail != data->outbufavail && newavail > 0)
+               {
+                 memmove (data->outbuf,
+                          &data->outbuf[data->outbufavail - newavail],
+                          newavail);
+                 data->outbufavail = newavail;
+               }
+           }
+       }
+      while (*inbufsize > 0 && result == GCONV_EMPTY_INPUT);
+    }
+
+  if (written != NULL && data->is_last)
+    *written = do_write;
+
+  return result;
+}
diff --git a/iconvdata/iso8859-10.c b/iconvdata/iso8859-10.c
new file mode 100644 (file)
index 0000000..5c81214
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-10.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-10.h>
+#define NAME "ISO-8859-10"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-10.h b/iconvdata/iso8859-10.h
new file mode 100644 (file)
index 0000000..04711c3
--- /dev/null
@@ -0,0 +1,516 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x0104,
+  [0xA2] = 0x0112,
+  [0xA3] = 0x0122,
+  [0xA4] = 0x012A,
+  [0xA5] = 0x0128,
+  [0xA6] = 0x0136,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x013B,
+  [0xA9] = 0x0110,
+  [0xAA] = 0x0160,
+  [0xAB] = 0x0166,
+  [0xAC] = 0x017D,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x016A,
+  [0xAF] = 0x014A,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x0105,
+  [0xB2] = 0x0113,
+  [0xB3] = 0x0123,
+  [0xB4] = 0x012B,
+  [0xB5] = 0x0129,
+  [0xB6] = 0x0137,
+  [0xB7] = 0x00B7,
+  [0xB8] = 0x013C,
+  [0xB9] = 0x0111,
+  [0xBA] = 0x0161,
+  [0xBB] = 0x0167,
+  [0xBC] = 0x017E,
+  [0xBD] = 0x2014,
+  [0xBE] = 0x016B,
+  [0xBF] = 0x014B,
+  [0xC0] = 0x0100,
+  [0xC1] = 0x00C1,
+  [0xC2] = 0x00C2,
+  [0xC3] = 0x00C3,
+  [0xC4] = 0x00C4,
+  [0xC5] = 0x00C5,
+  [0xC6] = 0x00C6,
+  [0xC7] = 0x012E,
+  [0xC8] = 0x010C,
+  [0xC9] = 0x00C9,
+  [0xCA] = 0x0118,
+  [0xCB] = 0x00CB,
+  [0xCC] = 0x0116,
+  [0xCD] = 0x00CD,
+  [0xCE] = 0x00CE,
+  [0xCF] = 0x00CF,
+  [0xD0] = 0x00D0,
+  [0xD1] = 0x0145,
+  [0xD2] = 0x014C,
+  [0xD3] = 0x00D3,
+  [0xD4] = 0x00D4,
+  [0xD5] = 0x00D5,
+  [0xD6] = 0x00D6,
+  [0xD7] = 0x0168,
+  [0xD8] = 0x00D8,
+  [0xD9] = 0x0172,
+  [0xDA] = 0x00DA,
+  [0xDB] = 0x00DB,
+  [0xDC] = 0x00DC,
+  [0xDD] = 0x00DD,
+  [0xDE] = 0x00DE,
+  [0xDF] = 0x00DF,
+  [0xE0] = 0x0101,
+  [0xE1] = 0x00E1,
+  [0xE2] = 0x00E2,
+  [0xE3] = 0x00E3,
+  [0xE4] = 0x00E4,
+  [0xE5] = 0x00E5,
+  [0xE6] = 0x00E6,
+  [0xE7] = 0x012F,
+  [0xE8] = 0x010D,
+  [0xE9] = 0x00E9,
+  [0xEA] = 0x0119,
+  [0xEB] = 0x00EB,
+  [0xEC] = 0x0117,
+  [0xED] = 0x00ED,
+  [0xEE] = 0x00EE,
+  [0xEF] = 0x00EF,
+  [0xF0] = 0x00F0,
+  [0xF1] = 0x0146,
+  [0xF2] = 0x014D,
+  [0xF3] = 0x00F3,
+  [0xF4] = 0x00F4,
+  [0xF5] = 0x00F5,
+  [0xF6] = 0x00F6,
+  [0xF7] = 0x0169,
+  [0xF8] = 0x00F8,
+  [0xF9] = 0x0173,
+  [0xFA] = 0x00FA,
+  [0xFB] = 0x00FB,
+  [0xFC] = 0x00FC,
+  [0xFD] = 0x00FD,
+  [0xFE] = 0x00FE,
+  [0xFF] = 0x0138,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A7] = 0xA7,
+  [0x00AD] = 0xAD,
+  [0x00B0] = 0xB0,
+  [0x00B7] = 0xB7,
+  [0x00C1] = 0xC1,
+  [0x00C2] = 0xC2,
+  [0x00C3] = 0xC3,
+  [0x00C4] = 0xC4,
+  [0x00C5] = 0xC5,
+  [0x00C6] = 0xC6,
+  [0x00C9] = 0xC9,
+  [0x00CB] = 0xCB,
+  [0x00CD] = 0xCD,
+  [0x00CE] = 0xCE,
+  [0x00CF] = 0xCF,
+  [0x00D0] = 0xD0,
+  [0x00D3] = 0xD3,
+  [0x00D4] = 0xD4,
+  [0x00D5] = 0xD5,
+  [0x00D6] = 0xD6,
+  [0x00D8] = 0xD8,
+  [0x00DA] = 0xDA,
+  [0x00DB] = 0xDB,
+  [0x00DC] = 0xDC,
+  [0x00DD] = 0xDD,
+  [0x00DE] = 0xDE,
+  [0x00DF] = 0xDF,
+  [0x00E1] = 0xE1,
+  [0x00E2] = 0xE2,
+  [0x00E3] = 0xE3,
+  [0x00E4] = 0xE4,
+  [0x00E5] = 0xE5,
+  [0x00E6] = 0xE6,
+  [0x00E9] = 0xE9,
+  [0x00EB] = 0xEB,
+  [0x00ED] = 0xED,
+  [0x00EE] = 0xEE,
+  [0x00EF] = 0xEF,
+  [0x00F0] = 0xF0,
+  [0x00F3] = 0xF3,
+  [0x00F4] = 0xF4,
+  [0x00F5] = 0xF5,
+  [0x00F6] = 0xF6,
+  [0x00F8] = 0xF8,
+  [0x00FA] = 0xFA,
+  [0x00FB] = 0xFB,
+  [0x00FC] = 0xFC,
+  [0x00FD] = 0xFD,
+  [0x00FE] = 0xFE,
+  [0x0100] = 0xC0,
+  [0x0101] = 0xE0,
+  [0x0104] = 0xA1,
+  [0x0105] = 0xB1,
+  [0x010C] = 0xC8,
+  [0x010D] = 0xE8,
+  [0x0110] = 0xA9,
+  [0x0111] = 0xB9,
+  [0x0112] = 0xA2,
+  [0x0113] = 0xB2,
+  [0x0116] = 0xCC,
+  [0x0117] = 0xEC,
+  [0x0118] = 0xCA,
+  [0x0119] = 0xEA,
+  [0x0122] = 0xA3,
+  [0x0123] = 0xB3,
+  [0x0128] = 0xA5,
+  [0x0129] = 0xB5,
+  [0x012A] = 0xA4,
+  [0x012B] = 0xB4,
+  [0x012E] = 0xC7,
+  [0x012F] = 0xE7,
+  [0x0136] = 0xA6,
+  [0x0137] = 0xB6,
+  [0x0138] = 0xFF,
+  [0x013B] = 0xA8,
+  [0x013C] = 0xB8,
+  [0x0145] = 0xD1,
+  [0x0146] = 0xF1,
+  [0x014A] = 0xAF,
+  [0x014B] = 0xBF,
+  [0x014C] = 0xD2,
+  [0x014D] = 0xF2,
+  [0x0160] = 0xAA,
+  [0x0161] = 0xBA,
+  [0x0166] = 0xAB,
+  [0x0167] = 0xBB,
+  [0x0168] = 0xD7,
+  [0x0169] = 0xF7,
+  [0x016A] = 0xAE,
+  [0x016B] = 0xBE,
+  [0x0172] = 0xD9,
+  [0x0173] = 0xF9,
+  [0x017D] = 0xAC,
+  [0x017E] = 0xBC,
+  [0x2014] = 0xBD,
+};
diff --git a/iconvdata/iso8859-2.c b/iconvdata/iso8859-2.c
new file mode 100644 (file)
index 0000000..3bfc77b
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-2.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-2.h>
+#define NAME "ISO-8859-2"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-2.h b/iconvdata/iso8859-2.h
new file mode 100644 (file)
index 0000000..515d849
--- /dev/null
@@ -0,0 +1,516 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x0104,
+  [0xA2] = 0x02D8,
+  [0xA3] = 0x0141,
+  [0xA4] = 0x00A4,
+  [0xA5] = 0x013D,
+  [0xA6] = 0x015A,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x0160,
+  [0xAA] = 0x015E,
+  [0xAB] = 0x0164,
+  [0xAC] = 0x0179,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x017D,
+  [0xAF] = 0x017B,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x0105,
+  [0xB2] = 0x02DB,
+  [0xB3] = 0x0142,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x013E,
+  [0xB6] = 0x015B,
+  [0xB7] = 0x02C7,
+  [0xB8] = 0x00B8,
+  [0xB9] = 0x0161,
+  [0xBA] = 0x015F,
+  [0xBB] = 0x0165,
+  [0xBC] = 0x017A,
+  [0xBD] = 0x02DD,
+  [0xBE] = 0x017E,
+  [0xBF] = 0x017C,
+  [0xC0] = 0x0154,
+  [0xC1] = 0x00C1,
+  [0xC2] = 0x00C2,
+  [0xC3] = 0x0102,
+  [0xC4] = 0x00C4,
+  [0xC5] = 0x0139,
+  [0xC6] = 0x0106,
+  [0xC7] = 0x00C7,
+  [0xC8] = 0x010C,
+  [0xC9] = 0x00C9,
+  [0xCA] = 0x0118,
+  [0xCB] = 0x00CB,
+  [0xCC] = 0x011A,
+  [0xCD] = 0x00CD,
+  [0xCE] = 0x00CE,
+  [0xCF] = 0x010E,
+  [0xD0] = 0x0110,
+  [0xD1] = 0x0143,
+  [0xD2] = 0x0147,
+  [0xD3] = 0x00D3,
+  [0xD4] = 0x00D4,
+  [0xD5] = 0x0150,
+  [0xD6] = 0x00D6,
+  [0xD7] = 0x00D7,
+  [0xD8] = 0x0158,
+  [0xD9] = 0x016E,
+  [0xDA] = 0x00DA,
+  [0xDB] = 0x0170,
+  [0xDC] = 0x00DC,
+  [0xDD] = 0x00DD,
+  [0xDE] = 0x0162,
+  [0xDF] = 0x00DF,
+  [0xE0] = 0x0155,
+  [0xE1] = 0x00E1,
+  [0xE2] = 0x00E2,
+  [0xE3] = 0x0103,
+  [0xE4] = 0x00E4,
+  [0xE5] = 0x013A,
+  [0xE6] = 0x0107,
+  [0xE7] = 0x00E7,
+  [0xE8] = 0x010D,
+  [0xE9] = 0x00E9,
+  [0xEA] = 0x0119,
+  [0xEB] = 0x00EB,
+  [0xEC] = 0x011B,
+  [0xED] = 0x00ED,
+  [0xEE] = 0x00EE,
+  [0xEF] = 0x010F,
+  [0xF0] = 0x0111,
+  [0xF1] = 0x0144,
+  [0xF2] = 0x0148,
+  [0xF3] = 0x00F3,
+  [0xF4] = 0x00F4,
+  [0xF5] = 0x0151,
+  [0xF6] = 0x00F6,
+  [0xF7] = 0x00F7,
+  [0xF8] = 0x0159,
+  [0xF9] = 0x016F,
+  [0xFA] = 0x00FA,
+  [0xFB] = 0x0171,
+  [0xFC] = 0x00FC,
+  [0xFD] = 0x00FD,
+  [0xFE] = 0x0163,
+  [0xFF] = 0x02D9,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A4] = 0xA4,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00AD] = 0xAD,
+  [0x00B0] = 0xB0,
+  [0x00B4] = 0xB4,
+  [0x00B8] = 0xB8,
+  [0x00C1] = 0xC1,
+  [0x00C2] = 0xC2,
+  [0x00C4] = 0xC4,
+  [0x00C7] = 0xC7,
+  [0x00C9] = 0xC9,
+  [0x00CB] = 0xCB,
+  [0x00CD] = 0xCD,
+  [0x00CE] = 0xCE,
+  [0x00D3] = 0xD3,
+  [0x00D4] = 0xD4,
+  [0x00D6] = 0xD6,
+  [0x00D7] = 0xD7,
+  [0x00DA] = 0xDA,
+  [0x00DC] = 0xDC,
+  [0x00DD] = 0xDD,
+  [0x00DF] = 0xDF,
+  [0x00E1] = 0xE1,
+  [0x00E2] = 0xE2,
+  [0x00E4] = 0xE4,
+  [0x00E7] = 0xE7,
+  [0x00E9] = 0xE9,
+  [0x00EB] = 0xEB,
+  [0x00ED] = 0xED,
+  [0x00EE] = 0xEE,
+  [0x00F3] = 0xF3,
+  [0x00F4] = 0xF4,
+  [0x00F6] = 0xF6,
+  [0x00F7] = 0xF7,
+  [0x00FA] = 0xFA,
+  [0x00FC] = 0xFC,
+  [0x00FD] = 0xFD,
+  [0x0102] = 0xC3,
+  [0x0103] = 0xE3,
+  [0x0104] = 0xA1,
+  [0x0105] = 0xB1,
+  [0x0106] = 0xC6,
+  [0x0107] = 0xE6,
+  [0x010C] = 0xC8,
+  [0x010D] = 0xE8,
+  [0x010E] = 0xCF,
+  [0x010F] = 0xEF,
+  [0x0110] = 0xD0,
+  [0x0111] = 0xF0,
+  [0x0118] = 0xCA,
+  [0x0119] = 0xEA,
+  [0x011A] = 0xCC,
+  [0x011B] = 0xEC,
+  [0x0139] = 0xC5,
+  [0x013A] = 0xE5,
+  [0x013D] = 0xA5,
+  [0x013E] = 0xB5,
+  [0x0141] = 0xA3,
+  [0x0142] = 0xB3,
+  [0x0143] = 0xD1,
+  [0x0144] = 0xF1,
+  [0x0147] = 0xD2,
+  [0x0148] = 0xF2,
+  [0x0150] = 0xD5,
+  [0x0151] = 0xF5,
+  [0x0154] = 0xC0,
+  [0x0155] = 0xE0,
+  [0x0158] = 0xD8,
+  [0x0159] = 0xF8,
+  [0x015A] = 0xA6,
+  [0x015B] = 0xB6,
+  [0x015E] = 0xAA,
+  [0x015F] = 0xBA,
+  [0x0160] = 0xA9,
+  [0x0161] = 0xB9,
+  [0x0162] = 0xDE,
+  [0x0163] = 0xFE,
+  [0x0164] = 0xAB,
+  [0x0165] = 0xBB,
+  [0x016E] = 0xD9,
+  [0x016F] = 0xF9,
+  [0x0170] = 0xDB,
+  [0x0171] = 0xFB,
+  [0x0179] = 0xAC,
+  [0x017A] = 0xBC,
+  [0x017B] = 0xAF,
+  [0x017C] = 0xBF,
+  [0x017D] = 0xAE,
+  [0x017E] = 0xBE,
+  [0x02C7] = 0xB7,
+  [0x02D8] = 0xA2,
+  [0x02D9] = 0xFF,
+  [0x02DB] = 0xB2,
+  [0x02DD] = 0xBD,
+};
diff --git a/iconvdata/iso8859-3.c b/iconvdata/iso8859-3.c
new file mode 100644 (file)
index 0000000..a6b208d
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-3.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-3.h>
+#define NAME "ISO-8859-3"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-3.h b/iconvdata/iso8859-3.h
new file mode 100644 (file)
index 0000000..f9e6325
--- /dev/null
@@ -0,0 +1,502 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x0126,
+  [0xA2] = 0x02D8,
+  [0xA3] = 0x00A3,
+  [0xA4] = 0x00A4,
+  [0xA6] = 0x0124,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x0130,
+  [0xAA] = 0x015E,
+  [0xAB] = 0x011E,
+  [0xAC] = 0x0134,
+  [0xAD] = 0x00AD,
+  [0xAF] = 0x017B,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x0127,
+  [0xB2] = 0x00B2,
+  [0xB3] = 0x00B3,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x00B5,
+  [0xB6] = 0x0125,
+  [0xB7] = 0x00B7,
+  [0xB8] = 0x00B8,
+  [0xB9] = 0x0131,
+  [0xBA] = 0x015F,
+  [0xBB] = 0x011F,
+  [0xBC] = 0x0135,
+  [0xBD] = 0x00BD,
+  [0xBF] = 0x017C,
+  [0xC0] = 0x00C0,
+  [0xC1] = 0x00C1,
+  [0xC2] = 0x00C2,
+  [0xC4] = 0x00C4,
+  [0xC5] = 0x010A,
+  [0xC6] = 0x0108,
+  [0xC7] = 0x00C7,
+  [0xC8] = 0x00C8,
+  [0xC9] = 0x00C9,
+  [0xCA] = 0x00CA,
+  [0xCB] = 0x00CB,
+  [0xCC] = 0x00CC,
+  [0xCD] = 0x00CD,
+  [0xCE] = 0x00CE,
+  [0xCF] = 0x00CF,
+  [0xD1] = 0x00D1,
+  [0xD2] = 0x00D2,
+  [0xD3] = 0x00D3,
+  [0xD4] = 0x00D4,
+  [0xD5] = 0x0120,
+  [0xD6] = 0x00D6,
+  [0xD7] = 0x00D7,
+  [0xD8] = 0x011C,
+  [0xD9] = 0x00D9,
+  [0xDA] = 0x00DA,
+  [0xDB] = 0x00DB,
+  [0xDC] = 0x00DC,
+  [0xDD] = 0x016C,
+  [0xDE] = 0x015C,
+  [0xDF] = 0x00DF,
+  [0xE0] = 0x00E0,
+  [0xE1] = 0x00E1,
+  [0xE2] = 0x00E2,
+  [0xE4] = 0x00E4,
+  [0xE5] = 0x010B,
+  [0xE6] = 0x0109,
+  [0xE7] = 0x00E7,
+  [0xE8] = 0x00E8,
+  [0xE9] = 0x00E9,
+  [0xEA] = 0x00EA,
+  [0xEB] = 0x00EB,
+  [0xEC] = 0x00EC,
+  [0xED] = 0x00ED,
+  [0xEE] = 0x00EE,
+  [0xEF] = 0x00EF,
+  [0xF1] = 0x00F1,
+  [0xF2] = 0x00F2,
+  [0xF3] = 0x00F3,
+  [0xF4] = 0x00F4,
+  [0xF5] = 0x0121,
+  [0xF6] = 0x00F6,
+  [0xF7] = 0x00F7,
+  [0xF8] = 0x011D,
+  [0xF9] = 0x00F9,
+  [0xFA] = 0x00FA,
+  [0xFB] = 0x00FB,
+  [0xFC] = 0x00FC,
+  [0xFD] = 0x016D,
+  [0xFE] = 0x015D,
+  [0xFF] = 0x02D9,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A3] = 0xA3,
+  [0x00A4] = 0xA4,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00AD] = 0xAD,
+  [0x00B0] = 0xB0,
+  [0x00B2] = 0xB2,
+  [0x00B3] = 0xB3,
+  [0x00B4] = 0xB4,
+  [0x00B5] = 0xB5,
+  [0x00B7] = 0xB7,
+  [0x00B8] = 0xB8,
+  [0x00BD] = 0xBD,
+  [0x00C0] = 0xC0,
+  [0x00C1] = 0xC1,
+  [0x00C2] = 0xC2,
+  [0x00C4] = 0xC4,
+  [0x00C7] = 0xC7,
+  [0x00C8] = 0xC8,
+  [0x00C9] = 0xC9,
+  [0x00CA] = 0xCA,
+  [0x00CB] = 0xCB,
+  [0x00CC] = 0xCC,
+  [0x00CD] = 0xCD,
+  [0x00CE] = 0xCE,
+  [0x00CF] = 0xCF,
+  [0x00D1] = 0xD1,
+  [0x00D2] = 0xD2,
+  [0x00D3] = 0xD3,
+  [0x00D4] = 0xD4,
+  [0x00D6] = 0xD6,
+  [0x00D7] = 0xD7,
+  [0x00D9] = 0xD9,
+  [0x00DA] = 0xDA,
+  [0x00DB] = 0xDB,
+  [0x00DC] = 0xDC,
+  [0x00DF] = 0xDF,
+  [0x00E0] = 0xE0,
+  [0x00E1] = 0xE1,
+  [0x00E2] = 0xE2,
+  [0x00E4] = 0xE4,
+  [0x00E7] = 0xE7,
+  [0x00E8] = 0xE8,
+  [0x00E9] = 0xE9,
+  [0x00EA] = 0xEA,
+  [0x00EB] = 0xEB,
+  [0x00EC] = 0xEC,
+  [0x00ED] = 0xED,
+  [0x00EE] = 0xEE,
+  [0x00EF] = 0xEF,
+  [0x00F1] = 0xF1,
+  [0x00F2] = 0xF2,
+  [0x00F3] = 0xF3,
+  [0x00F4] = 0xF4,
+  [0x00F6] = 0xF6,
+  [0x00F7] = 0xF7,
+  [0x00F9] = 0xF9,
+  [0x00FA] = 0xFA,
+  [0x00FB] = 0xFB,
+  [0x00FC] = 0xFC,
+  [0x0108] = 0xC6,
+  [0x0109] = 0xE6,
+  [0x010A] = 0xC5,
+  [0x010B] = 0xE5,
+  [0x011C] = 0xD8,
+  [0x011D] = 0xF8,
+  [0x011E] = 0xAB,
+  [0x011F] = 0xBB,
+  [0x0120] = 0xD5,
+  [0x0121] = 0xF5,
+  [0x0124] = 0xA6,
+  [0x0125] = 0xB6,
+  [0x0126] = 0xA1,
+  [0x0127] = 0xB1,
+  [0x0130] = 0xA9,
+  [0x0131] = 0xB9,
+  [0x0134] = 0xAC,
+  [0x0135] = 0xBC,
+  [0x015C] = 0xDE,
+  [0x015D] = 0xFE,
+  [0x015E] = 0xAA,
+  [0x015F] = 0xBA,
+  [0x016C] = 0xDD,
+  [0x016D] = 0xFD,
+  [0x017B] = 0xAF,
+  [0x017C] = 0xBF,
+  [0x02D8] = 0xA2,
+  [0x02D9] = 0xFF,
+};
diff --git a/iconvdata/iso8859-4.c b/iconvdata/iso8859-4.c
new file mode 100644 (file)
index 0000000..b2b6ef0
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-4.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-4.h>
+#define NAME "ISO-8859-4"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-4.h b/iconvdata/iso8859-4.h
new file mode 100644 (file)
index 0000000..acf4aaa
--- /dev/null
@@ -0,0 +1,516 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x0104,
+  [0xA2] = 0x0138,
+  [0xA3] = 0x0156,
+  [0xA4] = 0x00A4,
+  [0xA5] = 0x0128,
+  [0xA6] = 0x013B,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x0160,
+  [0xAA] = 0x0112,
+  [0xAB] = 0x0122,
+  [0xAC] = 0x0166,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x017D,
+  [0xAF] = 0x00AF,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x0105,
+  [0xB2] = 0x02DB,
+  [0xB3] = 0x0157,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x0129,
+  [0xB6] = 0x013C,
+  [0xB7] = 0x02C7,
+  [0xB8] = 0x00B8,
+  [0xB9] = 0x0161,
+  [0xBA] = 0x0113,
+  [0xBB] = 0x0123,
+  [0xBC] = 0x0167,
+  [0xBD] = 0x014A,
+  [0xBE] = 0x017E,
+  [0xBF] = 0x014B,
+  [0xC0] = 0x0100,
+  [0xC1] = 0x00C1,
+  [0xC2] = 0x00C2,
+  [0xC3] = 0x00C3,
+  [0xC4] = 0x00C4,
+  [0xC5] = 0x00C5,
+  [0xC6] = 0x00C6,
+  [0xC7] = 0x012E,
+  [0xC8] = 0x010C,
+  [0xC9] = 0x00C9,
+  [0xCA] = 0x0118,
+  [0xCB] = 0x00CB,
+  [0xCC] = 0x0116,
+  [0xCD] = 0x00CD,
+  [0xCE] = 0x00CE,
+  [0xCF] = 0x012A,
+  [0xD0] = 0x0110,
+  [0xD1] = 0x0145,
+  [0xD2] = 0x014C,
+  [0xD3] = 0x0136,
+  [0xD4] = 0x00D4,
+  [0xD5] = 0x00D5,
+  [0xD6] = 0x00D6,
+  [0xD7] = 0x00D7,
+  [0xD8] = 0x00D8,
+  [0xD9] = 0x0172,
+  [0xDA] = 0x00DA,
+  [0xDB] = 0x00DB,
+  [0xDC] = 0x00DC,
+  [0xDD] = 0x0168,
+  [0xDE] = 0x016A,
+  [0xDF] = 0x00DF,
+  [0xE0] = 0x0101,
+  [0xE1] = 0x00E1,
+  [0xE2] = 0x00E2,
+  [0xE3] = 0x00E3,
+  [0xE4] = 0x00E4,
+  [0xE5] = 0x00E5,
+  [0xE6] = 0x00E6,
+  [0xE7] = 0x012F,
+  [0xE8] = 0x010D,
+  [0xE9] = 0x00E9,
+  [0xEA] = 0x0119,
+  [0xEB] = 0x00EB,
+  [0xEC] = 0x0117,
+  [0xED] = 0x00ED,
+  [0xEE] = 0x00EE,
+  [0xEF] = 0x012B,
+  [0xF0] = 0x0111,
+  [0xF1] = 0x0146,
+  [0xF2] = 0x014D,
+  [0xF3] = 0x0137,
+  [0xF4] = 0x00F4,
+  [0xF5] = 0x00F5,
+  [0xF6] = 0x00F6,
+  [0xF7] = 0x00F7,
+  [0xF8] = 0x00F8,
+  [0xF9] = 0x0173,
+  [0xFA] = 0x00FA,
+  [0xFB] = 0x00FB,
+  [0xFC] = 0x00FC,
+  [0xFD] = 0x0169,
+  [0xFE] = 0x016B,
+  [0xFF] = 0x02D9,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A4] = 0xA4,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00AD] = 0xAD,
+  [0x00AF] = 0xAF,
+  [0x00B0] = 0xB0,
+  [0x00B4] = 0xB4,
+  [0x00B8] = 0xB8,
+  [0x00C1] = 0xC1,
+  [0x00C2] = 0xC2,
+  [0x00C3] = 0xC3,
+  [0x00C4] = 0xC4,
+  [0x00C5] = 0xC5,
+  [0x00C6] = 0xC6,
+  [0x00C9] = 0xC9,
+  [0x00CB] = 0xCB,
+  [0x00CD] = 0xCD,
+  [0x00CE] = 0xCE,
+  [0x00D4] = 0xD4,
+  [0x00D5] = 0xD5,
+  [0x00D6] = 0xD6,
+  [0x00D7] = 0xD7,
+  [0x00D8] = 0xD8,
+  [0x00DA] = 0xDA,
+  [0x00DB] = 0xDB,
+  [0x00DC] = 0xDC,
+  [0x00DF] = 0xDF,
+  [0x00E1] = 0xE1,
+  [0x00E2] = 0xE2,
+  [0x00E3] = 0xE3,
+  [0x00E4] = 0xE4,
+  [0x00E5] = 0xE5,
+  [0x00E6] = 0xE6,
+  [0x00E9] = 0xE9,
+  [0x00EB] = 0xEB,
+  [0x00ED] = 0xED,
+  [0x00EE] = 0xEE,
+  [0x00F4] = 0xF4,
+  [0x00F5] = 0xF5,
+  [0x00F6] = 0xF6,
+  [0x00F7] = 0xF7,
+  [0x00F8] = 0xF8,
+  [0x00FA] = 0xFA,
+  [0x00FB] = 0xFB,
+  [0x00FC] = 0xFC,
+  [0x0100] = 0xC0,
+  [0x0101] = 0xE0,
+  [0x0104] = 0xA1,
+  [0x0105] = 0xB1,
+  [0x010C] = 0xC8,
+  [0x010D] = 0xE8,
+  [0x0110] = 0xD0,
+  [0x0111] = 0xF0,
+  [0x0112] = 0xAA,
+  [0x0113] = 0xBA,
+  [0x0116] = 0xCC,
+  [0x0117] = 0xEC,
+  [0x0118] = 0xCA,
+  [0x0119] = 0xEA,
+  [0x0122] = 0xAB,
+  [0x0123] = 0xBB,
+  [0x0128] = 0xA5,
+  [0x0129] = 0xB5,
+  [0x012A] = 0xCF,
+  [0x012B] = 0xEF,
+  [0x012E] = 0xC7,
+  [0x012F] = 0xE7,
+  [0x0136] = 0xD3,
+  [0x0137] = 0xF3,
+  [0x0138] = 0xA2,
+  [0x013B] = 0xA6,
+  [0x013C] = 0xB6,
+  [0x0145] = 0xD1,
+  [0x0146] = 0xF1,
+  [0x014A] = 0xBD,
+  [0x014B] = 0xBF,
+  [0x014C] = 0xD2,
+  [0x014D] = 0xF2,
+  [0x0156] = 0xA3,
+  [0x0157] = 0xB3,
+  [0x0160] = 0xA9,
+  [0x0161] = 0xB9,
+  [0x0166] = 0xAC,
+  [0x0167] = 0xBC,
+  [0x0168] = 0xDD,
+  [0x0169] = 0xFD,
+  [0x016A] = 0xDE,
+  [0x016B] = 0xFE,
+  [0x0172] = 0xD9,
+  [0x0173] = 0xF9,
+  [0x017D] = 0xAE,
+  [0x017E] = 0xBE,
+  [0x02C7] = 0xB7,
+  [0x02D9] = 0xFF,
+  [0x02DB] = 0xB2,
+};
diff --git a/iconvdata/iso8859-5.c b/iconvdata/iso8859-5.c
new file mode 100644 (file)
index 0000000..b0ebd6f
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-5.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-5.h>
+#define NAME "ISO-8859-5"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-5.h b/iconvdata/iso8859-5.h
new file mode 100644 (file)
index 0000000..f20ce11
--- /dev/null
@@ -0,0 +1,516 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x0401,
+  [0xA2] = 0x0402,
+  [0xA3] = 0x0403,
+  [0xA4] = 0x0404,
+  [0xA5] = 0x0405,
+  [0xA6] = 0x0406,
+  [0xA7] = 0x0407,
+  [0xA8] = 0x0408,
+  [0xA9] = 0x0409,
+  [0xAA] = 0x040A,
+  [0xAB] = 0x040B,
+  [0xAC] = 0x040C,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x040E,
+  [0xAF] = 0x040F,
+  [0xB0] = 0x0410,
+  [0xB1] = 0x0411,
+  [0xB2] = 0x0412,
+  [0xB3] = 0x0413,
+  [0xB4] = 0x0414,
+  [0xB5] = 0x0415,
+  [0xB6] = 0x0416,
+  [0xB7] = 0x0417,
+  [0xB8] = 0x0418,
+  [0xB9] = 0x0419,
+  [0xBA] = 0x041A,
+  [0xBB] = 0x041B,
+  [0xBC] = 0x041C,
+  [0xBD] = 0x041D,
+  [0xBE] = 0x041E,
+  [0xBF] = 0x041F,
+  [0xC0] = 0x0420,
+  [0xC1] = 0x0421,
+  [0xC2] = 0x0422,
+  [0xC3] = 0x0423,
+  [0xC4] = 0x0424,
+  [0xC5] = 0x0425,
+  [0xC6] = 0x0426,
+  [0xC7] = 0x0427,
+  [0xC8] = 0x0428,
+  [0xC9] = 0x0429,
+  [0xCA] = 0x042A,
+  [0xCB] = 0x042B,
+  [0xCC] = 0x042C,
+  [0xCD] = 0x042D,
+  [0xCE] = 0x042E,
+  [0xCF] = 0x042F,
+  [0xD0] = 0x0430,
+  [0xD1] = 0x0431,
+  [0xD2] = 0x0432,
+  [0xD3] = 0x0433,
+  [0xD4] = 0x0434,
+  [0xD5] = 0x0435,
+  [0xD6] = 0x0436,
+  [0xD7] = 0x0437,
+  [0xD8] = 0x0438,
+  [0xD9] = 0x0439,
+  [0xDA] = 0x043A,
+  [0xDB] = 0x043B,
+  [0xDC] = 0x043C,
+  [0xDD] = 0x043D,
+  [0xDE] = 0x043E,
+  [0xDF] = 0x043F,
+  [0xE0] = 0x0440,
+  [0xE1] = 0x0441,
+  [0xE2] = 0x0442,
+  [0xE3] = 0x0443,
+  [0xE4] = 0x0444,
+  [0xE5] = 0x0445,
+  [0xE6] = 0x0446,
+  [0xE7] = 0x0447,
+  [0xE8] = 0x0448,
+  [0xE9] = 0x0449,
+  [0xEA] = 0x044A,
+  [0xEB] = 0x044B,
+  [0xEC] = 0x044C,
+  [0xED] = 0x044D,
+  [0xEE] = 0x044E,
+  [0xEF] = 0x044F,
+  [0xF0] = 0x2116,
+  [0xF1] = 0x0451,
+  [0xF2] = 0x0452,
+  [0xF3] = 0x0453,
+  [0xF4] = 0x0454,
+  [0xF5] = 0x0455,
+  [0xF6] = 0x0456,
+  [0xF7] = 0x0457,
+  [0xF8] = 0x0458,
+  [0xF9] = 0x0459,
+  [0xFA] = 0x045A,
+  [0xFB] = 0x045B,
+  [0xFC] = 0x045C,
+  [0xFD] = 0x00A7,
+  [0xFE] = 0x045E,
+  [0xFF] = 0x045F,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A7] = 0xFD,
+  [0x00AD] = 0xAD,
+  [0x0401] = 0xA1,
+  [0x0402] = 0xA2,
+  [0x0403] = 0xA3,
+  [0x0404] = 0xA4,
+  [0x0405] = 0xA5,
+  [0x0406] = 0xA6,
+  [0x0407] = 0xA7,
+  [0x0408] = 0xA8,
+  [0x0409] = 0xA9,
+  [0x040A] = 0xAA,
+  [0x040B] = 0xAB,
+  [0x040C] = 0xAC,
+  [0x040E] = 0xAE,
+  [0x040F] = 0xAF,
+  [0x0410] = 0xB0,
+  [0x0411] = 0xB1,
+  [0x0412] = 0xB2,
+  [0x0413] = 0xB3,
+  [0x0414] = 0xB4,
+  [0x0415] = 0xB5,
+  [0x0416] = 0xB6,
+  [0x0417] = 0xB7,
+  [0x0418] = 0xB8,
+  [0x0419] = 0xB9,
+  [0x041A] = 0xBA,
+  [0x041B] = 0xBB,
+  [0x041C] = 0xBC,
+  [0x041D] = 0xBD,
+  [0x041E] = 0xBE,
+  [0x041F] = 0xBF,
+  [0x0420] = 0xC0,
+  [0x0421] = 0xC1,
+  [0x0422] = 0xC2,
+  [0x0423] = 0xC3,
+  [0x0424] = 0xC4,
+  [0x0425] = 0xC5,
+  [0x0426] = 0xC6,
+  [0x0427] = 0xC7,
+  [0x0428] = 0xC8,
+  [0x0429] = 0xC9,
+  [0x042A] = 0xCA,
+  [0x042B] = 0xCB,
+  [0x042C] = 0xCC,
+  [0x042D] = 0xCD,
+  [0x042E] = 0xCE,
+  [0x042F] = 0xCF,
+  [0x0430] = 0xD0,
+  [0x0431] = 0xD1,
+  [0x0432] = 0xD2,
+  [0x0433] = 0xD3,
+  [0x0434] = 0xD4,
+  [0x0435] = 0xD5,
+  [0x0436] = 0xD6,
+  [0x0437] = 0xD7,
+  [0x0438] = 0xD8,
+  [0x0439] = 0xD9,
+  [0x043A] = 0xDA,
+  [0x043B] = 0xDB,
+  [0x043C] = 0xDC,
+  [0x043D] = 0xDD,
+  [0x043E] = 0xDE,
+  [0x043F] = 0xDF,
+  [0x0440] = 0xE0,
+  [0x0441] = 0xE1,
+  [0x0442] = 0xE2,
+  [0x0443] = 0xE3,
+  [0x0444] = 0xE4,
+  [0x0445] = 0xE5,
+  [0x0446] = 0xE6,
+  [0x0447] = 0xE7,
+  [0x0448] = 0xE8,
+  [0x0449] = 0xE9,
+  [0x044A] = 0xEA,
+  [0x044B] = 0xEB,
+  [0x044C] = 0xEC,
+  [0x044D] = 0xED,
+  [0x044E] = 0xEE,
+  [0x044F] = 0xEF,
+  [0x0451] = 0xF1,
+  [0x0452] = 0xF2,
+  [0x0453] = 0xF3,
+  [0x0454] = 0xF4,
+  [0x0455] = 0xF5,
+  [0x0456] = 0xF6,
+  [0x0457] = 0xF7,
+  [0x0458] = 0xF8,
+  [0x0459] = 0xF9,
+  [0x045A] = 0xFA,
+  [0x045B] = 0xFB,
+  [0x045C] = 0xFC,
+  [0x045E] = 0xFE,
+  [0x045F] = 0xFF,
+  [0x2116] = 0xF0,
+};
diff --git a/iconvdata/iso8859-6.c b/iconvdata/iso8859-6.c
new file mode 100644 (file)
index 0000000..f0f0a91
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-6.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-6.h>
+#define NAME "ISO-8859-6"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-6.h b/iconvdata/iso8859-6.h
new file mode 100644 (file)
index 0000000..f3b3480
--- /dev/null
@@ -0,0 +1,426 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA4] = 0x00A4,
+  [0xAC] = 0x060C,
+  [0xAD] = 0x00AD,
+  [0xBB] = 0x061B,
+  [0xBF] = 0x061F,
+  [0xC1] = 0x0621,
+  [0xC2] = 0x0622,
+  [0xC3] = 0x0623,
+  [0xC4] = 0x0624,
+  [0xC5] = 0x0625,
+  [0xC6] = 0x0626,
+  [0xC7] = 0x0627,
+  [0xC8] = 0x0628,
+  [0xC9] = 0x0629,
+  [0xCA] = 0x062A,
+  [0xCB] = 0x062B,
+  [0xCC] = 0x062C,
+  [0xCD] = 0x062D,
+  [0xCE] = 0x062E,
+  [0xCF] = 0x062F,
+  [0xD0] = 0x0630,
+  [0xD1] = 0x0631,
+  [0xD2] = 0x0632,
+  [0xD3] = 0x0633,
+  [0xD4] = 0x0634,
+  [0xD5] = 0x0635,
+  [0xD6] = 0x0636,
+  [0xD7] = 0x0637,
+  [0xD8] = 0x0638,
+  [0xD9] = 0x0639,
+  [0xDA] = 0x063A,
+  [0xE0] = 0x0640,
+  [0xE1] = 0x0641,
+  [0xE2] = 0x0642,
+  [0xE3] = 0x0643,
+  [0xE4] = 0x0644,
+  [0xE5] = 0x0645,
+  [0xE6] = 0x0646,
+  [0xE7] = 0x0647,
+  [0xE8] = 0x0648,
+  [0xE9] = 0x0649,
+  [0xEA] = 0x064A,
+  [0xEB] = 0x064B,
+  [0xEC] = 0x064C,
+  [0xED] = 0x064D,
+  [0xEE] = 0x064E,
+  [0xEF] = 0x064F,
+  [0xF0] = 0x0650,
+  [0xF1] = 0x0651,
+  [0xF2] = 0x0652,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A4] = 0xA4,
+  [0x00AD] = 0xAD,
+  [0x060C] = 0xAC,
+  [0x061B] = 0xBB,
+  [0x061F] = 0xBF,
+  [0x0621] = 0xC1,
+  [0x0622] = 0xC2,
+  [0x0623] = 0xC3,
+  [0x0624] = 0xC4,
+  [0x0625] = 0xC5,
+  [0x0626] = 0xC6,
+  [0x0627] = 0xC7,
+  [0x0628] = 0xC8,
+  [0x0629] = 0xC9,
+  [0x062A] = 0xCA,
+  [0x062B] = 0xCB,
+  [0x062C] = 0xCC,
+  [0x062D] = 0xCD,
+  [0x062E] = 0xCE,
+  [0x062F] = 0xCF,
+  [0x0630] = 0xD0,
+  [0x0631] = 0xD1,
+  [0x0632] = 0xD2,
+  [0x0633] = 0xD3,
+  [0x0634] = 0xD4,
+  [0x0635] = 0xD5,
+  [0x0636] = 0xD6,
+  [0x0637] = 0xD7,
+  [0x0638] = 0xD8,
+  [0x0639] = 0xD9,
+  [0x063A] = 0xDA,
+  [0x0640] = 0xE0,
+  [0x0641] = 0xE1,
+  [0x0642] = 0xE2,
+  [0x0643] = 0xE3,
+  [0x0644] = 0xE4,
+  [0x0645] = 0xE5,
+  [0x0646] = 0xE6,
+  [0x0647] = 0xE7,
+  [0x0648] = 0xE8,
+  [0x0649] = 0xE9,
+  [0x064A] = 0xEA,
+  [0x064B] = 0xEB,
+  [0x064C] = 0xEC,
+  [0x064D] = 0xED,
+  [0x064E] = 0xEE,
+  [0x064F] = 0xEF,
+  [0x0650] = 0xF0,
+  [0x0651] = 0xF1,
+  [0x0652] = 0xF2,
+};
diff --git a/iconvdata/iso8859-7.c b/iconvdata/iso8859-7.c
new file mode 100644 (file)
index 0000000..87c2a2c
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-7.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-7.h>
+#define NAME "ISO-8859-7"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-7.h b/iconvdata/iso8859-7.h
new file mode 100644 (file)
index 0000000..fe38788
--- /dev/null
@@ -0,0 +1,504 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x201B,
+  [0xA2] = 0x2019,
+  [0xA3] = 0x00A3,
+  [0xA6] = 0x00A6,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x00A9,
+  [0xAB] = 0x00AB,
+  [0xAC] = 0x00AC,
+  [0xAD] = 0x00AD,
+  [0xAF] = 0x2014,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x00B1,
+  [0xB2] = 0x00B2,
+  [0xB3] = 0x00B3,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x0385,
+  [0xB6] = 0x0386,
+  [0xB7] = 0x00B7,
+  [0xB8] = 0x0388,
+  [0xB9] = 0x0389,
+  [0xBA] = 0x038A,
+  [0xBB] = 0x00BB,
+  [0xBC] = 0x038C,
+  [0xBD] = 0x00BD,
+  [0xBE] = 0x038E,
+  [0xBF] = 0x038F,
+  [0xC0] = 0x0390,
+  [0xC1] = 0x0391,
+  [0xC2] = 0x0392,
+  [0xC3] = 0x0393,
+  [0xC4] = 0x0394,
+  [0xC5] = 0x0395,
+  [0xC6] = 0x0396,
+  [0xC7] = 0x0397,
+  [0xC8] = 0x0398,
+  [0xC9] = 0x0399,
+  [0xCA] = 0x039A,
+  [0xCB] = 0x039B,
+  [0xCC] = 0x039C,
+  [0xCD] = 0x039D,
+  [0xCE] = 0x039E,
+  [0xCF] = 0x039F,
+  [0xD0] = 0x03A0,
+  [0xD1] = 0x03A1,
+  [0xD3] = 0x03A3,
+  [0xD4] = 0x03A4,
+  [0xD5] = 0x03A5,
+  [0xD6] = 0x03A6,
+  [0xD7] = 0x03A7,
+  [0xD8] = 0x03A8,
+  [0xD9] = 0x03A9,
+  [0xDA] = 0x03AA,
+  [0xDB] = 0x03AB,
+  [0xDC] = 0x03AC,
+  [0xDD] = 0x03AD,
+  [0xDE] = 0x03AE,
+  [0xDF] = 0x03AF,
+  [0xE0] = 0x03B0,
+  [0xE1] = 0x03B1,
+  [0xE2] = 0x03B2,
+  [0xE3] = 0x03B3,
+  [0xE4] = 0x03B4,
+  [0xE5] = 0x03B5,
+  [0xE6] = 0x03B6,
+  [0xE7] = 0x03B7,
+  [0xE8] = 0x03B8,
+  [0xE9] = 0x03B9,
+  [0xEA] = 0x03BA,
+  [0xEB] = 0x03BB,
+  [0xEC] = 0x03BC,
+  [0xED] = 0x03BD,
+  [0xEE] = 0x03BE,
+  [0xEF] = 0x03BF,
+  [0xF0] = 0x03C0,
+  [0xF1] = 0x03C1,
+  [0xF2] = 0x03C2,
+  [0xF3] = 0x03C3,
+  [0xF4] = 0x03C4,
+  [0xF5] = 0x03C5,
+  [0xF6] = 0x03C6,
+  [0xF7] = 0x03C7,
+  [0xF8] = 0x03C8,
+  [0xF9] = 0x03C9,
+  [0xFA] = 0x03CA,
+  [0xFB] = 0x03CB,
+  [0xFC] = 0x03CC,
+  [0xFD] = 0x03CD,
+  [0xFE] = 0x03CE,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A3] = 0xA3,
+  [0x00A6] = 0xA6,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00A9] = 0xA9,
+  [0x00AB] = 0xAB,
+  [0x00AC] = 0xAC,
+  [0x00AD] = 0xAD,
+  [0x00B0] = 0xB0,
+  [0x00B1] = 0xB1,
+  [0x00B2] = 0xB2,
+  [0x00B3] = 0xB3,
+  [0x00B4] = 0xB4,
+  [0x00B7] = 0xB7,
+  [0x00BB] = 0xBB,
+  [0x00BD] = 0xBD,
+  [0x0385] = 0xB5,
+  [0x0386] = 0xB6,
+  [0x0388] = 0xB8,
+  [0x0389] = 0xB9,
+  [0x038A] = 0xBA,
+  [0x038C] = 0xBC,
+  [0x038E] = 0xBE,
+  [0x038F] = 0xBF,
+  [0x0390] = 0xC0,
+  [0x0391] = 0xC1,
+  [0x0392] = 0xC2,
+  [0x0393] = 0xC3,
+  [0x0394] = 0xC4,
+  [0x0395] = 0xC5,
+  [0x0396] = 0xC6,
+  [0x0397] = 0xC7,
+  [0x0398] = 0xC8,
+  [0x0399] = 0xC9,
+  [0x039A] = 0xCA,
+  [0x039B] = 0xCB,
+  [0x039C] = 0xCC,
+  [0x039D] = 0xCD,
+  [0x039E] = 0xCE,
+  [0x039F] = 0xCF,
+  [0x03A0] = 0xD0,
+  [0x03A1] = 0xD1,
+  [0x03A3] = 0xD3,
+  [0x03A4] = 0xD4,
+  [0x03A5] = 0xD5,
+  [0x03A6] = 0xD6,
+  [0x03A7] = 0xD7,
+  [0x03A8] = 0xD8,
+  [0x03A9] = 0xD9,
+  [0x03AA] = 0xDA,
+  [0x03AB] = 0xDB,
+  [0x03AC] = 0xDC,
+  [0x03AD] = 0xDD,
+  [0x03AE] = 0xDE,
+  [0x03AF] = 0xDF,
+  [0x03B0] = 0xE0,
+  [0x03B1] = 0xE1,
+  [0x03B2] = 0xE2,
+  [0x03B3] = 0xE3,
+  [0x03B4] = 0xE4,
+  [0x03B5] = 0xE5,
+  [0x03B6] = 0xE6,
+  [0x03B7] = 0xE7,
+  [0x03B8] = 0xE8,
+  [0x03B9] = 0xE9,
+  [0x03BA] = 0xEA,
+  [0x03BB] = 0xEB,
+  [0x03BC] = 0xEC,
+  [0x03BD] = 0xED,
+  [0x03BE] = 0xEE,
+  [0x03BF] = 0xEF,
+  [0x03C0] = 0xF0,
+  [0x03C1] = 0xF1,
+  [0x03C2] = 0xF2,
+  [0x03C3] = 0xF3,
+  [0x03C4] = 0xF4,
+  [0x03C5] = 0xF5,
+  [0x03C6] = 0xF6,
+  [0x03C7] = 0xF7,
+  [0x03C8] = 0xF8,
+  [0x03C9] = 0xF9,
+  [0x03CA] = 0xFA,
+  [0x03CB] = 0xFB,
+  [0x03CC] = 0xFC,
+  [0x03CD] = 0xFD,
+  [0x03CE] = 0xFE,
+  [0x2014] = 0xAF,
+  [0x2019] = 0xA2,
+  [0x201B] = 0xA1,
+};
diff --git a/iconvdata/iso8859-8.c b/iconvdata/iso8859-8.c
new file mode 100644 (file)
index 0000000..ee69754
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-8.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-8.h>
+#define NAME "ISO-8859-8"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-8.h b/iconvdata/iso8859-8.h
new file mode 100644 (file)
index 0000000..bdccec6
--- /dev/null
@@ -0,0 +1,440 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA2] = 0x00A2,
+  [0xA3] = 0x00A3,
+  [0xA4] = 0x00A4,
+  [0xA5] = 0x00A5,
+  [0xA6] = 0x00A6,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x00A9,
+  [0xAA] = 0x00D7,
+  [0xAB] = 0x00AB,
+  [0xAC] = 0x00AC,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x00AE,
+  [0xAF] = 0x203E,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x00B1,
+  [0xB2] = 0x00B2,
+  [0xB3] = 0x00B3,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x00B5,
+  [0xB6] = 0x00B6,
+  [0xB7] = 0x00B7,
+  [0xB8] = 0x00B8,
+  [0xB9] = 0x00B9,
+  [0xBA] = 0x00F7,
+  [0xBB] = 0x00BB,
+  [0xBC] = 0x00BC,
+  [0xBD] = 0x00BD,
+  [0xBE] = 0x00BE,
+  [0xDF] = 0x2017,
+  [0xE0] = 0x05D0,
+  [0xE1] = 0x05D1,
+  [0xE2] = 0x05D2,
+  [0xE3] = 0x05D3,
+  [0xE4] = 0x05D4,
+  [0xE5] = 0x05D5,
+  [0xE6] = 0x05D6,
+  [0xE7] = 0x05D7,
+  [0xE8] = 0x05D8,
+  [0xE9] = 0x05D9,
+  [0xEA] = 0x05DA,
+  [0xEB] = 0x05DB,
+  [0xEC] = 0x05DC,
+  [0xED] = 0x05DD,
+  [0xEE] = 0x05DE,
+  [0xEF] = 0x05DF,
+  [0xF0] = 0x05E0,
+  [0xF1] = 0x05E1,
+  [0xF2] = 0x05E2,
+  [0xF3] = 0x05E3,
+  [0xF4] = 0x05E4,
+  [0xF5] = 0x05E5,
+  [0xF6] = 0x05E6,
+  [0xF7] = 0x05E7,
+  [0xF8] = 0x05E8,
+  [0xF9] = 0x05E9,
+  [0xFA] = 0x05EA,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A2] = 0xA2,
+  [0x00A3] = 0xA3,
+  [0x00A4] = 0xA4,
+  [0x00A5] = 0xA5,
+  [0x00A6] = 0xA6,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00A9] = 0xA9,
+  [0x00AB] = 0xAB,
+  [0x00AC] = 0xAC,
+  [0x00AD] = 0xAD,
+  [0x00AE] = 0xAE,
+  [0x00B0] = 0xB0,
+  [0x00B1] = 0xB1,
+  [0x00B2] = 0xB2,
+  [0x00B3] = 0xB3,
+  [0x00B4] = 0xB4,
+  [0x00B5] = 0xB5,
+  [0x00B6] = 0xB6,
+  [0x00B7] = 0xB7,
+  [0x00B8] = 0xB8,
+  [0x00B9] = 0xB9,
+  [0x00BB] = 0xBB,
+  [0x00BC] = 0xBC,
+  [0x00BD] = 0xBD,
+  [0x00BE] = 0xBE,
+  [0x00D7] = 0xAA,
+  [0x00F7] = 0xBA,
+  [0x05D0] = 0xE0,
+  [0x05D1] = 0xE1,
+  [0x05D2] = 0xE2,
+  [0x05D3] = 0xE3,
+  [0x05D4] = 0xE4,
+  [0x05D5] = 0xE5,
+  [0x05D6] = 0xE6,
+  [0x05D7] = 0xE7,
+  [0x05D8] = 0xE8,
+  [0x05D9] = 0xE9,
+  [0x05DA] = 0xEA,
+  [0x05DB] = 0xEB,
+  [0x05DC] = 0xEC,
+  [0x05DD] = 0xED,
+  [0x05DE] = 0xEE,
+  [0x05DF] = 0xEF,
+  [0x05E0] = 0xF0,
+  [0x05E1] = 0xF1,
+  [0x05E2] = 0xF2,
+  [0x05E3] = 0xF3,
+  [0x05E4] = 0xF4,
+  [0x05E5] = 0xF5,
+  [0x05E6] = 0xF6,
+  [0x05E7] = 0xF7,
+  [0x05E8] = 0xF8,
+  [0x05E9] = 0xF9,
+  [0x05EA] = 0xFA,
+  [0x2017] = 0xDF,
+  [0x203E] = 0xAF,
+};
diff --git a/iconvdata/iso8859-9.c b/iconvdata/iso8859-9.c
new file mode 100644 (file)
index 0000000..5485de2
--- /dev/null
@@ -0,0 +1,24 @@
+/* Conversion from and to ISO 8859-9.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <wchar.h>
+#include <iso8859-9.h>
+#define NAME "ISO-8859-9"
+#include <iso8859-generic.c>
diff --git a/iconvdata/iso8859-9.h b/iconvdata/iso8859-9.h
new file mode 100644 (file)
index 0000000..f579423
--- /dev/null
@@ -0,0 +1,516 @@
+static const wchar_t to_ucs4[256] = {
+  [0x00] = 0x0000,
+  [0x01] = 0x0001,
+  [0x02] = 0x0002,
+  [0x03] = 0x0003,
+  [0x04] = 0x0004,
+  [0x05] = 0x0005,
+  [0x06] = 0x0006,
+  [0x07] = 0x0007,
+  [0x08] = 0x0008,
+  [0x09] = 0x0009,
+  [0x0A] = 0x000A,
+  [0x0B] = 0x000B,
+  [0x0C] = 0x000C,
+  [0x0D] = 0x000D,
+  [0x0E] = 0x000E,
+  [0x0F] = 0x000F,
+  [0x10] = 0x0010,
+  [0x11] = 0x0011,
+  [0x12] = 0x0012,
+  [0x13] = 0x0013,
+  [0x14] = 0x0014,
+  [0x15] = 0x0015,
+  [0x16] = 0x0016,
+  [0x17] = 0x0017,
+  [0x18] = 0x0018,
+  [0x19] = 0x0019,
+  [0x1A] = 0x001A,
+  [0x1B] = 0x001B,
+  [0x1C] = 0x001C,
+  [0x1D] = 0x001D,
+  [0x1E] = 0x001E,
+  [0x1F] = 0x001F,
+  [0x20] = 0x0020,
+  [0x21] = 0x0021,
+  [0x22] = 0x0022,
+  [0x23] = 0x0023,
+  [0x24] = 0x0024,
+  [0x25] = 0x0025,
+  [0x26] = 0x0026,
+  [0x27] = 0x0027,
+  [0x28] = 0x0028,
+  [0x29] = 0x0029,
+  [0x2A] = 0x002A,
+  [0x2B] = 0x002B,
+  [0x2C] = 0x002C,
+  [0x2D] = 0x002D,
+  [0x2E] = 0x002E,
+  [0x2F] = 0x002F,
+  [0x30] = 0x0030,
+  [0x31] = 0x0031,
+  [0x32] = 0x0032,
+  [0x33] = 0x0033,
+  [0x34] = 0x0034,
+  [0x35] = 0x0035,
+  [0x36] = 0x0036,
+  [0x37] = 0x0037,
+  [0x38] = 0x0038,
+  [0x39] = 0x0039,
+  [0x3A] = 0x003A,
+  [0x3B] = 0x003B,
+  [0x3C] = 0x003C,
+  [0x3D] = 0x003D,
+  [0x3E] = 0x003E,
+  [0x3F] = 0x003F,
+  [0x40] = 0x0040,
+  [0x41] = 0x0041,
+  [0x42] = 0x0042,
+  [0x43] = 0x0043,
+  [0x44] = 0x0044,
+  [0x45] = 0x0045,
+  [0x46] = 0x0046,
+  [0x47] = 0x0047,
+  [0x48] = 0x0048,
+  [0x49] = 0x0049,
+  [0x4A] = 0x004A,
+  [0x4B] = 0x004B,
+  [0x4C] = 0x004C,
+  [0x4D] = 0x004D,
+  [0x4E] = 0x004E,
+  [0x4F] = 0x004F,
+  [0x50] = 0x0050,
+  [0x51] = 0x0051,
+  [0x52] = 0x0052,
+  [0x53] = 0x0053,
+  [0x54] = 0x0054,
+  [0x55] = 0x0055,
+  [0x56] = 0x0056,
+  [0x57] = 0x0057,
+  [0x58] = 0x0058,
+  [0x59] = 0x0059,
+  [0x5A] = 0x005A,
+  [0x5B] = 0x005B,
+  [0x5C] = 0x005C,
+  [0x5D] = 0x005D,
+  [0x5E] = 0x005E,
+  [0x5F] = 0x005F,
+  [0x60] = 0x0060,
+  [0x61] = 0x0061,
+  [0x62] = 0x0062,
+  [0x63] = 0x0063,
+  [0x64] = 0x0064,
+  [0x65] = 0x0065,
+  [0x66] = 0x0066,
+  [0x67] = 0x0067,
+  [0x68] = 0x0068,
+  [0x69] = 0x0069,
+  [0x6A] = 0x006A,
+  [0x6B] = 0x006B,
+  [0x6C] = 0x006C,
+  [0x6D] = 0x006D,
+  [0x6E] = 0x006E,
+  [0x6F] = 0x006F,
+  [0x70] = 0x0070,
+  [0x71] = 0x0071,
+  [0x72] = 0x0072,
+  [0x73] = 0x0073,
+  [0x74] = 0x0074,
+  [0x75] = 0x0075,
+  [0x76] = 0x0076,
+  [0x77] = 0x0077,
+  [0x78] = 0x0078,
+  [0x79] = 0x0079,
+  [0x7A] = 0x007A,
+  [0x7B] = 0x007B,
+  [0x7C] = 0x007C,
+  [0x7D] = 0x007D,
+  [0x7E] = 0x007E,
+  [0x7F] = 0x007F,
+  [0x80] = 0x0080,
+  [0x81] = 0x0081,
+  [0x82] = 0x0082,
+  [0x83] = 0x0083,
+  [0x84] = 0x0084,
+  [0x85] = 0x0085,
+  [0x86] = 0x0086,
+  [0x87] = 0x0087,
+  [0x88] = 0x0088,
+  [0x89] = 0x0089,
+  [0x8A] = 0x008A,
+  [0x8B] = 0x008B,
+  [0x8C] = 0x008C,
+  [0x8D] = 0x008D,
+  [0x8E] = 0x008E,
+  [0x8F] = 0x008F,
+  [0x90] = 0x0090,
+  [0x91] = 0x0091,
+  [0x92] = 0x0092,
+  [0x93] = 0x0093,
+  [0x94] = 0x0094,
+  [0x95] = 0x0095,
+  [0x96] = 0x0096,
+  [0x97] = 0x0097,
+  [0x98] = 0x0098,
+  [0x99] = 0x0099,
+  [0x9A] = 0x009A,
+  [0x9B] = 0x009B,
+  [0x9C] = 0x009C,
+  [0x9D] = 0x009D,
+  [0x9E] = 0x009E,
+  [0x9F] = 0x009F,
+  [0xA0] = 0x00A0,
+  [0xA1] = 0x00A1,
+  [0xA2] = 0x00A2,
+  [0xA3] = 0x00A3,
+  [0xA4] = 0x00A4,
+  [0xA5] = 0x00A5,
+  [0xA6] = 0x00A6,
+  [0xA7] = 0x00A7,
+  [0xA8] = 0x00A8,
+  [0xA9] = 0x00A9,
+  [0xAA] = 0x00AA,
+  [0xAB] = 0x00AB,
+  [0xAC] = 0x00AC,
+  [0xAD] = 0x00AD,
+  [0xAE] = 0x00AE,
+  [0xAF] = 0x00AF,
+  [0xB0] = 0x00B0,
+  [0xB1] = 0x00B1,
+  [0xB2] = 0x00B2,
+  [0xB3] = 0x00B3,
+  [0xB4] = 0x00B4,
+  [0xB5] = 0x00B5,
+  [0xB6] = 0x00B6,
+  [0xB7] = 0x00B7,
+  [0xB8] = 0x00B8,
+  [0xB9] = 0x00B9,
+  [0xBA] = 0x00BA,
+  [0xBB] = 0x00BB,
+  [0xBC] = 0x00BC,
+  [0xBD] = 0x00BD,
+  [0xBE] = 0x00BE,
+  [0xBF] = 0x00BF,
+  [0xC0] = 0x00C0,
+  [0xC1] = 0x00C1,
+  [0xC2] = 0x00C2,
+  [0xC3] = 0x00C3,
+  [0xC4] = 0x00C4,
+  [0xC5] = 0x00C5,
+  [0xC6] = 0x00C6,
+  [0xC7] = 0x00C7,
+  [0xC8] = 0x00C8,
+  [0xC9] = 0x00C9,
+  [0xCA] = 0x00CA,
+  [0xCB] = 0x00CB,
+  [0xCC] = 0x00CC,
+  [0xCD] = 0x00CD,
+  [0xCE] = 0x00CE,
+  [0xCF] = 0x00CF,
+  [0xD0] = 0x011E,
+  [0xD1] = 0x00D1,
+  [0xD2] = 0x00D2,
+  [0xD3] = 0x00D3,
+  [0xD4] = 0x00D4,
+  [0xD5] = 0x00D5,
+  [0xD6] = 0x00D6,
+  [0xD7] = 0x00D7,
+  [0xD8] = 0x00D8,
+  [0xD9] = 0x00D9,
+  [0xDA] = 0x00DA,
+  [0xDB] = 0x00DB,
+  [0xDC] = 0x00DC,
+  [0xDD] = 0x0130,
+  [0xDE] = 0x015E,
+  [0xDF] = 0x00DF,
+  [0xE0] = 0x00E0,
+  [0xE1] = 0x00E1,
+  [0xE2] = 0x00E2,
+  [0xE3] = 0x00E3,
+  [0xE4] = 0x00E4,
+  [0xE5] = 0x00E5,
+  [0xE6] = 0x00E6,
+  [0xE7] = 0x00E7,
+  [0xE8] = 0x00E8,
+  [0xE9] = 0x00E9,
+  [0xEA] = 0x0119,
+  [0xEB] = 0x00EB,
+  [0xEC] = 0x0117,
+  [0xED] = 0x00ED,
+  [0xEE] = 0x00EE,
+  [0xEF] = 0x012B,
+  [0xF0] = 0x011F,
+  [0xF1] = 0x00F1,
+  [0xF2] = 0x00F2,
+  [0xF3] = 0x00F3,
+  [0xF4] = 0x00F4,
+  [0xF5] = 0x00F5,
+  [0xF6] = 0x00F6,
+  [0xF7] = 0x00F7,
+  [0xF8] = 0x00F8,
+  [0xF9] = 0x00F9,
+  [0xFA] = 0x00FA,
+  [0xFB] = 0x00FB,
+  [0xFC] = 0x00FC,
+  [0xFD] = 0x0131,
+  [0xFE] = 0x015F,
+  [0xFF] = 0x00FF,
+};
+static const char from_ucs4[] = {
+  [0x0000] = 0x00,
+  [0x0001] = 0x01,
+  [0x0002] = 0x02,
+  [0x0003] = 0x03,
+  [0x0004] = 0x04,
+  [0x0005] = 0x05,
+  [0x0006] = 0x06,
+  [0x0007] = 0x07,
+  [0x0008] = 0x08,
+  [0x0009] = 0x09,
+  [0x000A] = 0x0A,
+  [0x000B] = 0x0B,
+  [0x000C] = 0x0C,
+  [0x000D] = 0x0D,
+  [0x000E] = 0x0E,
+  [0x000F] = 0x0F,
+  [0x0010] = 0x10,
+  [0x0011] = 0x11,
+  [0x0012] = 0x12,
+  [0x0013] = 0x13,
+  [0x0014] = 0x14,
+  [0x0015] = 0x15,
+  [0x0016] = 0x16,
+  [0x0017] = 0x17,
+  [0x0018] = 0x18,
+  [0x0019] = 0x19,
+  [0x001A] = 0x1A,
+  [0x001B] = 0x1B,
+  [0x001C] = 0x1C,
+  [0x001D] = 0x1D,
+  [0x001E] = 0x1E,
+  [0x001F] = 0x1F,
+  [0x0020] = 0x20,
+  [0x0021] = 0x21,
+  [0x0022] = 0x22,
+  [0x0023] = 0x23,
+  [0x0024] = 0x24,
+  [0x0025] = 0x25,
+  [0x0026] = 0x26,
+  [0x0027] = 0x27,
+  [0x0028] = 0x28,
+  [0x0029] = 0x29,
+  [0x002A] = 0x2A,
+  [0x002B] = 0x2B,
+  [0x002C] = 0x2C,
+  [0x002D] = 0x2D,
+  [0x002E] = 0x2E,
+  [0x002F] = 0x2F,
+  [0x0030] = 0x30,
+  [0x0031] = 0x31,
+  [0x0032] = 0x32,
+  [0x0033] = 0x33,
+  [0x0034] = 0x34,
+  [0x0035] = 0x35,
+  [0x0036] = 0x36,
+  [0x0037] = 0x37,
+  [0x0038] = 0x38,
+  [0x0039] = 0x39,
+  [0x003A] = 0x3A,
+  [0x003B] = 0x3B,
+  [0x003C] = 0x3C,
+  [0x003D] = 0x3D,
+  [0x003E] = 0x3E,
+  [0x003F] = 0x3F,
+  [0x0040] = 0x40,
+  [0x0041] = 0x41,
+  [0x0042] = 0x42,
+  [0x0043] = 0x43,
+  [0x0044] = 0x44,
+  [0x0045] = 0x45,
+  [0x0046] = 0x46,
+  [0x0047] = 0x47,
+  [0x0048] = 0x48,
+  [0x0049] = 0x49,
+  [0x004A] = 0x4A,
+  [0x004B] = 0x4B,
+  [0x004C] = 0x4C,
+  [0x004D] = 0x4D,
+  [0x004E] = 0x4E,
+  [0x004F] = 0x4F,
+  [0x0050] = 0x50,
+  [0x0051] = 0x51,
+  [0x0052] = 0x52,
+  [0x0053] = 0x53,
+  [0x0054] = 0x54,
+  [0x0055] = 0x55,
+  [0x0056] = 0x56,
+  [0x0057] = 0x57,
+  [0x0058] = 0x58,
+  [0x0059] = 0x59,
+  [0x005A] = 0x5A,
+  [0x005B] = 0x5B,
+  [0x005C] = 0x5C,
+  [0x005D] = 0x5D,
+  [0x005E] = 0x5E,
+  [0x005F] = 0x5F,
+  [0x0060] = 0x60,
+  [0x0061] = 0x61,
+  [0x0062] = 0x62,
+  [0x0063] = 0x63,
+  [0x0064] = 0x64,
+  [0x0065] = 0x65,
+  [0x0066] = 0x66,
+  [0x0067] = 0x67,
+  [0x0068] = 0x68,
+  [0x0069] = 0x69,
+  [0x006A] = 0x6A,
+  [0x006B] = 0x6B,
+  [0x006C] = 0x6C,
+  [0x006D] = 0x6D,
+  [0x006E] = 0x6E,
+  [0x006F] = 0x6F,
+  [0x0070] = 0x70,
+  [0x0071] = 0x71,
+  [0x0072] = 0x72,
+  [0x0073] = 0x73,
+  [0x0074] = 0x74,
+  [0x0075] = 0x75,
+  [0x0076] = 0x76,
+  [0x0077] = 0x77,
+  [0x0078] = 0x78,
+  [0x0079] = 0x79,
+  [0x007A] = 0x7A,
+  [0x007B] = 0x7B,
+  [0x007C] = 0x7C,
+  [0x007D] = 0x7D,
+  [0x007E] = 0x7E,
+  [0x007F] = 0x7F,
+  [0x0080] = 0x80,
+  [0x0081] = 0x81,
+  [0x0082] = 0x82,
+  [0x0083] = 0x83,
+  [0x0084] = 0x84,
+  [0x0085] = 0x85,
+  [0x0086] = 0x86,
+  [0x0087] = 0x87,
+  [0x0088] = 0x88,
+  [0x0089] = 0x89,
+  [0x008A] = 0x8A,
+  [0x008B] = 0x8B,
+  [0x008C] = 0x8C,
+  [0x008D] = 0x8D,
+  [0x008E] = 0x8E,
+  [0x008F] = 0x8F,
+  [0x0090] = 0x90,
+  [0x0091] = 0x91,
+  [0x0092] = 0x92,
+  [0x0093] = 0x93,
+  [0x0094] = 0x94,
+  [0x0095] = 0x95,
+  [0x0096] = 0x96,
+  [0x0097] = 0x97,
+  [0x0098] = 0x98,
+  [0x0099] = 0x99,
+  [0x009A] = 0x9A,
+  [0x009B] = 0x9B,
+  [0x009C] = 0x9C,
+  [0x009D] = 0x9D,
+  [0x009E] = 0x9E,
+  [0x009F] = 0x9F,
+  [0x00A0] = 0xA0,
+  [0x00A1] = 0xA1,
+  [0x00A2] = 0xA2,
+  [0x00A3] = 0xA3,
+  [0x00A4] = 0xA4,
+  [0x00A5] = 0xA5,
+  [0x00A6] = 0xA6,
+  [0x00A7] = 0xA7,
+  [0x00A8] = 0xA8,
+  [0x00A9] = 0xA9,
+  [0x00AA] = 0xAA,
+  [0x00AB] = 0xAB,
+  [0x00AC] = 0xAC,
+  [0x00AD] = 0xAD,
+  [0x00AE] = 0xAE,
+  [0x00AF] = 0xAF,
+  [0x00B0] = 0xB0,
+  [0x00B1] = 0xB1,
+  [0x00B2] = 0xB2,
+  [0x00B3] = 0xB3,
+  [0x00B4] = 0xB4,
+  [0x00B5] = 0xB5,
+  [0x00B6] = 0xB6,
+  [0x00B7] = 0xB7,
+  [0x00B8] = 0xB8,
+  [0x00B9] = 0xB9,
+  [0x00BA] = 0xBA,
+  [0x00BB] = 0xBB,
+  [0x00BC] = 0xBC,
+  [0x00BD] = 0xBD,
+  [0x00BE] = 0xBE,
+  [0x00BF] = 0xBF,
+  [0x00C0] = 0xC0,
+  [0x00C1] = 0xC1,
+  [0x00C2] = 0xC2,
+  [0x00C3] = 0xC3,
+  [0x00C4] = 0xC4,
+  [0x00C5] = 0xC5,
+  [0x00C6] = 0xC6,
+  [0x00C7] = 0xC7,
+  [0x00C8] = 0xC8,
+  [0x00C9] = 0xC9,
+  [0x00CA] = 0xCA,
+  [0x00CB] = 0xCB,
+  [0x00CC] = 0xCC,
+  [0x00CD] = 0xCD,
+  [0x00CE] = 0xCE,
+  [0x00CF] = 0xCF,
+  [0x00D1] = 0xD1,
+  [0x00D2] = 0xD2,
+  [0x00D3] = 0xD3,
+  [0x00D4] = 0xD4,
+  [0x00D5] = 0xD5,
+  [0x00D6] = 0xD6,
+  [0x00D7] = 0xD7,
+  [0x00D8] = 0xD8,
+  [0x00D9] = 0xD9,
+  [0x00DA] = 0xDA,
+  [0x00DB] = 0xDB,
+  [0x00DC] = 0xDC,
+  [0x00DF] = 0xDF,
+  [0x00E0] = 0xE0,
+  [0x00E1] = 0xE1,
+  [0x00E2] = 0xE2,
+  [0x00E3] = 0xE3,
+  [0x00E4] = 0xE4,
+  [0x00E5] = 0xE5,
+  [0x00E6] = 0xE6,
+  [0x00E7] = 0xE7,
+  [0x00E8] = 0xE8,
+  [0x00E9] = 0xE9,
+  [0x00EB] = 0xEB,
+  [0x00ED] = 0xED,
+  [0x00EE] = 0xEE,
+  [0x00F1] = 0xF1,
+  [0x00F2] = 0xF2,
+  [0x00F3] = 0xF3,
+  [0x00F4] = 0xF4,
+  [0x00F5] = 0xF5,
+  [0x00F6] = 0xF6,
+  [0x00F7] = 0xF7,
+  [0x00F8] = 0xF8,
+  [0x00F9] = 0xF9,
+  [0x00FA] = 0xFA,
+  [0x00FB] = 0xFB,
+  [0x00FC] = 0xFC,
+  [0x00FF] = 0xFF,
+  [0x0117] = 0xEC,
+  [0x0119] = 0xEA,
+  [0x011E] = 0xD0,
+  [0x011F] = 0xF0,
+  [0x012B] = 0xEF,
+  [0x0130] = 0xDD,
+  [0x0131] = 0xFD,
+  [0x015E] = 0xDE,
+  [0x015F] = 0xFE,
+};
diff --git a/iconvdata/iso8859-generic.c b/iconvdata/iso8859-generic.c
new file mode 100644 (file)
index 0000000..e33e1d0
--- /dev/null
@@ -0,0 +1,228 @@
+/* Generic conversion to and from ISO 8859-XXX.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <gconv.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Direction of the transformation.  */
+enum direction
+{
+  illegal,
+  to_iso8859,
+  from_iso8859
+};
+
+struct iso8859_data
+{
+  enum direction dir;
+};
+
+
+int
+gconv_init (struct gconv_step *step, struct gconv_step_data *data)
+{
+  /* Determine which direction.  */
+  struct iso8859_data *new_data;
+  enum direction dir;
+  int result;
+
+  if (__strcasestr (step->from_name, NAME) != NULL)
+    dir = from_iso8859;
+  else if (__strcasestr (step->to_name, NAME) != NULL)
+    dir = to_iso8859;
+  else
+    dir = illegal;
+
+  result = GCONV_NOCONV;
+  if (dir != illegal
+      && ((new_data
+          = (struct iso8859_data *) malloc (sizeof (struct iso8859_data)))
+         != NULL))
+    {
+      new_data->dir = dir;
+      data->data = new_data;
+      result = GCONV_OK;
+    }
+
+  return result;
+}
+
+
+void
+gconv_end (struct gconv_step_data *data)
+{
+  free (data->data);
+}
+
+
+int
+gconv (struct gconv_step *step, struct gconv_step_data *data,
+       const char *inbuf, size_t *inbufsize, size_t *written, int do_flush)
+{
+  struct gconv_step *next_step = step + 1;
+  struct gconv_step_data *next_data = data + 1;
+  gconv_fct fct = next_step->fct;
+  size_t do_write;
+  int result;
+
+  /* If the function is called with no input this means we have to reset
+     to the initial state.  The possibly partly converted input is
+     dropped.  */
+  if (do_flush)
+    {
+      do_write = 0;
+
+      /* Call the steps down the chain if there are any.  */
+      if (data->is_last)
+       result = GCONV_OK;
+      else
+       {
+         struct gconv_step *next_step = step + 1;
+         struct gconv_step_data *next_data = data + 1;
+
+         result = (*fct) (next_step, next_data, NULL, 0, written, 1);
+
+         /* Clear output buffer.  */
+         data->outbufavail = 0;
+       }
+    }
+  else
+    {
+      enum direction dir = ((struct iso8859_data *) data->data)->dir;
+
+      do_write = 0;
+
+      do
+       {
+         result = GCONV_OK;
+
+         if (dir == from_iso8859)
+           {
+             size_t inchars = *inbufsize;
+             size_t outwchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (cnt < inchars
+                    && (outwchars + sizeof (wchar_t) <= data->outbufsize))
+               {
+                 wchar_t ch = to_ucs4[(int) inbuf[cnt]];
+
+                 if (ch == L'\0' && inbuf[cnt] != '\0')
+                   {
+                     /* This is an illegal character.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+
+                 *((wchar_t *) (outbuf + outwchars)) = ch;
+                 ++do_write;
+                 outwchars += sizeof (wchar_t);
+                 ++cnt;
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outwchars;
+           }
+         else
+           {
+             size_t inwchars = *inbufsize;
+             size_t outchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (inwchars >= cnt + sizeof (wchar_t)
+                    && outchars < data->outbufsize)
+               {
+                 int ch = *((wchar_t *) (inbuf + cnt));
+
+                 if (ch >= sizeof (from_ucs4) / sizeof (from_ucs4[0])
+                     || ch < 0 || (from_ucs4[ch] == '\0' && ch != 0))
+                   break;
+
+                 outbuf[outchars] = from_ucs4[ch];
+                 ++do_write;
+                 ++outchars;
+                 cnt += sizeof (wchar_t);
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outchars;
+
+             if (outchars < data->outbufsize)
+               {
+                 /* If there is still room in the output buffer something
+                    is wrong with the input.  */
+                 if (inwchars >= cnt + sizeof (wchar_t))
+                   {
+                     /* An error occurred.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+                 if (inwchars != cnt)
+                   {
+                     /* There are some unprocessed bytes at the end of the
+                        input buffer.  */
+                     result = GCONV_INCOMPLETE_INPUT;
+                     break;
+                   }
+               }
+           }
+
+         if (result != GCONV_OK)
+           break;
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (*inbufsize > (dir == from_iso8859
+                                     ? 0 : sizeof (wchar_t) - 1)
+                       ? GCONV_FULL_OUTPUT : GCONV_EMPTY_INPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
+         if (data->outbufavail > 0)
+           {
+             /* Call the functions below in the chain.  */
+             size_t newavail = data->outbufavail;
+
+             result = (*fct) (next_step, next_data, data->outbuf, &newavail,
+                              written, 0);
+
+             /* Correct the output buffer.  */
+             if (newavail != data->outbufavail && newavail > 0)
+               {
+                 memmove (data->outbuf,
+                          &data->outbuf[data->outbufavail - newavail],
+                          newavail);
+                 data->outbufavail = newavail;
+               }
+           }
+       }
+      while (*inbufsize > 0 && result == GCONV_EMPTY_INPUT);
+    }
+
+  if (written != NULL && data->is_last)
+    *written = do_write;
+
+  return result;
+}
diff --git a/iconvdata/t61.c b/iconvdata/t61.c
new file mode 100644 (file)
index 0000000..915b672
--- /dev/null
@@ -0,0 +1,630 @@
+/* Generic conversion to and from T.61.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#include <gconv.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Data taken from the WG15 tables.  */
+static const wchar_t to_ucs4[256] =
+{
+  /* 0x00 */ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+  /* 0x08 */ 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+  /* 0x10 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+  /* 0x18 */ 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
+  /* 0x20 */ 0x0020, 0x0021, 0x0022, 0x0000, 0x0000, 0x0025, 0x0026, 0x0027,
+  /* 0x28 */ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
+  /* 0x30 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+  /* 0x38 */ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
+  /* 0x40 */ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+  /* 0x48 */ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
+  /* 0x50 */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+  /* 0x58 */ 0x0058, 0x0059, 0x005a, 0x005b, 0x0000, 0x005d, 0x0000, 0x005f,
+  /* 0x60 */ 0x0000, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+  /* 0x68 */ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+  /* 0x70 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+  /* 0x78 */ 0x0078, 0x0079, 0x007a, 0x0000, 0x007c, 0x0000, 0x0000, 0x007f,
+  /* 0x80 */ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+  /* 0x88 */ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+  /* 0x90 */ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+  /* 0x98 */ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+  /* 0xa0 */ 0x0000, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+  /* 0xa8 */ 0x00a8, 0x0000, 0x0000, 0x00ab, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xb0 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+  /* 0xb8 */ 0x00b8, 0x0000, 0x0000, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+  /* 0xc0 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xc8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xd0 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xd8 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  /* 0xe0 */ 0x2126, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0x0000, 0x0132, 0x013f,
+  /* 0xe8 */ 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0x0149,
+  /* 0xf0 */ 0x0138, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0140,
+  /* 0xf8 */ 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x0000
+};
+
+/* The outer array range runs from 0xc1 to 0xcf, the inner range from 0x20
+   to 0x7f.  */
+static const wchar_t to_ucs4_comb[15][96] =
+{
+  /* 0xc1 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c0, 0x0000, 0x0000, 0x0000, 0x00c8, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d2,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d9, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e0, 0x0000, 0x0000, 0x0000, 0x00e8, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ec, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f2,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f9, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc2 */
+  {
+    /* 0x20 */ 0x00b4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c1, 0x0000, 0x0106, 0x0000, 0x00c9, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cd, 0x0000, 0x0000, 0x0139, 0x0000, 0x0143, 0x00d3,
+    /* 0x50 */ 0x0000, 0x0000, 0x0154, 0x015a, 0x0000, 0x00da, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x00dd, 0x0179, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e1, 0x0000, 0x0107, 0x0000, 0x00e9, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ed, 0x0000, 0x0000, 0x013a, 0x0000, 0x0144, 0x00f3,
+    /* 0x70 */ 0x0000, 0x0000, 0x0155, 0x015b, 0x0000, 0x00fa, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x00fd, 0x017a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc3 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c2, 0x0000, 0x0108, 0x0000, 0x00ca, 0x0000, 0x011c,
+    /* 0x48 */ 0x0124, 0x00ce, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d4,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x015c, 0x0000, 0x00db, 0x0000, 0x0174,
+    /* 0x58 */ 0x0000, 0x0176, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e2, 0x0000, 0x0109, 0x0000, 0x00ea, 0x0000, 0x011d,
+    /* 0x68 */ 0x0125, 0x00ee, 0x0135, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f4,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x015d, 0x0000, 0x00fb, 0x0000, 0x0175,
+    /* 0x78 */ 0x0000, 0x0177, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc4 */
+  {
+    /* 0x20 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0128, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d1, 0x00d5,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0168, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0129, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f1, 0x00f5,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0169, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc5 */
+  {
+    /* 0x20 */ 0x00af, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0100, 0x0000, 0x0000, 0x0000, 0x0112, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x012a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x014c,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016a, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0101, 0x0000, 0x0000, 0x0000, 0x0113, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x012b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x014d,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016b, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc6 */
+  {
+    /* 0x20 */ 0x02d8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x011e,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0103, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x011f,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc7 */
+  {
+    /* 0x20 */ 0x02d9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x010a, 0x0000, 0x0116, 0x0000, 0x0120,
+    /* 0x48 */ 0x0000, 0x0130, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x017b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x010b, 0x0000, 0x0117, 0x0000, 0x0121,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x017c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc8 */
+  {
+    /* 0x20 */ 0x00a8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c4, 0x0000, 0x0000, 0x0000, 0x00cb, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x00cf, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00d6,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00dc, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0178, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e4, 0x0000, 0x0000, 0x0000, 0x00eb, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x00ef, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00f6,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00fc, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xc9 */
+  {
+    0x0000,
+  },
+  /* 0xca */
+  {
+    /* 0x20 */ 0x02da, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x00c5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016e, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x00e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x016f, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcb */
+  {
+    /* 0x20 */ 0x00b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x00c7, 0x0000, 0x0000, 0x0000, 0x0122,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0136, 0x013b, 0x0000, 0x0145, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0156, 0x015e, 0x0162, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x00e7, 0x0000, 0x0000, 0x0000, 0x0123,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0137, 0x013c, 0x0000, 0x0146, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0157, 0x015f, 0x0163, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcc */
+  {
+    0x0000,
+  },
+  /* 0xcd */
+  {
+    /* 0x20 */ 0x02dd, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0150,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0170, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0151,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0171, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xce */
+  {
+    /* 0x20 */ 0x02db, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0104, 0x0000, 0x0000, 0x0000, 0x0118, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x012e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0172, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0105, 0x0000, 0x0000, 0x0000, 0x0119, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x012f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0173, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  },
+  /* 0xcf */
+  {
+    /* 0x20 */ 0x02c7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x28 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x30 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x38 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x40 */ 0x0000, 0x0000, 0x0000, 0x010c, 0x010e, 0x011a, 0x0000, 0x0000,
+    /* 0x48 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x013d, 0x0000, 0x0147, 0x0000,
+    /* 0x50 */ 0x0000, 0x0000, 0x0158, 0x0160, 0x0164, 0x0000, 0x0000, 0x0000,
+    /* 0x58 */ 0x0000, 0x0000, 0x017d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    /* 0x60 */ 0x0000, 0x0000, 0x0000, 0x010d, 0x010f, 0x011b, 0x0000, 0x0000,
+    /* 0x68 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x013e, 0x0000, 0x0148, 0x0000,
+    /* 0x70 */ 0x0000, 0x0000, 0x0159, 0x0161, 0x0165, 0x0000, 0x0000, 0x0000,
+    /* 0x78 */ 0x0000, 0x0000, 0x017e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+  }
+};
+
+
+static const char from_ucs4[][2] =
+{
+  /* 0x0000 */ "\x00\x00", "\x01\x00", "\x02\x00", "\x03\x00", "\x04\x00",
+  /* 0x0005 */ "\x05\x00", "\x06\x00", "\x07\x00", "\x08\x00", "\x09\x00",
+  /* 0x000a */ "\x0a\x00", "\x0b\x00", "\x0c\x00", "\x0d\x00", "\x0e\x00",
+  /* 0x000f */ "\x0f\x00", "\x10\x00", "\x11\x00", "\x12\x00", "\x13\x00",
+  /* 0x0014 */ "\x14\x00", "\x15\x00", "\x16\x00", "\x17\x00", "\x18\x00",
+  /* 0x0019 */ "\x19\x00", "\x1a\x00", "\x1b\x00", "\x1c\x00", "\x1d\x00",
+  /* 0x001e */ "\x1e\x00", "\x1f\x00", "\x20\x00", "\x21\x00", "\x22\x00",
+  /* 0x0023 */ "\x23\x00", "\x24\x00", "\x25\x00", "\x26\x00", "\x27\x00",
+  /* 0x0028 */ "\x28\x00", "\x29\x00", "\x2a\x00", "\x2b\x00", "\x2c\x00",
+  /* 0x002d */ "\x2d\x00", "\x2e\x00", "\x2f\x00", "\x30\x00", "\x31\x00",
+  /* 0x0032 */ "\x32\x00", "\x33\x00", "\x34\x00", "\x35\x00", "\x36\x00",
+  /* 0x0037 */ "\x37\x00", "\x38\x00", "\x39\x00", "\x3a\x00", "\x3b\x00",
+  /* 0x003c */ "\x3c\x00", "\x3d\x00", "\x3e\x00", "\x3f\x00", "\x40\x00",
+  /* 0x0041 */ "\x41\x00", "\x42\x00", "\x43\x00", "\x44\x00", "\x45\x00",
+  /* 0x0046 */ "\x46\x00", "\x47\x00", "\x48\x00", "\x49\x00", "\x4a\x00",
+  /* 0x004b */ "\x4b\x00", "\x4c\x00", "\x4d\x00", "\x4e\x00", "\x4f\x00",
+  /* 0x0050 */ "\x50\x00", "\x51\x00", "\x52\x00", "\x53\x00", "\x54\x00",
+  /* 0x0055 */ "\x55\x00", "\x56\x00", "\x57\x00", "\x58\x00", "\x59\x00",
+  /* 0x005a */ "\x5a\x00", "\x5b\x00", "\x00\x00", "\x5d\x00", "\x00\x00",
+  /* 0x005f */ "\x5f\x00", "\x00\x00", "\x61\x00", "\x62\x00", "\x63\x00",
+  /* 0x0064 */ "\x64\x00", "\x65\x00", "\x66\x00", "\x67\x00", "\x68\x00",
+  /* 0x0069 */ "\x69\x00", "\x6a\x00", "\x6b\x00", "\x6c\x00", "\x6d\x00",
+  /* 0x006e */ "\x6e\x00", "\x6f\x00", "\x70\x00", "\x71\x00", "\x72\x00",
+  /* 0x0073 */ "\x73\x00", "\x74\x00", "\x75\x00", "\x76\x00", "\x77\x00",
+  /* 0x0078 */ "\x78\x00", "\x79\x00", "\x7a\x00", "\x00\x00", "\x7c\x00",
+  /* 0x007d */ "\x00\x00", "\x00\x00", "\x7f\x00", "\x00\x80", "\x00\x81",
+  /* 0x0082 */ "\x82\x00", "\x83\x00", "\x84\x00", "\x85\x00", "\x86\x00",
+  /* 0x0087 */ "\x87\x00", "\x88\x00", "\x89\x00", "\x8a\x00", "\x8b\x00",
+  /* 0x008c */ "\x8c\x00", "\x8d\x00", "\x8e\x00", "\x8f\x00", "\x90\x00",
+  /* 0x0091 */ "\x91\x00", "\x92\x00", "\x93\x00", "\x94\x00", "\x95\x00",
+  /* 0x0096 */ "\x96\x00", "\x97\x00", "\x98\x00", "\x99\x00", "\x9a\x00",
+  /* 0x009b */ "\x9b\x00", "\x9c\x00", "\x9d\x00", "\x9e\x00", "\x9f\x00",
+  /* 0x00a0 */ "\x00\x00", "\xa1\x00", "\xa2\x00", "\xa3\x00", "\xa4\x00",
+  /* 0x00a5 */ "\xa5\x00", "\x00\x00", "\xa7\x00", "\xc8\x20", "\x00\x00",
+  /* 0x00aa */ "\xe3\x00", "\xab\x00", "\x00\x00", "\x00\x00", "\x00\x00",
+  /* 0x00af */ "\xc5\x20", "\xb0\x00", "\xb1\x00", "\xb2\x00", "\xb3\x00",
+  /* 0x00b4 */ "\xc2\x20", "\xb5\x00", "\xb6\x00", "\xb7\x00", "\xcb\x20",
+  /* 0x00b9 */ "\x00\x00", "\xeb\x00", "\x00\x00", "\xbc\x00", "\xbd\x00",
+  /* 0x00be */ "\xbe\x00", "\xbf\x00", "\xc1\x41", "\xc2\x41", "\xc3\x41",
+  /* 0x00c3 */ "\xc4\x41", "\xc8\x41", "\xca\x41", "\xe1\x00", "\xcb\x43",
+  /* 0x00c8 */ "\xc1\x45", "\xc2\x45", "\xc3\x45", "\xc8\x45", "\xc1\x49",
+  /* 0x00cd */ "\xc2\x49", "\xc3\x49", "\xc8\x49", "\xe2\x00", "\xc4\x4e",
+  /* 0x00d2 */ "\xc1\x4f", "\xc2\x4f", "\xc3\x4f", "\xc4\x4f", "\xc8\x4f",
+  /* 0x00d7 */ "\xb4\x00", "\xe9\x00", "\xc1\x55", "\xc2\x55", "\xc3\x55",
+  /* 0x00dc */ "\xc8\x55", "\xc2\x59", "\xec\x00", "\xfb\x00", "\xc1\x61",
+  /* 0x00e1 */ "\xc2\x61", "\xc3\x61", "\xc4\x61", "\xc8\x61", "\xca\x61",
+  /* 0x00e6 */ "\xf1\x00", "\xcb\x63", "\xc1\x65", "\xc2\x65", "\xc3\x65",
+  /* 0x00eb */ "\xc8\x65", "\xc1\x69", "\xc2\xe9", "\xc3\x69", "\xc8\x69",
+  /* 0x00f0 */ "\xf3\x00", "\xc4\x6e", "\xc1\x6f", "\xc2\x6f", "\xc3\x6f",
+  /* 0x00f5 */ "\xc4\x6f", "\xc8\x6f", "\xb8\x00", "\xf9\x00", "\xc1\x75",
+  /* 0x00fa */ "\xc2\x75", "\xc3\x75", "\xc8\x75", "\xc2\x79", "\xfc\x00",
+  /* 0x00ff */ "\xc8\x79", "\xc5\x41", "\xc5\x61", "\xc6\x41", "\xc6\x61",
+  /* 0x0104 */ "\xce\x41", "\xce\x61", "\xc2\x43", "\xc2\x63", "\xc3\x43",
+  /* 0x0109 */ "\xc3\x63", "\xc7\x43", "\xc7\x63", "\xcf\x43", "\xcf\x63",
+  /* 0x010e */ "\xcf\x44", "\xcf\x64", "\x00\x00", "\xf2\x00", "\xc5\x45",
+  /* 0x0113 */ "\xc5\x65", "\x00\x00", "\x00\x00", "\xc7\x45", "\xc7\x65",
+  /* 0x0118 */ "\xce\x45", "\xce\x65", "\xcf\x45", "\xcf\x65", "\xc3\x47",
+  /* 0x011d */ "\xc3\x67", "\xc6\x47", "\xc6\x67", "\xc7\x47", "\xc7\x67",
+  /* 0x0122 */ "\xcb\x47", "\xcb\x67", "\xc3\x48", "\xc3\x68", "\xe4\x00",
+  /* 0x0127 */ "\xf4\x00", "\xc4\x49", "\xc4\x69", "\xc5\x49", "\xc5\x69",
+  /* 0x012c */ "\x00\x00", "\x00\x00", "\xce\x49", "\xce\x69", "\xc7\x49",
+  /* 0x0131 */ "\xf5\x00", "\xe6\x00", "\xf6\x00", "\xc3\x4a", "\xc3\x6a",
+  /* 0x0136 */ "\xcb\x4b", "\xcb\x6b", "\xf0\x00", "\xc2\x4c", "\xc2\x6c",
+  /* 0x013b */ "\xcb\x4c", "\xcb\x6c", "\xcf\x4c", "\xcf\x6c", "\xe7\x00",
+  /* 0x0140 */ "\xf7\x00", "\xe8\x00", "\xf8\x00", "\xc2\x4e", "\xc2\x6e",
+  /* 0x0145 */ "\xcb\x4e", "\xcb\x6e", "\xcf\x4e", "\xcf\x6e", "\xef\x00",
+  /* 0x014a */ "\xee\x00", "\xfe\x00", "\xc5\x4f", "\xc5\x6f", "\x00\x00",
+  /* 0x014f */ "\x00\x00", "\xcd\x4f", "\xcd\x6f", "\xea\x00", "\xfa\x00",
+  /* 0x0154 */ "\xc2\x52", "\xc2\x72", "\xcb\x52", "\xcb\x72", "\xcf\x52",
+  /* 0x0159 */ "\xcf\x72", "\xc2\x53", "\xc2\x73", "\xc3\x53", "\xc3\x73",
+  /* 0x015e */ "\xcb\x53", "\xcb\x73", "\xcf\x53", "\xcf\x73", "\xcb\x54",
+  /* 0x0163 */ "\xcb\x74", "\xcf\x54", "\xcf\x74", "\xed\x00", "\xfd\x00",
+  /* 0x0168 */ "\xc4\x55", "\xc4\x75", "\xc5\x55", "\xc5\x75", "\xc6\x55",
+  /* 0x016d */ "\xc6\x75", "\xca\x55", "\xca\x75", "\xcd\x55", "\xcd\x75",
+  /* 0x0172 */ "\xce\x55", "\xce\x75", "\xc3\x57", "\xc3\x77", "\xc3\x59",
+  /* 0x0177 */ "\xc3\x79", "\xc8\x59", "\xc2\x5a", "\xc2\x7a", "\xc7\x5a",
+  /* 0x017c */ "\xc7\x7a", "\xcf\x5a", "\xcf\x7a"
+/*
+   This table does not cover the following positions:
+
+     0x02c7    "\xcf\x20",
+     ...
+     0x02d8    "\xc6\x20", "\xc7\x20", "\xca\x20", "\xce\x20", "\x00\x00",
+     0x02dd    "\xcd\x20",
+     ...
+     0x2126    "\xe0\x00"
+
+   These would blow up the table and are therefore handled specially in
+   the code.
+*/
+};
+
+/* Direction of the transformation.  */
+enum direction
+{
+  illegal,
+  to_t61,
+  from_t61
+};
+
+struct t61_data
+{
+  enum direction dir;
+};
+
+
+int
+gconv_init (struct gconv_step *step, struct gconv_step_data *data)
+{
+  /* Determine which direction.  */
+  struct t61_data *new_data;
+  enum direction dir;
+  int result;
+
+  if (__strcasestr (step->from_name, "T.61") != NULL)
+    dir = from_t61;
+  else if (__strcasestr (step->to_name, "T.61") != NULL)
+    dir = to_t61;
+  else
+    dir = illegal;
+
+  result = GCONV_NOCONV;
+  if (dir != illegal
+      && ((new_data
+          = (struct t61_data *) malloc (sizeof (struct t61_data)))
+         != NULL))
+    {
+      new_data->dir = dir;
+      data->data = new_data;
+      result = GCONV_OK;
+    }
+
+  return result;
+}
+
+
+void
+gconv_end (struct gconv_step_data *data)
+{
+  free (data->data);
+}
+
+
+int
+gconv (struct gconv_step *step, struct gconv_step_data *data,
+       const char *inbuf, size_t *inbufsize, size_t *written, int do_flush)
+{
+  struct gconv_step *next_step = step + 1;
+  struct gconv_step_data *next_data = data + 1;
+  gconv_fct fct = next_step->fct;
+  size_t do_write;
+  int result;
+
+  /* If the function is called with no input this means we have to reset
+     to the initial state.  The possibly partly converted input is
+     dropped.  */
+  if (do_flush)
+    {
+      do_write = 0;
+
+      /* Call the steps down the chain if there are any.  */
+      if (data->is_last)
+       result = GCONV_OK;
+      else
+       {
+         struct gconv_step *next_step = step + 1;
+         struct gconv_step_data *next_data = data + 1;
+
+         result = (*fct) (next_step, next_data, NULL, 0, written, 1);
+
+         /* Clear output buffer.  */
+         data->outbufavail = 0;
+       }
+    }
+  else
+    {
+      enum direction dir = ((struct t61_data *) data->data)->dir;
+
+      do_write = 0;
+
+      do
+       {
+         result = GCONV_OK;
+
+         if (dir == from_t61)
+           {
+             size_t inchars = *inbufsize;
+             size_t outwchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+
+             while (cnt < inchars
+                    && (outwchars + sizeof (wchar_t) <= data->outbufsize))
+               {
+                 int inchar = inbuf[cnt];
+                 wchar_t ch;
+
+                 if (inchar >= '\xc1' && inchar <= '\xcf')
+                   {
+                     /* Composed character.  First test whether the next
+                        character is also available.  */
+                     int inchar2;
+
+                     if (cnt + 1 >= inchars)
+                       {
+                         /* The second character is not available.  Store
+                            the intermediate result.  */
+                         result = GCONV_INCOMPLETE_INPUT;
+                         break;
+                       }
+
+                     inchar2 = inbuf[++cnt];
+
+                     if (inchar2 < '\x20' || inchar2 >= '\x80')
+                       /* This is illegal.  */
+                       ch = L'\0';
+                     else
+                       ch = to_ucs4_comb[inchar - 0xc1][inchar2 - 0x20];
+                   }
+                 else
+                   ch = to_ucs4[inchar];
+
+                 if (ch == L'\0' && inbuf[cnt] != '\0')
+                   {
+                     /* This is an illegal character.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+
+                 *((wchar_t *) (outbuf + outwchars)) = ch;
+                 ++do_write;
+                 outwchars += sizeof (wchar_t);
+                 ++cnt;
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outwchars;
+           }
+         else
+           {
+             size_t inwchars = *inbufsize;
+             size_t outchars = data->outbufavail;
+             char *outbuf = data->outbuf;
+             size_t cnt = 0;
+             int extra = 0;
+
+             while (inwchars >= cnt + sizeof (wchar_t)
+                    && outchars < data->outbufsize)
+               {
+                 char tmp[2];
+                 int ch = *((wchar_t *) (inbuf + cnt));
+                 const char *cp;
+
+                 if (ch >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))
+                   {
+                     if (ch == 0x2126)
+                       cp = "\xe0";
+                     else if (ch == 0x2c7)
+                       cp = "\xcf\x20";
+                     else if (ch < 0x2d8 || ch > 0x2dd)
+                       /* Illegal characters.  */
+                       break;
+                     else
+                       {
+                         static const char map[5] = "\xc6\xc7\xca\xce\xcd";
+
+                         tmp[0] = map[ch - 0x2d8];
+                         tmp[1] = ' ';
+                         cp = tmp;
+                       }
+                   }
+                 else if (ch < 0 || (from_ucs4[ch][0] == '\0' && ch != 0))
+                   break;
+                 else
+                   cp = from_ucs4[ch];
+
+                 outbuf[outchars] = cp[0];
+                 /* Now test for a possible second byte and write this
+                    if possible.  */
+                 if (cp[1] != '\0')
+                   {
+                     if (outchars + 1 >= data->outbufsize)
+                       {
+                         /* The result does not fit into the buffer.  */
+                         extra = 1;
+                         break;
+                       }
+                     outbuf[++outchars] = cp[1];
+                   }
+
+                 ++do_write;
+                 ++outchars;
+                 cnt += sizeof (wchar_t);
+               }
+             *inbufsize -= cnt;
+             data->outbufavail = outchars;
+
+             if (outchars + extra < data->outbufsize)
+               {
+                 /* If there is still room in the output buffer something
+                    is wrong with the input.  */
+                 if (inwchars >= cnt + sizeof (wchar_t))
+                   {
+                     /* An error occurred.  */
+                     result = GCONV_ILLEGAL_INPUT;
+                     break;
+                   }
+                 if (inwchars != cnt)
+                   {
+                     /* There are some unprocessed bytes at the end of the
+                        input buffer.  */
+                     result = GCONV_INCOMPLETE_INPUT;
+                     break;
+                   }
+               }
+           }
+
+         if (result != GCONV_OK)
+           break;
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (*inbufsize > (dir == from_t61
+                                     ? 0 : sizeof (wchar_t) - 1)
+                       ? GCONV_FULL_OUTPUT : GCONV_EMPTY_INPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
+         if (data->outbufavail > 0)
+           {
+             /* Call the functions below in the chain.  */
+             size_t newavail = data->outbufavail;
+
+             result = (*fct) (next_step, next_data, data->outbuf, &newavail,
+                              written, 0);
+
+             /* Correct the output buffer.  */
+             if (newavail != data->outbufavail && newavail > 0)
+               {
+                 memmove (data->outbuf,
+                          &data->outbuf[data->outbufavail - newavail],
+                          newavail);
+                 data->outbufavail = newavail;
+               }
+           }
+       }
+      while (*inbufsize > 0 && result == GCONV_EMPTY_INPUT);
+    }
+
+  if (written != NULL && data->is_last)
+    *written = do_write;
+
+  return result;
+}
index f71a86e13fc437201d3eb5ceece9e8065a5290cd..298e58ed8a69ea7ff6e2046c7d450e8d93c494e2 100644 (file)
--- a/io/ftw.h
+++ b/io/ftw.h
@@ -26,7 +26,7 @@
 #include <features.h>
 
 #include <sys/types.h>
-#include <bits/stat.h>
+#include <sys/stat.h>
 
 
 __BEGIN_DECLS
index 0005f10e2d16b7948f3bcc723acc10ce23c1b6bb..bfd45307309448aaf8533d74c3f716d07f0c9171 100644 (file)
@@ -1,4 +1,4 @@
-/* pty.h - Functions for pseudo TTY handling.
+/* Functions for pseudo TTY handling.
    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -22,8 +22,8 @@
 
 #include <features.h>
 
-#include <bits/ioctl-types.h>
 #include <termios.h>
+#include <sys/ioctl.h>
 
 
 __BEGIN_DECLS
index 3e153fcfa7eeb5cd352a575114814805058a0b41..3a6bb434deafa95828e0cceb67234f7a97f79935 100644 (file)
@@ -163,11 +163,11 @@ One can use it to easily construct complex number like in
 @smallexample
 3.0 - _Imaginary_I * 4.0
 @end smallexample
-@end deftypevr
 
 @noindent
 which results in the complex number with a real part of 3.0 and a
 imaginary part -4.0.
+@end deftypevr
 
 @noindent
 A more intuitive approach is to use the following macro.
index 1a1b2698450a34ee2c9f6b0fa42fd18df0786d31..5b11a5885a2ec1596c7e7fea49c84e088ccfb02d 100644 (file)
@@ -33,7 +33,7 @@ routines      := strcat strchr strcmp strcoll strcpy strcspn          \
                   strtok_r strxfrm memchr memcmp memmove memset        \
                   mempcpy bcopy bzero ffs stpcpy stpncpy               \
                   strcasecmp strncase strcasecmp_l strncase_l          \
-                  memccpy memcpy wordcopy strsep                       \
+                  memccpy memcpy wordcopy strsep strcasestr            \
                   swab strfry memfrob memmem                           \
                   $(addprefix argz-,append count create ctsep next     \
                                     delete extract insert stringify    \
index e95d7cac96e68e36fff1d39648c23c5730f5c681..8bf4a870982fe8912ff531b7d8564b3eb86d9364 100644 (file)
@@ -154,6 +154,15 @@ extern size_t strspn __P ((__const char *__s, __const char *__accept));
 extern char *strpbrk __P ((__const char *__s, __const char *__accept));
 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
 extern char *strstr __P ((__const char *__haystack, __const char *__needle));
+
+#ifdef __USE_GNU
+/* Similar to `strstr' but this function ignores the case of both strings.  */
+extern char *__strcasestr __P ((__const char *__haystack,
+                               __const char *__needle));
+extern char *strcasestr __P ((__const char *__haystack,
+                             __const char *__needle));
+#endif
+
 /* Divide S into tokens separated by characters in DELIM.  */
 extern char *strtok __P ((char *__restrict __s,
                          __const char *__restrict __delim));
index e873d2123c939c8fc8468847c7b1b33fcbc2eb6d..8a16e14e24e2377bf7e59725adb41e24858cca37 100644 (file)
@@ -1,3 +1,7 @@
 /* Alpha is little-endian.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __LITTLE_ENDIAN
index 9aa30463d646980a250b6b4ff9037272b4df2ef9..de37019218490b0ef2faff4f6d28b47d5f5d7646 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 /* The previous bits/setjmp.h had __jmp_buf defined as a structure.
    We use an array of 'long int' instead, to make writing the
    assembler easier. Naturally, user code should not depend on
  * registers.
  */
 
-#if defined(__USE_MISC) || defined(__ASSEMBLY__)
-#define JB_S0  0
-#define JB_S1  1
-#define JB_S2  2
-#define JB_S3  3
-#define JB_S4  4
-#define JB_S5  5
-#define JB_PC  6
-#define JB_FP  7
-#define JB_SP  8
-#define JB_F2  9
-#define JB_F3  10
-#define JB_F4  11
-#define JB_F5  12
-#define JB_F6  13
-#define JB_F7  14
-#define JB_F8  15
-#define JB_F9  16
+#if defined __USE_MISC || defined __ASSEMBLY__
+# define JB_S0  0
+# define JB_S1  1
+# define JB_S2  2
+# define JB_S3  3
+# define JB_S4  4
+# define JB_S5  5
+# define JB_PC  6
+# define JB_FP  7
+# define JB_SP  8
+# define JB_F2  9
+# define JB_F3  10
+# define JB_F4  11
+# define JB_F5  12
+# define JB_F6  13
+# define JB_F7  14
+# define JB_F8  15
+# define JB_F9  16
 #endif
 
 #ifndef __ASSEMBLY__
index 7cb0e3e54360f5890c6e8a02d142b9b6d772b737..4482f0a2dd9702620f0c3dfb542550076811e2f5 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Richard Henderson <rth@tamu.edu>, 1997
 
    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
@@ -18,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
@@ -51,20 +50,20 @@ enum
 
     FE_INVALID =       1UL << 17,
 #define FE_INVALID     FE_INVALID
-    
+
     FE_ALL_EXCEPT =
        (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-#define FE_ALL_EXCEPT  FE_ALL_EXCEPT 
+#define FE_ALL_EXCEPT  FE_ALL_EXCEPT
   };
 
 
-/* Alpha chips support all four defined rouding modes. 
+/* Alpha chips support all four defined rouding modes.
 
    Note that code must be compiled to use dynamic rounding (/d) instructions
    to see these changes.  For gcc this is -mfp-rounding-mode=d; for DEC cc
-   this is -fprm d.  The default for both is static rounding to nearest. 
+   this is -fprm d.  The default for both is static rounding to nearest.
 
-   These are shifted down 58 bits from the hardware fpcr because the 
+   These are shifted down 58 bits from the hardware fpcr because the
    functions are declared to take integers.  */
 
 enum
@@ -100,5 +99,5 @@ typedef unsigned long fenv_t;
 #endif
 
 /* The system calls to talk to the kernel's FP code.  */
-extern unsigned long __ieee_get_fp_control(void);
-extern void __ieee_set_fp_control(unsigned long);
+extern unsigned long int __ieee_get_fp_control __P ((void));
+extern void __ieee_set_fp_control __P ((unsigned long int __value));
index 32f8489df2fba9b6766377e334c322ad7f513b0a..ad3b5393bcf6b35f61120b992eec939886a944dc 100644 (file)
@@ -1,3 +1,7 @@
 /* ARM is little-endian.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __LITTLE_ENDIAN
index 93b0f5f9169637b5dfd479f89d2cef66feb73145..5cf9cd75c7df1dff5cea98710094d5483aeb0656 100644 (file)
@@ -1,10 +1,14 @@
 /* Define the machine-dependent type `jmp_buf'.  ARM version. */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 #ifndef _ASM
 /* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
-#if __ARM_USES_FP
+# if __ARM_USES_FP
 typedef int __jmp_buf[22];
-#else
+# else
 typedef int __jmp_buf[10];
-#endif
+# endif
 #endif
index 9404cc452e334821e647bf258bc846fbe80cabdf..04a5efe9f096f0bb152bb479263e5da0d10d643c 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H       1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
 
 /* Swap bytes in 16 bit value.  */
 #define __bswap_16(x) \
@@ -39,5 +40,3 @@
        __r.__l[1] = __bswap_32 (__v.__l[0]);                                 \
        __r.__ll; })
 #endif
-
-#endif /* bits/byteswap.h */
index 40228e11eded19488bef691dfa14a4efe9d3a59c..46538874687a126c740b63c182d6cfc5fad811de 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
 /* Values for the NAME argument to `pathconf' and `fpathconf'.  */
 enum
   {
index 2f7dca78aa8a4671b0d2cdc8998f4698654097fc..366cdf8ce2295f94bd46e6516e2f93849d304ebb 100644 (file)
@@ -1,5 +1,5 @@
 /* Directory entry structure `struct dirent'.  Stub version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     char d_name[1];            /* Variable length.  */
index 79604fe8ff733a9423fcb776a3f278602e98a3ee..7c33694018b8cf66939b517623f6ab95bb23b64e 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef        _BITS_DLFCN_H
-#define        _BITS_DLFCN_H 1
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
 
 /* The MODE argument to `dlopen' contains one of the following: */
 #define RTLD_LAZY      0x001   /* Lazy function call binding.  */
@@ -29,5 +30,3 @@
    the symbols of the loaded object and its dependencies are made
    visible as if the object were linked directly into the program.  */
 #define RTLD_GLOBAL    0x100
-
-#endif /* bits/dlfcn.h */
index 597f079a0f05a4375ea4bd90d0a66ef2e6b881ec..45afd4ae47708c0c1953a06ed95aa6f3a8da302f 100644 (file)
@@ -6,4 +6,8 @@
    So if cross-compiling to a machine with a different byte order,
    the bits/endian.h file for that machine must exist.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #error Machine byte order unknown.
index f45deb07c10721a37e486dc577960e708a1385bb..c42540fa6177acc0a134dbbfb0be938b34fb1d8e 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
index 8f137d17347e13e1bfca58965b4ae22a6195fd89..0c30c86f334fda367fbf04e13d50475e19038a91 100644 (file)
@@ -1,6 +1,6 @@
 /* Stub `HUGE_VAL' constant.
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1992, 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
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
 #endif
 
 
index 7241bd24c3785a73821eee1b953709c0a5ec6ce7..83d7ae6b10bd0127a903981e3980b3f5b65c8cdd 100644 (file)
@@ -18,8 +18,9 @@
 
 /* Generic version.  */
 
-#ifndef _NETINET_INBITS_H
-#define _NETINET_INBITS_H 1
+#ifndef _NETINET_IN_H
+# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
+#endif
 
 /* Link numbers.  */
 #define        IMPLINK_IP              155
@@ -55,10 +56,10 @@ struct ip_opts
 
 /* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
 struct ip_mreq
-{
-  struct in_addr imr_multiaddr;        /* IP multicast address of group */
-  struct in_addr imr_interface;        /* local IP address of interface */
-};
+  {
+    struct in_addr imr_multiaddr;      /* IP multicast address of group */
+    struct in_addr imr_interface;      /* local IP address of interface */
+  };
 
 /* IPV6 socket options.  */
 #define IPV6_ADDRFORM          1
@@ -80,5 +81,3 @@ struct ip_mreq
 #define IPV6_MULTICAST_LOOP    19
 #define IPV6_ADD_MEMBERSHIP    20
 #define IPV6_DROP_MEMBERSHIP   21
-
-#endif /* netinet/inbits.h */
index 1d5c8a002f29db8fb007baa3de7171079cb5fefa..26283a0f101605d38b6645335b7bcedcbb9c26e6 100644 (file)
@@ -1,5 +1,5 @@
 /* Structure types for pre-termios terminal ioctls.  Generic Unix version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
-
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
 
-#if    defined(TIOCGETC) || defined(TIOCSETC)
+#if defined TIOCGETC || defined TIOCSETC
 /* Type of ARG for TIOCGETC and TIOCSETC requests.  */
 struct tchars
 {
@@ -41,7 +37,7 @@ struct tchars
   _IOT (_IOTS (char), 6, 0, 0, 0, 0)
 #endif
 
-#if    defined(TIOCGLTC) || defined(TIOCSLTC)
+#if defined TIOCGLTC || defined TIOCSLTC
 /* Type of ARG for TIOCGLTC and TIOCSLTC requests.  */
 struct ltchars
 {
@@ -70,7 +66,7 @@ struct sgttyb
 #define        _IOT_sgttyb     /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
 
-#if    defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
+#if defined TIOCGWINSZ || defined TIOCSWINSZ
 /* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests.  */
 struct winsize
 {
@@ -86,13 +82,13 @@ struct winsize
   _IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
 #endif
 
-#if    defined (TIOCGSIZE) || defined (TIOCSSIZE)
+#if defined TIOCGSIZE || defined TIOCSSIZE
 /* The BSD-style ioctl constructor macros use `sizeof', which can't be used
    in a preprocessor conditional.  Since the commands are always unique
    regardless of the size bits, we can safely define away `sizeof' for the
    purpose of the conditional.  */
 #  define sizeof(type) 0
-#  if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
+#  if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
 /* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
    compatibility with Sun; they define `struct ttysize' to have identical
    layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
@@ -116,6 +112,3 @@ struct ttysize
 #  endif
 #  undef sizeof                        /* See above.  */
 #endif
-
-
-#endif /* bits/ioctl-types.h */
index 3b6178bfae0ffcdfd637c2901a68f2cb0978816a..d3ecad9515ad1ac9cd2fab7a94019c7174dc5475 100644 (file)
@@ -1 +1,5 @@
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
+
 /* This space intentionally left blank.  */
index a5ecbd90b7a793a78f948e0a18fc55452946ebc2..58f419be1df3972585b6711d8e8de4abe03be38d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* 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.
 
    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>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
 
 #include <sys/types.h>
 
 #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 */
+  {
+    __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 */
+  };
index 37daa9bf8c51855851b9357807cddbb2721d85f1..a263869a0e1a44662ee9644f4660ed03718dc65b 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
 #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.  */
@@ -43,5 +39,3 @@ struct msqid_ds
   __pid_t msg_lspid;           /* pid of last msgsnd() */
   __pid_t msg_lrpid;           /* pid of last msgrcv() */
 };
-
-__END_DECLS
index 55ec70e3639d8d0dea2a942a8374573e416d92a0..68f611a428e80fc087209bbba20ffa6e8ce2824b 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 46cf9a7af59e6973fcf7d140cf28b3a072dd0683..d0ebeb56c8346a9bcb0ee6b516026a776ab1a58b 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
 /* These are the values for 4.4 BSD and GNU.  Earlier BSD systems have a
    subset of these kinds of resource limit.  In systems where `getrlimit'
    and `setrlimit' are not system calls, these are the values used by the C
@@ -107,7 +111,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
   };
 
-#include <sys/time.h>           /* For `struct timeval'.  */
+#define __need_timeval
+#include <bits/time.h>           /* For `struct timeval'.  */
 
 /* Structure which says how much of each resource has been used.  */
 struct rusage
index bb5da5676f72f5214826de80d2fc212d93c24b73..0c246c8f9a03c72de7a223a6af4680f7282cbf77 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of constants and data structure for POSIX 1003.1b-1993
    scheduling interface.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   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
@@ -19,7 +19,7 @@
    Suite 330, Boston, MA 02111-1307, USA.  */
 
 #ifndef _SCHED_H
-#error "Never use <bits/sched.h> directly; include <sched.h> instead."
+# error "Never include <bits/sched.h> directly; use <sched.h> instead."
 #endif
 
 
index 1d3e41bd56a010eee059359a0dfaa8a1e4761ab0..8b9f97c62a3eb78b56a8af5f5d9de608c0d4100c 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SEM_H
-#error "Never use <bits/sem.h> directly; include <sys/sem.h> instead."
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
 #endif
 
-
-#include <features.h>
 #include <sys/types.h>
 
 /* Flags for `semop'.  */
@@ -38,8 +35,6 @@
 #define SETALL         17              /* set all semval's */
 
 
-__BEGIN_DECLS
-
 /* Data structure describing a set of semaphores.  */
 struct semid_ds
 {
@@ -57,5 +52,3 @@ union semun
   unsigned short int *array;           /* array for GETALL & SETALL */
   struct seminfo *__buf;               /* buffer for IPC_INFO */
  };
-
-__END_DECLS
index 6620e5ab15257b2c77222399dc9c3534c439e674..9150d8d7647c755333acea7da58ddf00db4a9ab5 100644 (file)
@@ -1,3 +1,7 @@
 /* Define the machine-dependent type `jmp_buf'.  Stub version.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef int __jmp_buf[1];
index b41d0c1e86bc3d01a6a1725269070d66f34d9440..8c97999626616168920994eb4b568b0d0ee9b051 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SHM_H
-#error "Never use <bits/shm.h> directly; include <sys/shm.h> instead."
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
 #endif
 
-
-#include <features.h>
 #include <sys/types.h>
 
 /* Flags for `shmat'.  */
 #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
+  {
+    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 */
+  };
index e89479bd1c28fb9fb170d1f9005ac9949cd5b570..4499517b1a68daea5cafa9781ee2dce49a137ab4 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* These definitions match those used by the 4.4 BSD kernel.
    If the operating system has a `sigaction' system call that correctly
    implements the POSIX.1 behavior, there should be a system-dependent
index 46e4df8c64956b916a8424cff6b37f7558e42703..576fd30c3745e1bce3239f73051143fc6e187b78 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* State of this thread when the signal was taken.  */
 struct sigcontext
   {
index af42dfac78f131348bc525188b05b3005a2c3cd0..a2858b8de84300c652865becbd36e96bb2a2c53e 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SOCKET_H
-#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif
 
-
-#include <features.h>
-
 #define        __need_size_t
 #include <stddef.h>
 
-__BEGIN_DECLS
-
 /* Type for length arguments in socket calls.  */
 typedef unsigned int socklen_t;
 
@@ -201,5 +196,3 @@ struct linger
     int l_onoff;               /* Nonzero to linger on close.  */
     int l_linger;              /* Time to linger.  */
   };
-
-__END_DECLS
index 3648fed7383b58a4ad8f4e2d4ecd7c1544837b37..a0edf2be52ffbfbc8c5c7f3bcf4d2d3dae5fec4d 100644 (file)
    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.
- */
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 /* 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.  */
@@ -73,20 +70,17 @@ struct stat
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-    __dev_t st_dev;                    /* Device.  */
-
-    __ino64_t st_ino;                  /* File serial number.  */
-    __mode_t st_mode;                  /* File mode.  */
-    __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.*/
-    __off64_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.  */
-  };
-#endif
+    __dev_t st_dev;            /* Device.  */
 
+    __ino64_t st_ino;          /* File serial number.  */
+    __mode_t st_mode;          /* File mode.  */
+    __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.*/
+    __off64_t st_size;         /* Size of file, in bytes.  */
 
-#endif /* bits/stat.h */
+    __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.  */
+  };
+#endif
index 9fa3388801816f8539975fce023e174ff674afb6..a92cf523157e46120668583e89169bbdca9701bd 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
-
-#ifndef        _BITS_STATFS_H
-#define        _BITS_STATFS_H  1
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -47,6 +44,3 @@ struct statfs
     unsigned int f_namelen;
     unsigned int f_spare[6];
   };
-
-
-#endif /* bits/statfs.h */
index ef873777c9dcffa15def731080ac74ea5863a5b3..d9b8fbc749fc36b29e878f71ca2942db6ba71b35 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Stdio limits for non-POSIX systems.
+   Copyright (C) 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/* <bits/stdio_lim.h>: stdio limits for non-POSIX systems.
- * Never include this file directly; use <stdio.h> instead.
- */
-
-#ifndef _BITS_STDIO_LIM_H
-#define _BITS_STDIO_LIM_H
+#ifndef _STDIO_H
+# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
+#endif
 
 #define        L_tmpnam        1
 #define        TMP_MAX         0
 
 #ifdef __USE_POSIX
-#define        L_ctermid       1
-#define        L_cuserid       1
+# define L_ctermid     1
+# define L_cuserid     1
 #endif
 
 #define        FOPEN_MAX       16
 #define        FILENAME_MAX    14
-
-#endif
index 9a6aed2bba523bb1d7db05490a9a80686617dbcf..da059cbf0652cdcfd8967f1e28a08357060bd96b 100644 (file)
@@ -1,5 +1,5 @@
 /* termios type and macro definitions.  4.4 BSD/generic GNU version.
-   Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
+
 /* These macros are also defined in some <bits/ioctls.h> files (with
    numerically identical values), but this serves to shut up cpp's
    complaining. */
 #ifdef __USE_BSD
 
-#ifdef MDMBUF
-#undef MDMBUF
-#endif
-#ifdef FLUSHO
-#undef FLUSHO
-#endif
-#ifdef PENDIN
-#undef PENDIN
-#endif
+# ifdef MDMBUF
+#  undef MDMBUF
+# endif
+# ifdef FLUSHO
+#  undef FLUSHO
+# endif
+# ifdef PENDIN
+#  undef PENDIN
+# endif
 
 #endif /* __USE_BSD */
 
 #ifdef ECHO
-#undef ECHO
+# undef ECHO
 #endif
 #ifdef TOSTOP
-#undef TOSTOP
+# undef TOSTOP
 #endif
 #ifdef NOFLSH
-#undef NOFLSH
+# undef NOFLSH
 #endif
 
 
@@ -85,15 +89,15 @@ struct termios
   tcflag_t c_oflag;
 #define        OPOST   (1 << 0)        /* Perform output processing.  */
 #ifdef __USE_BSD
-#define        ONLCR   (1 << 1)        /* Map NL to CR-NL on output.  */
-#define        OXTABS  (1 << 2)        /* Expand tabs to spaces.  */
-#define        ONOEOT  (1 << 8)        /* Discard EOT (^D) on output.  */
+# define ONLCR (1 << 1)        /* Map NL to CR-NL on output.  */
+# define OXTABS        (1 << 2)        /* Expand tabs to spaces.  */
+# define ONOEOT        (1 << 8)        /* Discard EOT (^D) on output.  */
 #endif
 
   /* Control modes.  */
   tcflag_t c_cflag;
 #ifdef __USE_BSD
-#define        CIGNORE (1 << 0)        /* Ignore these control flags.  */
+# define CIGNORE       (1 << 0)        /* Ignore these control flags.  */
 #endif
 #define        CSIZE   (CS5|CS6|CS7|CS8)       /* Number of bits per byte (mask).  */
 #define        CS5     0               /* 5 bits per byte.  */
@@ -107,15 +111,15 @@ struct termios
 #define        HUPCL   (1 << 14)       /* Hang up on last close.  */
 #define        CLOCAL  (1 << 15)       /* Ignore modem status lines.  */
 #ifdef __USE_BSD
-#define        CCTS_OFLOW      (1 << 16)       /* CTS flow control of output.  */
-#define        CRTS_IFLOW      (1 << 17)       /* RTS flow control of input.  */
-#define        MDMBUF          (1 << 20)       /* Carrier flow control of output.  */
+# define CCTS_OFLOW    (1 << 16)       /* CTS flow control of output.  */
+# define CRTS_IFLOW    (1 << 17)       /* RTS flow control of input.  */
+# define MDMBUF                (1 << 20)       /* Carrier flow control of output.  */
 #endif
 
   /* Local modes.  */
   tcflag_t c_lflag;
 #ifdef __USE_BSD
-#define        ECHOKE  (1 << 0)        /* Visual erase for KILL.  */
+# define ECHOKE        (1 << 0)        /* Visual erase for KILL.  */
 #endif
 #define        _ECHOE  (1 << 1)        /* Visual erase for ERASE.  */
 #define        ECHOE   _ECHOE
@@ -126,15 +130,15 @@ struct termios
 #define        _ECHONL (1 << 4)        /* Echo NL even if ECHO is off.  */
 #define        ECHONL  _ECHONL
 #ifdef __USE_BSD
-#define        ECHOPRT (1 << 5)        /* Hardcopy visual erase.  */
-#define        ECHOCTL (1 << 6)        /* Echo control characters as ^X.  */
+# define ECHOPRT       (1 << 5)        /* Hardcopy visual erase.  */
+# define ECHOCTL       (1 << 6)        /* Echo control characters as ^X.  */
 #endif
 #define        _ISIG   (1 << 7)        /* Enable signals.  */
 #define        ISIG    _ISIG
 #define        _ICANON (1 << 8)        /* Do erase and kill processing.  */
 #define        ICANON  _ICANON
 #ifdef __USE_BSD
-#define        ALTWERASE (1 << 9)      /* Alternate WERASE algorithm.  */
+# define ALTWERASE (1 << 9)    /* Alternate WERASE algorithm.  */
 #endif
 #define        _IEXTEN (1 << 10)       /* Enable DISCARD and LNEXT.  */
 #define        IEXTEN  _IEXTEN
@@ -142,9 +146,9 @@ struct termios
 #define        _TOSTOP (1 << 22)       /* Send SIGTTOU for background output.  */
 #define        TOSTOP  _TOSTOP
 #ifdef __USE_BSD
-#define        FLUSHO  (1 << 23)       /* Output being flushed (state).  */
-#define        NOKERNINFO (1 << 25)    /* Disable VSTATUS.  */
-#define        PENDIN  (1 << 29)       /* Retype pending input (state).  */
+# define FLUSHO        (1 << 23)       /* Output being flushed (state).  */
+# define NOKERNINFO (1 << 25)  /* Disable VSTATUS.  */
+# define PENDIN        (1 << 29)       /* Retype pending input (state).  */
 #endif
 #define        _NOFLSH (1 << 31)       /* Disable flush after interrupt.  */
 #define        NOFLSH  _NOFLSH
@@ -153,32 +157,32 @@ struct termios
 #define        VEOF    0               /* End-of-file character [ICANON].  */
 #define        VEOL    1               /* End-of-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VEOL2   2               /* Second EOL character [ICANON].  */
+# define VEOL2 2               /* Second EOL character [ICANON].  */
 #endif
 #define        VERASE  3               /* Erase character [ICANON].  */
 #ifdef __USE_BSD
-#define        VWERASE 4               /* Word-erase character [ICANON].  */
+# define VWERASE       4               /* Word-erase character [ICANON].  */
 #endif
 #define        VKILL   5               /* Kill-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VREPRINT 6              /* Reprint-line character [ICANON].  */
+# define VREPRINT 6            /* Reprint-line character [ICANON].  */
 #endif
 #define        VINTR   8               /* Interrupt character [ISIG].  */
 #define        VQUIT   9               /* Quit character [ISIG].  */
 #define        VSUSP   10              /* Suspend character [ISIG].  */
 #ifdef __USE_BSD
-#define        VDSUSP  11              /* Delayed suspend character [ISIG].  */
+# define VDSUSP        11              /* Delayed suspend character [ISIG].  */
 #endif
 #define        VSTART  12              /* Start (X-ON) character [IXON, IXOFF].  */
 #define        VSTOP   13              /* Stop (X-OFF) character [IXON, IXOFF].  */
 #ifdef __USE_BSD
-#define        VLNEXT  14              /* Literal-next character [IEXTEN].  */
-#define        VDISCARD 15             /* Discard character [IEXTEN].  */
+# define VLNEXT        14              /* Literal-next character [IEXTEN].  */
+# define VDISCARD 15           /* Discard character [IEXTEN].  */
 #endif
 #define        VMIN    16              /* Minimum number of bytes read at once [!ICANON].  */
 #define        VTIME   17              /* Time-out value (tenths of a second) [!ICANON].  */
 #ifdef __USE_BSD
-#define        VSTATUS 18              /* Status character [ICANON].  */
+# define VSTATUS       18              /* Status character [ICANON].  */
 #endif
 #define        NCCS    20              /* Value duplicated in <hurd/tioctl.defs>.  */
   cc_t c_cc[NCCS];
@@ -202,8 +206,8 @@ struct termios
 #define        B19200  19200           /* 19200 baud.  */
 #define        B38400  38400           /* 38400 baud.  */
 #ifdef __USE_BSD
-#define        EXTA    19200
-#define        EXTB    38400
+# define EXTA  19200
+# define EXTB  38400
 #endif
 };
 
@@ -215,7 +219,7 @@ struct termios
 #define        TCSADRAIN       1       /* Change when pending output is written.  */
 #define        TCSAFLUSH       2       /* Flush pending input before changing.  */
 #ifdef __USE_BSD
-#define        TCSASOFT        0x10    /* Flag: Don't alter hardware state.  */
+# define TCSASOFT      0x10    /* Flag: Don't alter hardware state.  */
 #endif
 
 /* Values for the QUEUE_SELECTOR argument to `tcflush'.  */
index e41a991b449d4a15fd23a1e90590dda0cee4afe3..cdbd39f91d97fa30f0fe1d4fba6302e05a62420f 100644 (file)
  * Never include this file directly; use <time.h> instead.
  */
 
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+#  define _BITS_TIME_H 1
+
+#  define CLOCKS_PER_SEC 60
+
+# endif        /* bits/time.h */
+#endif
+
+
 #ifdef __need_timeval
 # undef __need_timeval
 # ifndef _STRUCT_TIMEVAL
@@ -34,11 +44,3 @@ struct timeval
   };
 # endif        /* struct timeval */
 #endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define        _BITS_TIME_H    1
-
-#define CLOCKS_PER_SEC 60
-
-#endif /* bits/time.h */
index 1a12697008a344d7a797e10aa70de031a160378f..56533c1c587d180b83694bf7775d081c9997b467 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_UIO_H
-#error "Never use <bits/uio.h> directly; include <sys/uio.h> instead."
+# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
 #endif
 
 
index ccc318bfa1058173fdd8491747a08be3bc096b04..62817d36d17ae7e5401d3aaf5da406efaa7ff73e 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMP_H
-# error "Never use <bits/utmp.h> directly; include <utmp.h> instead."
+# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
 #endif
 
-
-#include <features.h>
-
 #include <paths.h>
 #include <time.h>
 
@@ -31,7 +28,6 @@
 #define        UT_LINESIZE     8
 #define        UT_HOSTSIZE     16
 
-__BEGIN_DECLS
 
 struct lastlog
   {
@@ -51,5 +47,3 @@ struct utmp
 
 
 #define _HAVE_UT_HOST 1                /* We have the ut_host field.  */
-
-__END_DECLS
index f85fce0052fc1bcc6f72691b9070f3bf9d887b80..e22660f6d688b5a2e20d398ed03640239eea82a4 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMPX_H
-#error "Never use <bits/utmpx.h> directly; include <utmpx.h> instead."
+# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
 #endif
 
 
@@ -26,9 +26,9 @@
 #define        __UT_HOSTSIZE   16
 
 struct utmpx
-{
-  char ut_line[__UT_LINESIZE];
-  char ut_name[__UT_NAMESIZE];
-  char ut_host[__UT_HOSTSIZE];
-  long ut_time;
-};
+  {
+    char ut_line[__UT_LINESIZE];
+    char ut_name[__UT_NAMESIZE];
+    char ut_host[__UT_HOSTSIZE];
+    long int ut_time;
+  };
index 5594bcc4dacc4c1cb8effe978781bdf27d1632b8..ea3f163cefbc2fc4ece681a6ced5c6b4a81c9a47 100644 (file)
@@ -1,3 +1,25 @@
+/* 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 /* The size of the character arrays used to hold the information
    in a `struct utsname'.  Enlarge this as necessary.  */
 #define        _UTSNAME_LENGTH 1024
index 127eb6ce4cb8a66df6af80ccc18d659fa97be8fe..596df932b7d6f03980f6adbc52415acd65084c4c 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
 #endif
 
 
index 8e97f2702c8182ffdee5a1958d88616211882705..1ec55107f98b9861798df05b3414eb9ed511aa9e 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitstatus.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
 #endif
 
 
 
 /* Nonzero if STATUS indicates termination by a signal.  */
 #ifdef __GNUC__
-#define        __WIFSIGNALED(status)                                                 \
+# define __WIFSIGNALED(status) \
   (__extension__ ({ int __status = (status);                                 \
                    !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
 #else  /* Not GCC.  */
-#define        __WIFSIGNALED(status)   (!__WIFSTOPPED(status) && !__WIFEXITED(status))
+# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
 #endif /* GCC.  */
 
 /* Nonzero if STATUS indicates the child is stopped.  */
 
 #ifdef __USE_BSD
 
-#include <endian.h>
+# include <endian.h>
 
 union wait
   {
     int w_status;
     struct
       {
-#if    __BYTE_ORDER == __LITTLE_ENDIAN
+# if   __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int __w_termsig:7; /* Terminating signal.  */
        unsigned int __w_coredump:1; /* Set if dumped core.  */
        unsigned int __w_retcode:8; /* Return code if exited normally.  */
        unsigned int:16;
-#endif                         /* Little endian.  */
-#if    __BYTE_ORDER == __BIG_ENDIAN
+# endif                                /* Little endian.  */
+# if   __BYTE_ORDER == __BIG_ENDIAN
        unsigned int:16;
        unsigned int __w_retcode:8;
        unsigned int __w_coredump:1;
        unsigned int __w_termsig:7;
-#endif                         /* Big endian.  */
+# endif                                /* Big endian.  */
       } __wait_terminated;
     struct
       {
-#if    __BYTE_ORDER == __LITTLE_ENDIAN
+# if   __BYTE_ORDER == __LITTLE_ENDIAN
        unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
        unsigned int __w_stopsig:8; /* Stopping signal.  */
        unsigned int:16;
-#endif                         /* Little endian.  */
-#if    __BYTE_ORDER == __BIG_ENDIAN
+# endif                                /* Little endian.  */
+# if   __BYTE_ORDER == __BIG_ENDIAN
        unsigned int:16;
        unsigned int __w_stopsig:8; /* Stopping signal.  */
        unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
-#endif                         /* Big endian.  */
+# endif                                /* Big endian.  */
       } __wait_stopped;
   };
 
-#define        w_termsig       __wait_terminated.__w_termsig
-#define        w_coredump      __wait_terminated.__w_coredump
-#define        w_retcode       __wait_terminated.__w_retcode
-#define        w_stopsig       __wait_stopped.__w_stopsig
-#define        w_stopval       __wait_stopped.__w_stopval
+# define w_termsig     __wait_terminated.__w_termsig
+# define w_coredump    __wait_terminated.__w_coredump
+# define w_retcode     __wait_terminated.__w_retcode
+# define w_stopsig     __wait_stopped.__w_stopsig
+# define w_stopval     __wait_stopped.__w_stopval
 
 #endif /* Use BSD.  */
diff --git a/sysdeps/generic/strcasestr.c b/sysdeps/generic/strcasestr.c
new file mode 100644 (file)
index 0000000..ec8727d
--- /dev/null
@@ -0,0 +1,129 @@
+/* Return the offset of one string within another.
+   Copyright (C) 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.  */
+
+/*
+ * My personal strstr() implementation that beats most other algorithms.
+ * Until someone tells me otherwise, I assume that this is the
+ * fastest implementation of strstr() in C.
+ * I deliberately chose not to comment it.  You should have at least
+ * as much fun trying to understand it, as I had to write it :-).
+ *
+ * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de        */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
+
+typedef unsigned chartype;
+
+#undef strstr
+
+char *
+__strcasestr (phaystack, pneedle)
+     const char *phaystack;
+     const char *pneedle;
+{
+  register const unsigned char *haystack, *needle;
+  register chartype b, c;
+
+  haystack = (const unsigned char *) phaystack;
+  needle = (const unsigned char *) pneedle;
+
+  b = tolower (*needle);
+  if (b != '\0')
+    {
+      haystack--;                              /* possible ANSI violation */
+      do
+       {
+         c = *++haystack;
+         if (c == '\0')
+           goto ret0;
+       }
+      while (tolower (c) != b);
+
+      c = tolower (*++needle);
+      if (c == '\0')
+       goto foundneedle;
+      ++needle;
+      goto jin;
+
+      for (;;)
+        {
+          register chartype a;
+         register const unsigned char *rhaystack, *rneedle;
+
+         do
+           {
+             a = *++haystack;
+             if (a == '\0')
+               goto ret0;
+             if (tolower (a) == b)
+               break;
+             a = *++haystack;
+             if (a == '\0')
+               goto ret0;
+shloop:            }
+          while (tolower (a) != b);
+
+jin:     a = *++haystack;
+         if (a == '\0')
+           goto ret0;
+
+         if (tolower (a) != c)
+           goto shloop;
+
+         rhaystack = haystack-- + 1;
+         rneedle = needle;
+         a = tolower (*rneedle);
+
+         if (tolower (*rhaystack) == a)
+           do
+             {
+               if (a == '\0')
+                 goto foundneedle;
+               ++rhaystack;
+               a = tolower (*++needle);
+               if (tolower (*rhaystack) != a)
+                 break;
+               if (a == '\0')
+                 goto foundneedle;
+               ++rhaystack;
+               a = tolower (*++needle);
+             }
+           while (tolower (*rhaystack) == a);
+
+         needle = rneedle;             /* took the register-poor approach */
+
+         if (a == '\0')
+           break;
+        }
+    }
+foundneedle:
+  return (char*) haystack;
+ret0:
+  return 0;
+}
+
+weak_alias (__strcasestr, strcasestr)
index 163f6427ec9608523eed7a2b8a98f0c4de202964..6a0beb61a9341ed0258e35c4db479b1764136052 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMP_H
-#error "Never use <bits/utmp.h> directly; include <utmpx.h> instead."
+# error "Never include <bits/utmp.h> directly; use <utmpx.h> instead."
 #endif
 
 #include <paths.h>
 /* The structure describing an entry in the database of
    previous logins.  */
 struct lastlog
-{
-  time_t ll_time;
-  char ll_line[UT_LINESIZE];
-  char ll_host[UT_HOSTSIZE];
-};
+  {
+    __time_t ll_time;
+    char ll_line[UT_LINESIZE];
+    char ll_host[UT_HOSTSIZE];
+  };
 
 
 /* The structure describing the status of a terminated process.  This
    type is used in `struct utmp' below.  */
 struct exit_status
-{
-  short int e_termination;     /* Process termination status.  */
-  short int e_exit;            /* Process exit status.  */
-};
+  {
+    short int e_termination;   /* Process termination status.  */
+    short int e_exit;          /* Process exit status.  */
+  };
 
 
 /* The structure describing an entry in the user accounting database.  */
 struct utmp
-{
-  short int ut_type;           /* Type of login.  */
-  pid_t ut_pid;                        /* Process ID of login process.  */
-  char ut_line[UT_LINESIZE];   /* Devicename.  */
-  char ut_id[4];               /* Inittab ID.  */
-  char ut_user[UT_NAMESIZE];   /* Username.  */
-  char ut_host[UT_HOSTSIZE];   /* Hostname for remote login.  */
-  struct exit_status ut_exit;  /* Exit status of a process marked
+  {
+    short int ut_type;         /* Type of login.  */
+    pid_t ut_pid;              /* Process ID of login process.  */
+    char ut_line[UT_LINESIZE]; /* Devicename.  */
+    char ut_id[4];             /* Inittab ID.  */
+    char ut_user[UT_NAMESIZE]; /* Username.  */
+    char ut_host[UT_HOSTSIZE]; /* Hostname for remote login.  */
+    struct exit_status ut_exit;        /* Exit status of a process marked
                                   as DEAD_PROCESS.  */
-  long ut_session;             /* Session ID, used for windowing.  */
-  struct timeval ut_tv;                /* Time entry was made.  */
-  int32_t ut_addr_v6[4];       /* Internet address of remote host.  */
-  char pad[20];                        /* Reserved for future use.  */
-};
+    long ut_session;           /* Session ID, used for windowing.  */
+    struct timeval ut_tv;      /* Time entry was made.  */
+    int32_t ut_addr_v6[4];     /* Internet address of remote host.  */
+    char pad[20];              /* Reserved for future use.  */
+  };
 
 /* Backwards compatibility hacks.  */
 #define ut_name                ut_user
index 4f1a876d0a1926065a3f174e73a2bfb89d259e88..4ecbb3a026d2f77148fc292066b2ffb0a39f5130 100644 (file)
@@ -1,6 +1,5 @@
 /* Structures and defenitions for the user accounting database.  GNU version.
    Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
 
    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
@@ -18,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMPX_H
-#error "Never use <bits/utmpx.h> directly; include <utmpx.h> instead."
+# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
 #endif
 
 #include <bits/types.h>
 #define __UT_NAMESIZE  32
 #define __UT_HOSTSIZE  256
 
-   
+
 /* The structure describing the status of a terminated process.  This
    type is used in `struct utmpx' below.  */
 struct __exit_status
-{
-  short int e_termination;     /* Process termination status.  */
-  short int e_exit;            /* Process exit status.  */
-};
+  {
+    short int e_termination;   /* Process termination status.  */
+    short int e_exit;          /* Process exit status.  */
+  };
 
 
 /* The structure describing an entry in the user accounting database.  */
@@ -50,7 +49,7 @@ struct utmpx
   char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login.  */
   struct __exit_status ut_exit;        /* Exit status of a process marked
                                   as DEAD_PROCESS.  */
-  long ut_session;             /* Session ID, used for windowing.  */
+  long int ut_session;         /* Session ID, used for windowing.  */
   struct timeval ut_tv;                /* Time entry was made.  */
   __int32_t ut_addr_v6[4];     /* Internet address of remote host.  */
   char pad[20];                        /* Reserved for future use.  */
@@ -69,11 +68,3 @@ struct utmpx
 #define LOGIN_PROCESS  6       /* Session leader of a logged in user.  */
 #define USER_PROCESS   7       /* Normal process.  */
 #define DEAD_PROCESS   8       /* Terminated process.  */
-
-
-
-
-
-
-
-
index 0ec5d26a381e2290cb462e28f218951e97666f6c..7e039deb8f7804926cd481d9c804062d8c035196 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <sysdep.h>
 #define _ASM
+#define _SETJMP_H
 #include <bits/setjmp.h>
 
 ENTRY (__longjmp)
index 326962e621fdd73b7ef330a665ce5ada97ad40c1..bf55c890ba2314dde2d61eb094060114210422af 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H       1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
 
 /* Swap bytes in 16 bit value.  */
 #define __bswap_constant_16(x) \
@@ -88,5 +89,3 @@
        __r.__l[1] = __bswap_32 (__v.__l[0]);                                 \
        __r.__ll; })
 #endif
-
-#endif /* bits/byteswap.h */
index a5d6c5ea92221a66978c5e8ca4a0574f949e69c5..54bd9d14bb34dae4a0708a92af5a5eed924c8098 100644 (file)
@@ -1,3 +1,7 @@
 /* i386 is little-endian.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __LITTLE_ENDIAN
index 65a06d8f3cc9d2f9c3235faf2dd668ed22b3c624..23127b403186ee4bcecea55d911d1b388dbdc820 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
 #endif
 
-
 #include <features.h>
-#include <sys/cdefs.h>
 
 /* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
 
 
 #define __huge_val_t   union { unsigned char __c[8]; double __d; }
 #ifdef __GNUC__
-#define        HUGE_VAL        (__extension__ \
+# define HUGE_VAL      (__extension__ \
                         ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
 #else  /* Not GCC.  */
 static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
-#define        HUGE_VAL        (__huge_val.__d)
+# define HUGE_VAL      (__huge_val.__d)
 #endif /* GCC.  */
 
 
@@ -44,27 +42,27 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 #ifdef __USE_ISOC9X
 
-#define        __HUGE_VALF_bytes       { 0, 0, 0x80, 0x7f }
+# define __HUGE_VALF_bytes     { 0, 0, 0x80, 0x7f }
 
-#define __huge_valf_t  union { unsigned char __c[4]; float __f; }
-#ifdef __GNUC__
-#define        HUGE_VALF       (__extension__ \
+# define __huge_valf_t union { unsigned char __c[4]; float __f; }
+# ifdef        __GNUC__
+#  define HUGE_VALF    (__extension__ \
                         ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
-#else  /* Not GCC.  */
+# else /* Not GCC.  */
 static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#define        HUGE_VALF       (__huge_valf.__f)
-#endif /* GCC.  */
+#  define HUGE_VALF    (__huge_valf.__f)
+# endif        /* GCC.  */
 
 
-#define        __HUGE_VALL_bytes       { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
+# define __HUGE_VALL_bytes     { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
 
-#define __huge_vall_t  union { unsigned char __c[12]; long double __ld; }
-#ifdef __GNUC__
-#define        HUGE_VALL       (__extension__ \
+# define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
+# ifdef        __GNUC__
+#  define HUGE_VALL    (__extension__ \
                         ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-#else  /* Not GCC.  */
+# else /* Not GCC.  */
 static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-#define        HUGE_VALL       (__huge_vall.__ld)
-#endif /* GCC.  */
+#  define HUGE_VALL    (__huge_vall.__ld)
+# endif        /* GCC.  */
 
 #endif /* __USE_ISOC9X.  */
index 0c03073b365f7f57b9fcd5354b254d1ae1619481..5cb60a8c7d2567a090865281164710945a15bfca 100644 (file)
@@ -1,12 +1,16 @@
 /* Define the machine-dependent type `jmp_buf'.  Intel 386 version.  */
 
-#if    defined (__USE_MISC) || defined (_ASM)
-#define        JB_BX   0
-#define        JB_SI   1
-#define        JB_DI   2
-#define        JB_BP   3
-#define        JB_SP   4
-#define        JB_PC   5
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#if defined __USE_MISC || defined _ASM
+# define JB_BX 0
+# define JB_SI 1
+# define JB_DI 2
+# define JB_BP 3
+# define JB_SP 4
+# define JB_PC 5
 #endif
 
 #ifndef        _ASM
index d73e84364f62ef35af3353a43e8b2383a69f8b20..bc4890c215a362e8bf6461d9286c9156e59c70bb 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <sysdep.h>
 #define _ASM
+#define _SETJMP_H
 #include <bits/setjmp.h>
 
        /* We include the BSD entry points here as well but we make
index 63f3e52958712cbe43aaf0afc21da7a6032acc3c..4d06b01be307ba6c21c1c325e80ebd8967791adf 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
@@ -61,7 +61,8 @@ enum
 typedef unsigned short int fexcept_t;
 
 
-/* Type representing floating-point environment.  This function corresponds to the layout of the block written by the `fstenv'.  */
+/* Type representing floating-point environment.  This function corresponds
+   to the layout of the block written by the `fstenv'.  */
 typedef struct
   {
     unsigned short int control_word;
index fe0144c734048e535f87cd2d57cf083796108254..f49d65661ae8d985439df2184ebe8b1151f1ca95 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
 #endif
 
-
 #include <features.h>
 
 /* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
 
 #ifdef __GNUC__
 
-#define HUGE_VAL                                                            \
-  (__extension__                                                            \
-   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
+# define HUGE_VAL \
+  (__extension__                                                             \
+   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
     { __l: 0x7ff0000000000000ULL }).__d)
 
 #else /* not GCC */
 
-#include <sys/cdefs.h>
-#include <endian.h>
+# include <endian.h>
 
 typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
 
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define        __HUGE_VAL_bytes        { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define        __HUGE_VAL_bytes        { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
-#endif
+# if __BYTE_ORDER == __BIG_ENDIAN
+#  define __HUGE_VAL_bytes     { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  define __HUGE_VAL_bytes     { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+# endif
 
 static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
-#define        HUGE_VAL        (__huge_val.__d)
+# define HUGE_VAL      (__huge_val.__d)
 
 #endif /* GCC.  */
 
@@ -58,32 +56,32 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 #ifdef __USE_ISOC9X
 
-#ifdef __GNUC__
+# ifdef __GNUC__
 
-#define HUGE_VALF                                                           \
-  (__extension__                                                            \
-   ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })  \
+#  define HUGE_VALF \
+  (__extension__                                                             \
+   ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
     { __l: 0x7f800000UL }).__d)
 
-#else /* not GCC */
+# else /* not GCC */
 
 typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
 
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define        __HUGE_VALF_bytes       { 0x7f, 0x80, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define        __HUGE_VALF_bytes       { 0, 0, 0x80, 0x7f }
-#endif
+#  if __BYTE_ORDER == __BIG_ENDIAN
+#   define __HUGE_VALF_bytes   { 0x7f, 0x80, 0, 0 }
+#  endif
+#  if __BYTE_ORDER == __LITTLE_ENDIAN
+#   define __HUGE_VALF_bytes   { 0, 0, 0x80, 0x7f }
+#  endif
 
 static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#define        HUGE_VALF       (__huge_valf.__f)
+#  define HUGE_VALF    (__huge_valf.__f)
 
-#endif /* GCC.  */
+# endif        /* GCC.  */
 
 
 /* Generally there is no separate `long double' format and it is the
    same as `double'.  */
-#define HUGE_VALL HUGE_VAL
+# define HUGE_VALL HUGE_VAL
 
 #endif /* __USE_ISOC9X.  */
index 54ec0d1920ea2c21c83ecaeece3eae39f2984b89..41bbe59782fa5b71370f544c1fc700fd360886c5 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H       1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
 
 /* Swap bytes in 16 bit value.  We don't provide an assembler version
    because GCC is smart enough to generate optimal assembler output, and
@@ -32,7 +33,7 @@
    (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
 
 #if defined __GNUC__ && __GNUC__ >= 2
-#define __bswap_32(x) \
+# define __bswap_32(x) \
   __extension__                                        \
   ({ unsigned int __v;                         \
      if (__builtin_constant_p (x))             \
                             : "0" (x));        \
      __v; })
 #else
-#define __bswap_32(x) __bswap_constant_32 (x)
+# define __bswap_32(x) __bswap_constant_32 (x)
 #endif
 
 #if defined __GNUC__ && __GNUC__ >= 2
 /* Swap bytes in 64 bit value.  */
-#define __bswap_64(x) \
+# define __bswap_64(x) \
   __extension__                                                \
   ({ union { unsigned long long int __ll;              \
             unsigned long int __l[2]; } __v, __r;      \
@@ -59,5 +60,3 @@
      __r.__l[1] = __bswap_32 (__v.__l[0]);             \
      __r.__ll; })
 #endif
-
-#endif /* bits/byteswap.h */
index 6f985293f25d1d02889a47f78d311e8ff1ba5cdd..bf4ecb60a4c2b8af24a2357de9c23b2975e0fcc2 100644 (file)
@@ -1,3 +1,7 @@
 /* m68k is big-endian.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __BIG_ENDIAN
index 96240f0d8ecfa751dccbfb28ecaa2c25e3233d49..2991232915c454a3b6058d238d143d895d2a90c7 100644 (file)
@@ -1,5 +1,9 @@
 /* Define the machine-dependent type `jmp_buf'.  m68k version.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef struct
   {
     /* There are eight 4-byte data registers, but D0 is not saved.  */
@@ -7,10 +11,10 @@ typedef struct
 
     /* There are six 4-byte address registers, plus the FP and SP.  */
     int *__aregs[6];
-    int * __fp;
-    int * __sp;
+    int *__fp;
+    int *__sp;
 
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __HAVE_FPU__
     /* There are eight floating point registers which
        are saved in IEEE 96-bit extended format.  */
     char __fpregs[8 * (96 / 8)];
index ce071b93ff7c72fbcae4312b3e0e28e3198492a2..a11e0724f1217a8e1d896e303d8b28f9f6cc7248 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
index 3b17a4ada808c34be4ba0d6d93f203d1704269b6..a2c8163599af1929ebfb541a4611c4890389d1a7 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
 
index b04438bccae3f3723d64935ed7f5af1aa9923da8..a5dc446c67937385bbf52b214c5333277a9090bf 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef        _BITS_IOCTLS_H
-#define        _BITS_IOCTLS_H  1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* These macros are also defined in <bits/termios.h> (with numerically
    identical values) but this serves to shut up cpp's complaining. */
 #ifdef MDMBUF
-#undef MDMBUF
+# undef MDMBUF
 #endif
 #ifdef ECHO
-#undef ECHO
+# undef ECHO
 #endif
 #ifdef TOSTOP
-#undef TOSTOP
+# undef TOSTOP
 #endif
 #ifdef FLUSHO
-#undef FLUSHO
+# undef FLUSHO
 #endif
 #ifdef PENDIN
-#undef PENDIN
+# undef PENDIN
 #endif
 #ifdef NOFLSH
-#undef NOFLSH
+# undef NOFLSH
 #endif
 
 /* Hurd ioctl request are made up of several fields:
@@ -331,23 +328,20 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
 
 /* From 4.4 <sys/ttydev.h>.   */
 #ifdef USE_OLD_TTY
-#define B0     0
-#define B50    1
-#define B75    2
-#define B110   3
-#define B134   4
-#define B150   5
-#define B200   6
-#define B300   7
-#define B600   8
-#define B1200  9
-#define        B1800   10
-#define B2400  11
-#define B4800  12
-#define B9600  13
-#define EXTA   14
-#define EXTB   15
+# define B0    0
+# define B50   1
+# define B75   2
+# define B110  3
+# define B134  4
+# define B150  5
+# define B200  6
+# define B300  7
+# define B600  8
+# define B1200 9
+# define B1800 10
+# define B2400 11
+# define B4800 12
+# define B9600 13
+# define EXTA  14
+# define EXTB  15
 #endif /* USE_OLD_TTY */
-
-
-#endif /* bits/ioctls.h */
index 4679c589eeacba71f31de8b9a28d022ef4e00801..df50a0901f5bee43f1b70e547d8533071308cfeb 100644 (file)
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -189,6 +186,3 @@ struct stat64
 #ifdef __USE_BSD
 #define        CMASK           0022
 #endif
-
-
-#endif /* bits/stat.h */
index f450125463897d15fdad7fc2687295bfa0005521..f0b4ff7a9b97f5e94bf65bcbfd717611a68f680d 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
 
index 6539cf97d67a853aa0f9ce653b305911d49a7c1e..c5edb3119ee6faa5bbcb6b42c1e5f0a296c26f36 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
 
index 64a57ab08646a2e6716125212b1fda5498cf7ed2..910618e32ad94f49d24bebd88e9c7d26f0fffefe 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
 
index 636da5662d0bc5e430666471117d2a302ae9b21d..c105537dfd356c3d6893850afc4f80a11765ae5d 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef        _BITS_DLFCN_H
-#define        _BITS_DLFCN_H 1
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
 
 /* The MODE argument to `dlopen' contains one of the following: */
 #define RTLD_LAZY      0x001   /* Lazy function call binding.  */
 __BEGIN_DECLS
 
 /* Some SGI specific calls that aren't implemented yet.  */
-extern void *sgidladd __P ((const char *, int));
-extern void *sgidlopen_version __P ((const char *, int, const char *, int));
-extern char *sgigetdsoversion __P ((const char *));
+extern void *sgidladd __P ((__const char *, int));
+extern void *sgidlopen_version __P ((__const char *, int, __const char *,
+                                    int));
+extern char *sgigetdsoversion __P ((__const char *));
 
 __END_DECLS
-
-#endif /* bits/dlfcn.h */
index ba555cd76e4e8dc8cf57049241aa40af5e6d9f2b..40321a28665913d005d463380194150e042b6fc2 100644 (file)
@@ -1,4 +1,8 @@
 /* The MIPS architecture has selectable endianness.
    This file is for a machine using big-endian mode.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __BIG_ENDIAN
index 7e570c6bff270f1920df1020978202a232f1d480..ff3d75f8210f723235f3b36218bb279e681a20a9 100644 (file)
@@ -1,6 +1,5 @@
 /* Define the machine-dependent type `jmp_buf'.  MIPS version.
    Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef struct
   {
     /* Program counter.  */
index 157bc44d065e70f6367e54ef38517be49db5055c..0bdb378944a16597f4151150fc04c5cfb581f3bb 100644 (file)
@@ -1,4 +1,8 @@
 /* The MIPS architecture has selectable endianness.
    The DECstation uses little-endian mode.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __LITTLE_ENDIAN
index b1085405058be12944dc1dc765db1b12a1bd6d91..9f08f4e1aff1cb54d2bff822ef5446c44da30c67 100644 (file)
@@ -1,7 +1,6 @@
 /* Define the machine-dependent type `jmp_buf'.  MIPS version.
    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef struct
   {
     /* Program counter.  */
index 5da5965cb22a2864c3406a65db0a80751f623d42..2241190a70b17b655fab260379d4c5f1eb4244cd 100644 (file)
@@ -1,4 +1,8 @@
 /* The MIPS architecture has selectable endianness.
    This file is for a machine using little-endian mode.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __LITTLE_ENDIAN
index e4b0119433caabd19f589f82bb5ddebaad52af86..f6cdde2cb3359f1819a542988423d942a1858142 100644 (file)
@@ -1,4 +1,8 @@
 /* The MIPS has selectable endianness.
    The Japanese homebrew P40 architecture uses big-endian mode.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __BIG_ENDIAN
index d40d8d682292fb188217cb6253d8ae14fa9c3966..c7fda3eb2c9379758bb312188a812f291a54760d 100644 (file)
@@ -217,6 +217,7 @@ __getcwd (buf, size)
   char *path;
   register char *pathp;
   struct stat st;
+  int prev_errno = errno;
 
   if (size == 0)
     {
@@ -310,6 +311,9 @@ __getcwd (buf, size)
       dirstream = __opendir (dotp);
       if (dirstream == NULL)
        goto lose;
+      /* Clear errno to distinguish EOF from error if readdir returns
+        NULL.  */
+      __set_errno (0);
       while ((d = __readdir (dirstream)) != NULL)
        {
          if (d->d_name[0] == '.' &&
@@ -343,6 +347,10 @@ __getcwd (buf, size)
        {
          int save = errno;
          (void) __closedir (dirstream);
+         if (save == 0)
+           /* EOF on dirstream, which means that the current directory
+              has been removed.  */
+           save = ENOENT;
          __set_errno (save);
          goto lose;
        }
@@ -393,6 +401,10 @@ __getcwd (buf, size)
     free ((__ptr_t) dotlist);
 
   memmove (path, pathp, path + size - pathp);
+
+  /* Restore errno on successful return.  */
+  __set_errno (prev_errno);
+
   return path;
 
  lose:
index 7009c4ef1095ce5da0fde0982b62062989298579..c268b642de4db36a3cc8c94caae984b0f040e68e 100644 (file)
 int
 main()
 {
+  /* Print copyright message.  */
+  printf ("\
+/* Stdio limits for POSIX systems.\n\
+   Copyright (C) 1994, 1997 Free Software Foundation, Inc.\n\
+   This file is part of the GNU C Library.\n\
+\n\
+   The GNU C Library is free software; you can redistribute it and/or\n\
+   modify it under the terms of the GNU Library General Public License as\n\
+   published by the Free Software Foundation; either version 2 of the\n\
+   License, or (at your option) any later version.\n\
+\n\
+   The GNU C Library is distributed in the hope that it will be useful,\n\
+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n\
+   Library General Public License for more details.\n\
+\n\
+   You should have received a copy of the GNU Library General Publicn\n\
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,\n\
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n\
+   Boston, MA 02111-1307, USA.  */\n\
+\n\
+#ifndef _STDIO_H\n\
+# error \"Never include <bits/stdio_lim.h> directly; use <stdio.h> instead.\"\n\
+#endif\n\
+\n");
+
   /* These values correspond to the code in sysdeps/posix/tempname.c.
      Change the values here if you change that code.  */
   printf ("#define L_tmpnam %u\n", sizeof ("/usr/tmp/") + 9);
index d3ff74f12f2e96b3113b26410fa40a76d59f0ff2..9259da80397ea29e80cf783cb2ef7a0276a66122 100644 (file)
 
 /* PowerPC can be little or big endian.  Hopefully gcc will know...  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
 # if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
 #  error Please fix sysdeps/powerpc/bits/endian.h (compiling bi-endian?).
index 9bb66003246595a3dac21e081c523ba76b03be6a..14fbda8db00494e81fe542dac838aad0946073f1 100644 (file)
@@ -52,44 +52,44 @@ enum
 
     /* Operation with SNaN. */
     FE_INVALID_SNAN = 1 << 31-7,
-#define FE_INVALID_SNAN        FE_INVALID_SNAN
+# define FE_INVALID_SNAN       FE_INVALID_SNAN
 
     /* Inf - Inf */
     FE_INVALID_ISI = 1 << 31-8,
-#define FE_INVALID_ISI FE_INVALID_ISI
+# define FE_INVALID_ISI                FE_INVALID_ISI
 
     /* Inf / Inf */
     FE_INVALID_IDI = 1 << 31-9,
-#define FE_INVALID_IDI FE_INVALID_IDI
+# define FE_INVALID_IDI                FE_INVALID_IDI
 
     /* 0 / 0 */
     FE_INVALID_ZDZ = 1 << 31-10,
-#define FE_INVALID_ZDZ FE_INVALID_ZDZ
+# define FE_INVALID_ZDZ                FE_INVALID_ZDZ
 
     /* Inf * 0 */
     FE_INVALID_IMZ = 1 << 31-11,
-#define FE_INVALID_IMZ FE_INVALID_IMZ
+# define FE_INVALID_IMZ                FE_INVALID_IMZ
 
     /* Comparison with NaN or SNaN.  */
     FE_INVALID_COMPARE = 1 << 31-12,
-#define FE_INVALID_COMPARE     FE_INVALID_COMPARE
+# define FE_INVALID_COMPARE    FE_INVALID_COMPARE
 
     /* Invalid operation flag for software (not set by hardware).  */
     /* Note that some chips don't have this implemented, presumably
        because no-one expected anyone to write software for them %-).  */
     FE_INVALID_SOFTWARE = 1 << 31-21,
-#define FE_INVALID_SOFTWARE    FE_INVALID_SOFTWARE
+# define FE_INVALID_SOFTWARE   FE_INVALID_SOFTWARE
 
     /* Square root of negative number (including -Inf).  */
     /* Note that some chips don't have this implemented.  */
     FE_INVALID_SQRT = 1 << 31-22,
-#define FE_INVALID_SQRT        FE_INVALID_SQRT
+# define FE_INVALID_SQRT       FE_INVALID_SQRT
 
     /* Conversion-to-integer of a NaN or a number too large or too small.  */
     FE_INVALID_INTEGER_CONVERSION = 1 << 31-23,
-#define FE_INVALID_INTEGER_CONVERSION  FE_INVALID_INTEGER_CONVERSION
+# define FE_INVALID_INTEGER_CONVERSION FE_INVALID_INTEGER_CONVERSION
 
-#define FE_ALL_INVALID \
+# define FE_ALL_INVALID \
         (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \
         | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \
         | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION)
index a9cab03fc66f66ab7c08922c5b01c150c8d51170..7bb654c0bc1040500c66d82f3515f888469bb3df 100644 (file)
@@ -1,17 +1,21 @@
 /* Define the machine-dependent type `jmp_buf'.  PowerPC version.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 /* The previous bits/setjmp.h had __jmp_buf defined as a structure.
    We use an array of 'long int' instead, to make writing the
    assembler easier. Naturally, user code should not depend on
    either representation. */
 
-#if    defined (__USE_MISC) || defined (_ASM)
-#define JB_GPR1  0   /* also known as the stack pointer */
-#define JB_GPR2  1
-#define JB_LR    2
-#define JB_GPRS  3   /* GPRs 14 through 31 are saved, 18 in total */
-#define JB_UNUSED 21 /* it's sometimes faster to store doubles word-aligned */
-#define JB_FPRS  22  /* FPRs 14 through 31 are saved, 18*2 words total */
+#if defined __USE_MISC || defined _ASM
+# define JB_GPR1   0   /* also known as the stack pointer */
+# define JB_GPR2   1
+# define JB_LR     2
+# define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
+# define JB_UNUSED 21 /* it's sometimes faster to store doubles word-aligned */
+# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
 #endif
 
 #ifndef        _ASM
index f1a75c0652c9665a5bd814190c89c57a07201f97..68fc68de6a5194d698da3cd78ec913611387e567 100644 (file)
@@ -1,3 +1,7 @@
 /* SPARC is big-endian.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #define __BYTE_ORDER __BIG_ENDIAN
index 43bae1a4968c9ab2e455d22492bce122c74e3ac6..0e61fe7805d36850816dd300d47350b7d8331495 100644 (file)
@@ -1,9 +1,13 @@
 /* Define the machine-dependent type `jmp_buf'.  SPARC version.  */
 
-#if    defined (__USE_MISC) || defined (_ASM)
-#define        JB_SP   0
-#define        JB_FP   1
-#define        JB_PC   2
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#if defined __USE_MISC || defined _ASM
+# define JB_SP 0
+# define JB_FP 1
+# define JB_PC 2
 #endif
 
 #ifndef        _ASM
index 6a76795d6a94e59a1f426a271ceb1e20bcdaca26..9fb33cef28709c2534afe8734ee3f9eda75d61c4 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
@@ -72,5 +72,5 @@ typedef unsigned int fenv_t;
 #endif
 
 /* For internal use only: access the fp state register.  */
-#define __fenv_stfsr(X)   __asm__("st %%fsr,%0" : "=m"(X))
-#define __fenv_ldfsr(X)   __asm__ __volatile__("ld %0,%%fsr" : : "m"(X))
+#define __fenv_stfsr(X)   __asm__ ("st %%fsr,%0" : "=m" (X))
+#define __fenv_ldfsr(X)   __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
index a2ab07249aaeb2ba7c847cbef8be5caac5c74024..8acfdf5df6f365113f34284040f855aa84d62d3a 100644 (file)
@@ -1,8 +1,12 @@
 /* Sparc is big-endian, but v9 supports endian conversion on loads/stores
    and GCC supports such a mode.  Be prepared.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #ifdef __LITTLE_ENDIAN__
-#define __BYTE_ORDER __LITTLE_ENDIAN
+# define __BYTE_ORDER __LITTLE_ENDIAN
 #else
-#define __BYTE_ORDER __BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
 #endif
index 802c58bdce8490d802a3d4aa267390c6edd0142d..5728e2b588eeeb5aa02d03437d798d930c0e725d 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
 #endif
 
 
@@ -72,5 +72,5 @@ typedef unsigned long fenv_t;
 #endif
 
 /* For internal use only: access the fp state register.  */
-#define __fenv_stfsr(X)   __asm__("stx %%fsr,%0" : "=m"(X))
-#define __fenv_ldfsr(X)   __asm__ __volatile__("ldx %0,%%fsr" : : "m"(X))
+#define __fenv_stfsr(X)   __asm__ ("stx %%fsr,%0" : "=m" (X))
+#define __fenv_ldfsr(X)   __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X))
index 6f886616941e4ae45c43b44776b85e73657cd437..642c79183e8e2fea21fbcac98452f1ffd88b49e4 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     unsigned int d_fileno;     /* 32 bits.  */
index 71130f3fcbc96d9be7a9ae9825e963c471e5fe15..8722fa02490bdd1a8e914eba2e574a6b0185618a 100644 (file)
    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.
- */
-
-#ifndef        _STATBUF_H
-#define        _STATBUF_H      1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -82,6 +79,3 @@ struct stat
 #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 */
index ca952f90b4b5f1390b1ec64d438668fd1b9d581b..47fc6ea1b7d4dca5a3d923c8f3acc9cd2bf71dda 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
 #endif
 
 
@@ -26,5 +26,5 @@
 #define        WNOHANG         1       /* Don't block waiting.  */
 #define        WUNTRACED       2       /* Report status of stopped children.  */
 #ifdef  __USE_GNU
-#define WNOREAP                4       /* Don't remove record of child reported.  */
+# define WNOREAP       4       /* Don't remove record of child reported.  */
 #endif
index b9e0d7277ef07418811c55b18d967ba8edf4f228..e29dac4806e96f7acba865b24c87897015e292e0 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     __ino_t d_fileno;          /* File serial number.  */
index ab0fa48f68ae408e36d4b8a9d621dab8fc6721c1..7084b4e53459630574c60af005c13eaae9145f77 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -76,5 +72,3 @@ struct stat
 #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 */
index 56e28a04fb9b080a87f9bfc115ace021461998fb..6bf030793e13c26da904e289436316dd6e795874 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index 61481cc6a25cb3035ba1ddb5d34f969c965720a7..f637efa6cddddf01e55b46a8e0b71580ec57dd76 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 struct sigcontext
   {
     int sc_onstack;
index e1cdd416a14810b8802c332b661140b47b3f95a7..29d2d87b267c6177453df7b6f2c61a0c6548f168 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 struct sigcontext
   {
     int sc_onstack;
index f51262d92d1cae1eacd9cdc3acacb1c0fd00204d..6978c87dd2b9ef9472b2c6df972aba732ca57988 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
 /* These are the values for 4.4 BSD and GNU.  Earlier BSD systems have a
    subset of these kinds of resource limit.  In systems where `getrlimit'
    and `setrlimit' are not system calls, these are the values used by the C
@@ -110,7 +114,8 @@ enum __rusage_who
 #define RUSAGE_CHILDREN RUSAGE_CHILDREN
   };
 
-#include <sys/time.h>           /* For `struct timeval'.  */
+#define __need_timeval
+#include <bits/time.h>           /* For `struct timeval'.  */
 
 /* Structure which says how much of each resource has been used.  */
 struct rusage
index dc0a0072089b895f96e63fee70b283ff2de1fa7b..15aaab795ad835bf5d365e49a1d22f2c04456805 100644 (file)
@@ -1,5 +1,5 @@
 /* termios type and macro definitions.  SunOS 4 version.
-   Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
+
 /* Type of terminal control flag masks.  */
 typedef unsigned long int tcflag_t;
 
@@ -41,51 +45,51 @@ struct termios
 #define        IGNCR   0x0080          /* Ignore CR.  */
 #define        ICRNL   0x0100          /* Map CR to NL on input.  */
 #ifdef __USE_BSD
-#define        IUCLC   0x0200          /* Map upper case to lower case on input.  */
+# define IUCLC 0x0200          /* Map upper case to lower case on input.  */
 #endif
 #define        IXON    0x0400          /* Enable start/stop output control.  */
 #define        IXOFF   0x1000          /* Enable start/stop input control.  */
 #ifdef __USE_BSD
-#define        IXANY   0x0800          /* Any character will restart after stop.  */
-#define        IMAXBEL 0x2000          /* Ring bell when input queue is full.  */
+# define IXANY 0x0800          /* Any character will restart after stop.  */
+# define IMAXBEL       0x2000          /* Ring bell when input queue is full.  */
 #endif
 
   /* Output modes.  */
   tcflag_t c_oflag;
 #define        OPOST   0x0001          /* Perform output processing.  */
 #ifdef __USE_BSD
-#define        OLCUC   0x00000002      /* Map lower case to upper case on output.  */
-#define        ONLCR   0x00000004      /* Map NL to CR-NL on output.  */
-#define        OCRNL   0x00000008
-#define        ONOCR   0x00000010
-#define        ONLRET  0x00000020
-#define        OFILL   0x00000040
-#define        OFDEL   0x00000080
-#define        NLDLY   0x00000100
-#define        NL0     0
-#define        NL1     0x00000100
-#define        CRDLY   0x00000600
-#define        CR0     0
-#define        CR1     0x00000200
-#define        CR2     0x00000400
-#define        CR3     0x00000600
-#define        TABDLY  0x00001800
-#define        TAB0    0
-#define        TAB1    0x00000800
-#define        TAB2    0x00001000
-#define        XTABS   0x00001800
-#define        TAB3    XTABS
-#define        BSDLY   0x00002000
-#define        BS0     0
-#define        BS1     0x00002000
-#define        VTDLY   0x00004000
-#define        VT0     0
-#define        VT1     0x00004000
-#define        FFDLY   0x00008000
-#define        FF0     0
-#define        FF1     0x00008000
-#define        PAGEOUT 0x00010000
-#define        WRAP    0x00020000
+# define OLCUC 0x00000002      /* Map lower case to upper case on output.  */
+# define ONLCR 0x00000004      /* Map NL to CR-NL on output.  */
+# define OCRNL 0x00000008
+# define ONOCR 0x00000010
+# define ONLRET        0x00000020
+# define OFILL 0x00000040
+# define OFDEL 0x00000080
+# define NLDLY 0x00000100
+# define NL0   0
+# define NL1   0x00000100
+# define CRDLY 0x00000600
+# define CR0   0
+# define CR1   0x00000200
+# define CR2   0x00000400
+# define CR3   0x00000600
+# define TABDLY        0x00001800
+# define TAB0  0
+# define TAB1  0x00000800
+# define TAB2  0x00001000
+# define XTABS 0x00001800
+# define TAB3  XTABS
+# define BSDLY 0x00002000
+# define BS0   0
+# define BS1   0x00002000
+# define VTDLY 0x00004000
+# define VT0   0
+# define VT1   0x00004000
+# define FFDLY 0x00008000
+# define FF0   0
+# define FF1   0x00008000
+# define PAGEOUT 0x00010000
+# define WRAP  0x00020000
 #endif
 
   /* Control modes.  */
@@ -102,11 +106,11 @@ struct termios
 #define        HUPCL   0x00000400      /* Hang up on last close.  */
 #define        CLOCAL  0x00000800      /* Ignore modem status lines.  */
 #ifdef __USE_BSD
-#define        LOBLK   0x00001000
-#define        CRTSCTS 0x80000000
-#define        CIBAUD  0x000f0000      /* Mask for input speed from c_cflag.  */
-#define        CBAUD   0x0000000f      /* Mask for output speed from c_cflag.  */
-#define        IBSHIFT 16              /* Bits to shift for input speed.  */
+# define LOBLK 0x00001000
+# define CRTSCTS       0x80000000
+# define CIBAUD        0x000f0000      /* Mask for input speed from c_cflag.  */
+# define CBAUD 0x0000000f      /* Mask for output speed from c_cflag.  */
+# define IBSHIFT       16              /* Bits to shift for input speed.  */
 #endif
 
   /* Input and output baud rates.  These are encoded in c_cflag.  */
@@ -127,29 +131,29 @@ struct termios
 #define B19200  14
 #define B38400  15
 #ifdef __USE_BSD
-#define EXTA    14
-#define EXTB    15
+# define EXTA   14
+# define EXTB   15
 #endif
 
   /* Local modes.  */
   tcflag_t c_lflag;
 #ifdef __USE_BSD
-#define        ECHOKE  0x00000800      /* Visual erase for KILL.  */
+# define ECHOKE        0x00000800      /* Visual erase for KILL.  */
 #endif
 #define        ECHOE   0x00000010      /* Visual erase for ERASE.  */
 #define        ECHOK   0x00000020      /* Echo NL after KILL.  */
 #define        ECHO    0x00000008      /* Enable echo.  */
 #define        ECHONL  0x00000040      /* Echo NL even if ECHO is off.  */
 #ifdef __USE_BSD
-#define        ECHOPRT 0x00000400      /* Hardcopy visual erase.  */
-#define        ECHOCTL 0x00000200      /* Echo control characters as ^X.  */
+# define ECHOPRT       0x00000400      /* Hardcopy visual erase.  */
+# define ECHOCTL       0x00000200      /* Echo control characters as ^X.  */
 #endif
 #define        ISIG    0x00000001      /* Enable signals.  */
 #define        ICANON  0x00000002      /* Do erase and kill processing.  */
 #define        IEXTEN  0x00008000      /* Enable DISCARD and LNEXT.  */
 #define        TOSTOP  0x00000100      /* Send SIGTTOU for background output.  */
 #ifdef __USE_BSD
-#define        PENDIN  0x00004000      /* Retype pending input (state).  */
+# define PENDIN        0x00004000      /* Retype pending input (state).  */
 #endif
 #define        NOFLSH  0x00000080      /* Disable flush after interrupt.  */
 
@@ -159,28 +163,28 @@ struct termios
 #define        VEOF    4               /* End-of-file character [ICANON].  */
 #define        VEOL    5               /* End-of-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VEOL2   6               /* Second EOL character [ICANON].  */
-#define        VSWTCH  7               /* ??? */
+# define VEOL2 6               /* Second EOL character [ICANON].  */
+# define VSWTCH        7               /* ??? */
 #endif
 #define        VERASE  2               /* Erase character [ICANON].  */
 #ifdef __USE_BSD
-#define        VWERASE 14              /* Word-erase character [ICANON].  */
+# define VWERASE       14              /* Word-erase character [ICANON].  */
 #endif
 #define        VKILL   3               /* Kill-line character [ICANON].  */
 #ifdef __USE_BSD
-#define        VREPRINT 12             /* Reprint-line character [ICANON].  */
+# define VREPRINT 12           /* Reprint-line character [ICANON].  */
 #endif
 #define        VINTR   0               /* Interrupt character [ISIG].  */
 #define        VQUIT   1               /* Quit character [ISIG].  */
 #define        VSUSP   10              /* Suspend character [ISIG].  */
 #ifdef __USE_BSD
-#define        VDSUSP  11              /* Delayed suspend character [ISIG].  */
+# define VDSUSP        11              /* Delayed suspend character [ISIG].  */
 #endif
 #define        VSTART  8               /* Start (X-ON) character [IXON, IXOFF].  */
 #define        VSTOP   9               /* Stop (X-OFF) character [IXON, IXOFF].  */
 #ifdef __USE_BSD
-#define        VLNEXT  15              /* Literal-next character [IEXTEN].  */
-#define        VDISCARD 13             /* Discard character [IEXTEN].  */
+# define VLNEXT        15              /* Literal-next character [IEXTEN].  */
+# define VDISCARD 13           /* Discard character [IEXTEN].  */
 #endif
 #define        VMIN    VEOF            /* Minimum number of bytes read at once [!ICANON].  */
 #define        VTIME   VEOL            /* Time-out value (tenths of a second) [!ICANON].  */
index e9111b65045ac38302d6864cd1c19c45c417bcef..5a03bab0c24e902362ebb23d78aa087abfc04603 100644 (file)
@@ -1,2 +1,24 @@
+/* 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 #define _UTSNAME_LENGTH 9
 #define _UTSNAME_NODENAME_LENGTH 65
index ad4389ab0202178e8a637e3e8ada0dc7d46eaec5..a9f36ab3d1aba6615be6af9902e4cc92ab6022ea 100644 (file)
@@ -1 +1,23 @@
+/* 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 #define _UTSNAME_LENGTH 32
index 72b29e56491207a7d43c466414b1badce820e45c..cb66517eef7cc7ba98e14624c4ff3e1e539b6028 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
 /* Note that ANY change to this instantly implies a change to __handler.S.  */
 
 struct sigcontext
index 5ba1054049fc1366cfcb658b64683cba2a82ec24..e32f7f03c8765d36d67dad0cccba73b9ad151286 100644 (file)
@@ -1,4 +1,4 @@
-/* Directory entry structure `struct dirent'.  SVR4/Linux version.
+/* Directory entry structure `struct dirent'.  SVR4 version.
    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     unsigned int d_fileno;
index d10417d507536112205b38def961eadb0871a279..ca4b0502966ccd03a3bd68fe8e2ca54f1fec4ece 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
 struct dirent
   {
     unsigned short int d_fileno;
index 56f4544594479e4d25a5c5278fab819d34624066..8334feaa2ed66b6ad9c21c9fadfeefe9879dc328 100644 (file)
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 struct stat
   {
@@ -61,5 +58,3 @@ struct stat
 #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 */
index 1bb1a558730a0d03672f1f6dd6211ccdce3942cd..9304013d3278866abe1d7dd5c4f9004e66b54f78 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _UTMP_H
-#error "Never use <bits/utmp.h> directly; include <utmp.h> instead."
+# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
 #endif
 
 
@@ -28,7 +28,6 @@
 #define _PATH_WTMP      "/var/adm/wtmp"
 #define _PATH_LASTLOG   "/var/adm/lastlog"
 
-__BEGIN_DECLS
 
 struct utmp
   {
@@ -36,14 +35,14 @@ struct utmp
     char ut_user[8];
     char ut_id[4];
     char ut_line[12];
-    short ut_pid;
-    short ut_type;
+    short int ut_pid;
+    short int ut_type;
     struct exit_status
       {
-       short e_termination;
-       short e_exit;
+       short int e_termination;
+       short int e_exit;
       } ut_exit;
-    time_t ut_time;
+    __time_t ut_time;
   };
 
 
@@ -53,5 +52,3 @@ struct utmp
 #define _HAVE_UT_ID    1
 #define _HAVE_UT_TV    1
 #define _HAVE_UT_HOST  1
-
-__END_DECLS
index 31473cf4ea7404aa25b3c6c2336c7164300af0e9..fb11e4f0298909a47670020fec1c203f228196c6 100644 (file)
@@ -1 +1,23 @@
+/* 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 #define _UTSNAME_LENGTH 9
index c185f22adf8adfb8e5d642583e7c605789bdbd79..89fca07fe51bd11359d8cfcc88752784ef44b41e 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
 /* Values for the NAME argument to `pathconf' and `fpathconf'.  */
 enum
   {
index 0dab45cfa0ec0dc4bb70035889ed3e9ba8d113f1..633f2618ecef9b07706e23c00127b0f550f2281c 100644 (file)
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 struct stat
   {
@@ -61,5 +58,3 @@ struct stat
 #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 */
index 8a14f99f4338c023d8d800e711e22a54a45de814..dcbf9f4402195822c6b4e88328b65871b90102b7 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTLS_H
-#define _BITS_IOCTLS_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* Use the definitions from the kernel header files.  */
 #include <asm/ioctls.h>
@@ -39,5 +36,3 @@
 #define TCSETSF        _IOW ('t', 22, struct __kernel_termios)
 
 #include <linux/sockios.h>
-
-#endif /* bits/ioctls.h  */
index 57830daae17be204b1586e8de9a8d3f4282fbf34..ec116f6114431807d4c3b25bad349b57daeeb40f 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    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>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
 
 #include <sys/types.h>
 
@@ -35,9 +33,6 @@
 #define IPC_STAT       2               /* Get `ipc_perm' options.  */
 #define IPC_INFO       3               /* See ipcs.  */
 
-
-__BEGIN_DECLS
-
 /* Special key values.  */
 #define IPC_PRIVATE    ((__key_t) 0)   /* Private key.  */
 
@@ -63,10 +58,14 @@ struct ipc_kludge
     long int msgtyp;
   };
 
+__BEGIN_DECLS
+
 /* The actual system call: all functions are multiplexed by this.  */
 extern int __ipc __P ((int __call, int __first, int __second, int __third,
                       void *__ptr));
 
+__END_DECLS
+
 /* The codes for the functions to use the multiplexer `__ipc'.  */
 #define IPCOP_semop     1
 #define IPCOP_semget    2
@@ -79,7 +78,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third,
 #define IPCOP_shmdt    22
 #define IPCOP_shmget   23
 #define IPCOP_shmctl   24
-
-__END_DECLS
-
-#endif /* _SYS_IPC_BUF_H */
index 1bef0cb525def787cd3828f675ddb54a3fe32530..081a00441e468d0efbe96dd27b002dcbe7eb22fc 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/Alpha version.
+/* Definitions for POSIX memory map interface.  Linux/Alpha version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index f28b6f256c6640d55c06b1c40a088671322ffd8f..274531f270887797f47cf2658ac2d7e8d24f1be0 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index de8752ea8be4b63787a8b6c0c92a1f34fbeef442..319ff96c51301d2efde46944cb7ec6c579d9eadf 100644 (file)
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_KERNEL       0
@@ -112,5 +109,3 @@ struct stat64
 #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 */
index d0932c1cd7f6ce8f117c0f16df4dd02466794d34..0d57c489d979bd7593e82b6dd27c584cfec49224 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _TERMBITS_H
-#define _TERMBITS_H 1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
 
 typedef unsigned char  cc_t;
 typedef unsigned int   speed_t;
@@ -189,5 +190,3 @@ struct termios
 
 #define _IOT_termios /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* _TERMBITS_H */
index 7475b68f5bb2570b9b1c97cfcf8bbae16d79caf4..d32f4d30e9871c4af0131dc3609b2429144be028 100644 (file)
  * 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
-  {
-    int tv_sec;                        /* Seconds.  */
-    int tv_usec;               /* Microseconds.  */
-  };
-# endif        /* struct timeval */
-#endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H   1
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+#  define _BITS_TIME_H 1
 
 /* ISO/IEC 9899:1990 7.12.1: <time.h>
    The macro `CLOCKS_PER_SEC' is the number per second of the value
@@ -45,10 +31,23 @@ struct timeval
 /* CAE XSH, Issue 4, Version 2: <time.h>
    The value of CLOCKS_PER_SEC is required to be 1 million on all
    XSI-conformant systems. */
-# define CLOCKS_PER_SEC  1000000
+#  define CLOCKS_PER_SEC  1000000
 
 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
    presents the real value for clock ticks per second for the system.  */
-# define CLK_TCK 1024
+#  define CLK_TCK 1024
 
-#endif /* bits/time.h */
+# endif        /* bits/time.h */
+#endif /* !__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
+  {
+    int tv_sec;                        /* Seconds.  */
+    int tv_usec;               /* Microseconds.  */
+  };
+#endif /* struct timeval */
index 1f8ff1e3d0d7d30eeddadcc7295bbe209350abaf..30e02032898efd55833440340d845c6205b2d7a5 100644 (file)
@@ -16,8 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _BITS_DIRENT_H
-#define _BITS_DIRENT_H 1
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
 
 struct dirent
   {
@@ -50,5 +51,3 @@ struct dirent64
 #define _DIRENT_HAVE_D_RECLEN
 #define _DIRENT_HAVE_D_OFF
 #define _DIRENT_HAVE_D_TYPE
-
-#endif /* bits/dirent.h */
index 0dd94bef963fc548fae3fbcef66bb0602b27ed23..1d3817f68ddc12ee64f2d299f6b37a026862f1e5 100644 (file)
@@ -18,8 +18,9 @@
 
 /* Linux version.  */
 
-#ifndef _NETINET_INBITS_H
-#define _NETINET_INBITS_H 1
+#ifndef _NETINET_IN_H
+# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
+#endif
 
 /* Options for use with `getsockopt' and `setsockopt' at the IP level.
    The first word in the comment at the right is the data type used;
@@ -71,5 +72,3 @@ struct ip_mreq
 #define IPV6_MULTICAST_LOOP    19
 #define IPV6_ADD_MEMBERSHIP    20
 #define IPV6_DROP_MEMBERSHIP   21
-
-#endif /* netinet/inbits.h */
index af988a3c9dc7d7bbb6f4bead6bd7dc6556448a12..4413dacdb48bc2e25856605c51e36451ab002dca 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* Get definition of constants for use with `ioctl'.  */
 #include <asm/ioctls.h>
@@ -69,6 +66,3 @@ struct termio
 #define N_PPP          3
 #define N_STRIP                4
 #define N_AX25         5
-
-
-#endif /* bits/ioctl-types.h */
index 265c857f92597d8b565d68d856cb2ff0c15cb940..a89724cd71c07ed948db4d2b446e20146200c1ba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTLS_H
-#define _BITS_IOCTLS_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* Use the definitions from the kernel header files.  */
 #include <asm/ioctls.h>
 #include <linux/sockios.h>
-
-#endif /* bits/ioctls.h  */
index c01a81a83f8086b101f62d00f36b2b759fbaab10..8b5db4add6b8207a1f73fa2d07201133c1caf8d7 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    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>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
 
 #include <sys/types.h>
 
@@ -35,9 +33,6 @@
 #define IPC_STAT       2               /* Get `ipc_perm' options.  */
 #define IPC_INFO       3               /* See ipcs.  */
 
-
-__BEGIN_DECLS
-
 /* Special key values.  */
 #define IPC_PRIVATE    ((__key_t) 0)   /* Private key.  */
 
@@ -63,10 +58,15 @@ struct ipc_kludge
     long int msgtyp;
   };
 
+
+__BEGIN_DECLS
+
 /* The actual system call: all functions are multiplexed by this.  */
 extern int __ipc __P ((int __call, int __first, int __second, int __third,
                       void *__ptr));
 
+__END_DECLS
+
 /* The codes for the functions to use the multiplexer `__ipc'.  */
 #define IPCOP_semop     1
 #define IPCOP_semget    2
@@ -79,7 +79,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third,
 #define IPCOP_shmdt    22
 #define IPCOP_shmget   23
 #define IPCOP_shmctl   24
-
-__END_DECLS
-
-#endif /* bits/ipc_buf.h */
index 59559a31c3fed6c3d715c18a9456cb8ed214be4e..9d0b9a9afa81bc799efda0d90b6b15b386cc63ed 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SYS_MSQ_BUF_H
-
-#define _SYS_MSQ_BUF_H 1
-#include <features.h>
+#ifndef _SYS_MSG_H
+#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
 
 #include <sys/types.h>
 
@@ -29,8 +27,6 @@
 #define MSG_EXCEPT     020000  /* recv any msg except of specified type */
 
 
-__BEGIN_DECLS
-
 /* Structure of record for one message inside the kernel.
    The type `struct __msg' is opaque.  */
 struct msqid_ds
@@ -60,19 +56,15 @@ struct msqid_ds
 
 /* buffer for msgctl calls IPC_INFO, MSG_INFO */
 struct msginfo
-{
-  int msgpool;
-  int msgmap;
-  int msgmax;
-  int msgmnb;
-  int msgmni;
-  int msgssz;
-  int msgtql;
-  ushort  msgseg;
-};
+  {
+    int msgpool;
+    int msgmap;
+    int msgmax;
+    int msgmnb;
+    int msgmni;
+    int msgssz;
+    int msgtql;
+    ushort  msgseg;
+  };
 
 #endif /* __USE_MISC */
-
-__END_DECLS
-
-#endif /* bits/msq_buf.h */
index c6b1d2324af388f659341e647d899a345ed4616e..4aec021fed8e58082b06af1abe6dea8336dfbefe 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 9ee6ea5b27c3a5673842bbde862ea9467dbcda92..f825cba929c4bb589c5d2b3fe9d0cc726176e592 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
 #include <asm/resource.h>
 #include <bits/types.h>
 
@@ -148,7 +152,8 @@ enum __rusage_who
 #define RUSAGE_BOTH RUSAGE_BOTH
 };
 
-#include <sys/time.h>          /* For `struct timeval'.  */
+#define __need_timeval
+#include <bits/time.h>         /* For `struct timeval'.  */
 
 /* Structure which says how much of each resource has been used.  */
 struct rusage
index 521bbb717745dc22bb736866ab0c4cbcb9f89f52..0ac54091722fa8df6eb6f4d9bd60789f5353880c 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SCHED_H
-#error "Never use <bits/sched.h> directly; include <sched.h> instead."
+# error "Never include <bits/sched.h> directly; use <sched.h> instead."
 #endif
 
 
-#include <features.h>
-
 /* Scheduling algorithms.  */
 #define SCHED_OTHER    0
 #define SCHED_FIFO     1
@@ -36,15 +34,19 @@ struct sched_param
     int sched_priority;
   };
 
+#ifdef __USE_MISC
 /* Cloning flags.  */
-#define        CSIGNAL       0x000000ff  /* Signal mask to be sent at exit.  */
-#define        CLONE_VM      0x00000100  /* Set if VM shared between processes.  */
-#define        CLONE_FS      0x00000200  /* Set if fs info shared between processes.*/
-#define CLONE_FILES   0x00000400  /* Set if open files shared between processes*/
-#define CLONE_SIGHAND 0x00000800  /* Set if signal handlers shared.  */
-#define CLONE_PID     0x00001000  /* Set if pid shared.  */
+# define CSIGNAL       0x000000ff /* Signal mask to be sent at exit.  */
+# define CLONE_VM      0x00000100 /* Set if VM shared between processes.  */
+# define CLONE_FS      0x00000200 /* Set if fs info shared between processes.*/
+# define CLONE_FILES   0x00000400 /* Set if open files shared between processes*/
+# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared.  */
+# define CLONE_PID     0x00001000 /* Set if pid shared.  */
+#endif
 
 
+__BEGIN_DECLS
+
 /* Clone current process.  */
 extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
                         int __flags, void *__arg));
@@ -52,3 +54,5 @@ extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
 extern int clone __P ((int (*__fn) (void *__arg), void *__child_stack,
                       int __flags, void *__arg));
 #endif
+
+__END_DECLS
index 87951efea13b4c261c5074af74aaff79515fefda..f3bbd89a12da5d2bd049e4ae1ba73d4c19888bcf 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SYS_SEM_BUF_H
-
-#define _SYS_SEM_BUF_H 1
-#include <features.h>
+#ifndef _SYS_SEM_H
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
+#endif
 
 #include <sys/types.h>
 
@@ -37,8 +35,6 @@
 #define SETALL         17              /* set all semval's */
 
 
-__BEGIN_DECLS
-
 /* Data structure describing a set of semaphores.  */
 struct semid_ds
 {
@@ -64,8 +60,8 @@ union semun
 #ifdef __USE_MISC
 
 /* ipcs ctl cmds */
-#define SEM_STAT 18
-#define SEM_INFO 19
+# define SEM_STAT 18
+# define SEM_INFO 19
 
 struct  seminfo
 {
@@ -82,7 +78,3 @@ struct  seminfo
 };
 
 #endif /* __USE_MISC */
-
-__END_DECLS
-
-#endif /* bits/sem_buf.h */
index 6db01dd4a21ca69a9ca68f2e0ad831f0c5b497a0..6f5f840909ddf0d047988d542fe76af981bbdc5d 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SYS_SHM_BUF_H
-
-#define _SYS_SHM_BUF_H 1
-#include <features.h>
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
 
 #include <sys/types.h>
 
 #define SHM_UNLOCK     12              /* unlock segment (root only) */
 
 
-__BEGIN_DECLS
-
 /* Data structure describing a set of semaphores.  */
 struct shmid_ds
-{
-  struct ipc_perm shm_perm;            /* operation permission struct */
-  int shm_segsz;                       /* size of segment in bytes */
-  __time_t shm_atime;                  /* time of last shmat() */
-  __time_t shm_dtime;                  /* time of last shmdt() */
-  __time_t shm_ctime;                  /* time of last change by shmctl() */
-  int shm_cpid;                                /* pid of creator */
-  int shm_lpid;                                /* pid of last shmop */
-  unsigned short int shm_nattch;       /* number of current attaches */
-  unsigned short int __shm_npages;     /* size of segment (pages) */
-  unsigned long int *__shm_pages;      /* array of ptrs to frames -> SHMMAX */
-  struct vm_area_struct *__attaches;   /* descriptors for attaches */
-};
+  {
+    struct ipc_perm shm_perm;          /* operation permission struct */
+    int shm_segsz;                     /* size of segment in bytes */
+    __time_t shm_atime;                        /* time of last shmat() */
+    __time_t shm_dtime;                        /* time of last shmdt() */
+    __time_t shm_ctime;                        /* time of last change by shmctl() */
+    int shm_cpid;                      /* pid of creator */
+    int shm_lpid;                      /* pid of last shmop */
+    unsigned short int shm_nattch;     /* number of current attaches */
+    unsigned short int __shm_npages;   /* size of segment (pages) */
+    unsigned long int *__shm_pages;    /* array of ptrs to frames -> SHMMAX */
+    struct vm_area_struct *__attaches; /* descriptors for attaches */
+  };
 
 #ifdef __USE_MISC
 
 /* ipcs ctl commands */
-#define SHM_STAT       13
-#define SHM_INFO       14
+# define SHM_STAT      13
+# define SHM_INFO      14
 
 /* shm_mode upper byte flags */
-#define        SHM_DEST        01000   /* segment will be destroyed on last detach */
-#define SHM_LOCKED      02000   /* segment will not be swapped */
+# define SHM_DEST      01000   /* segment will be destroyed on last detach */
+# define SHM_LOCKED    02000   /* segment will not be swapped */
 
 struct shminfo
-{
-  int shmmax;
-  int shmmin;
-  int shmmni;
-  int shmseg;
-  int shmall;
-};
+  {
+    int shmmax;
+    int shmmin;
+    int shmmni;
+    int shmseg;
+    int shmall;
+  };
 
 struct shm_info
-{
-  int   used_ids;
-  ulong shm_tot;       /* total allocated shm */
-  ulong shm_rss;       /* total resident shm */
-  ulong shm_swp;       /* total swapped shm */
-  ulong swap_attempts;
-  ulong swap_successes;
-};
+  {
+    int   used_ids;
+    ulong shm_tot;     /* total allocated shm */
+    ulong shm_rss;     /* total resident shm */
+    ulong shm_swp;     /* total swapped shm */
+    ulong swap_attempts;
+    ulong swap_successes;
+  };
 
 #endif /* __USE_MISC */
-
-__END_DECLS
-
-#endif /* bits/shm_buf.h */
index 247b53499e0db76a47e393cef281c65b879f8488..1806bb2e92545ca917b57270add7fea1e31c2b48 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index fb8bc5fc572731a7750e04dc96ed8664640ad70d..08960b6824018fb729b58c502666d57f81aecbed 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* 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
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SIGNAL_H
-#error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 #endif
 
 
index 8f859d2e3e9bb7af489809717d143695da971934..f48f2d1403923009914f1e04cde072c55c01cbb4 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_SOCKET_H
-#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif
 
-
-#include <features.h>
-
 #define        __need_size_t
 #define __need_NULL
 #include <stddef.h>
 
 #include <sys/types.h>
 
-__BEGIN_DECLS
-
 /* Type for length arguments in socket calls.  */
 typedef unsigned int socklen_t;
 
@@ -216,5 +211,3 @@ struct linger
     int l_onoff;               /* Nonzero to linger on close.  */
     int l_linger;              /* Time to linger.  */
   };
-
-__END_DECLS
index 1b98448ff4d060c96955e5a1591da9919d0ee18c..18432fd09efb5504c6f0c3f3b52497e351402225 100644 (file)
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_LINUX_OLD    1
@@ -126,5 +123,3 @@ struct stat64
 #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 */
index c79c80e84cd055d2dc27f9587326494686dd25f9..a56ed79e7c69f7d524ebe417e9ad566d086cbded 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
-
-#ifndef _BITS_STATFS_H
-#define _BITS_STATFS_H
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
 
 #include <bits/types.h>  /* for __fsid_t and __fsblkcnt_t*/
 
@@ -62,5 +59,3 @@ struct statfs64
     int f_spare[6];
   };
 #endif
-
-#endif /* bits/statfs.h */
index dd42012374a83e4dce46b31f9f99a5b1563eafe4..926c3f32f4567a577d23b293bc7bf37c014e85f6 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <termios.h> instead.
- */
-
-
-#ifndef _BITS_TERMIOS_H
-#define _BITS_TERMIOS_H        1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
 
 typedef unsigned char  cc_t;
 typedef unsigned int   speed_t;
@@ -185,5 +181,3 @@ struct termios
 
 #define _IOT_termios /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* bits/termios.h */
index 509cb2ce3205229e38795efc13b9bc411fa62bdb..3c1b27a1bb780e5752f844c9fa7ef05282565052 100644 (file)
  * 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
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+#  define _BITS_TIME_H 1
 
 /* ISO/IEC 9899:1990 7.12.1: <time.h>
    The macro `CLOCKS_PER_SEC' is the number per second of the value
@@ -45,12 +31,26 @@ struct timeval
 /* CAE XSH, Issue 4, Version 2: <time.h>
    The value of CLOCKS_PER_SEC is required to be 1 million on all
    XSI-conformant systems. */
-# define CLOCKS_PER_SEC  1000000
+#  define CLOCKS_PER_SEC  1000000
 
-# ifndef __STRICT_ANSI__
+#  ifndef __STRICT_ANSI__
 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
    presents the real value for clock ticks per second for the system.  */
-#  define CLK_TCK 100
-# endif
+#   define CLK_TCK 100
+#  endif
 
-#endif /* bits/time.h */
+# endif        /* bits/time.h */
+#endif
+
+#ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL       1
+# include <bits/types.h>
+
+/* 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 */
index 3f1dc01c736ad3353f213287736d3908b52b2df7..38ac17baa95c723859cdca143fdc84ee84839f55 100644 (file)
@@ -17,7 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_UIO_H
-#error "Never use <bits/uio.h> directly; include <sys/uio.h> instead."
+# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
 #endif
 
 
index 64e2ab5bbc6252acda5e956afab0895ae90113a6..8f4bf16f5a0f3209b5f20fe118d8404f3bf2f717 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 /* Length of the entries in `struct utsname' is 65.  */
 #define _UTSNAME_LENGTH 65
 
index ba3528b709a43ba00abb54cf8253422acf8dec04..e5945051ed35640d59e5753cf32819042e64e77e 100644 (file)
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
 #endif
 
 
index e70b220f9fa51a13682011ce03b56db2fa9b21f7..8738e98c306749e58175d6fa68558d7870ec3163 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/i386 version.
+/* Definitions for POSIX memory map interface.  Linux/i386 version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index 78c6f4aa2fa09a5f98945177f38f3fa9f0d0a168..09504cc97e764b6f32b1314327213a6723190850 100644 (file)
@@ -20,9 +20,6 @@
 #define _KERNEL_TERMIOS_H 1
 /* The following corresponds to the values from the Linux 2.1.20 kernel.  */
 
-/* We need the definition of tcflag_t, cc_t, and speed_t.  */
-#include <bits/termios.h>
-
 #define __KERNEL_NCCS 19
 
 struct __kernel_termios
index d6c29d21765a37dec93c6d8f1b3f6ab75ba6c9b3..bca1dae960cfe47e9d9d48565002aba615769e13 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/m68k version.
+/* Definitions for POSIX memory map interface.  Linux/m68k version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index 8fea43924a523533304d3f2553672edcc3b3e81c..2d4e6f6f01be20b2da2a592122ed96b19800d954 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 9f60758f36c0482440329c95bb71a12c1c687722..0a3d2fabe36ad7f42d97628d9625a5c192208960 100644 (file)
@@ -3,10 +3,14 @@
    want to be able to share the installed headerfiles between both,
    so we define __BYTE_ORDER based on GCC's predefines.  */
 
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
 #ifdef __MIPSEB__
-#define __BYTE_ORDER __BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
 #else
-#ifdef __MIPSEL__
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
+# ifdef __MIPSEL__
+#  define __BYTE_ORDER __LITTLE_ENDIAN
+# endif
 #endif
index 486022e6d9c5a14274000f2f12951a1c3a0df86c..4f5c2b0d3ebad3b40d8fc12745c04e29ea003606 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* Get definition of constants for use with `ioctl'.  */
 #include <asm/ioctls.h>
@@ -67,5 +64,3 @@ struct termio
 #define N_PPP          3
 #define N_STRIP                4
 #define N_AX25         5
-
-#endif /* bits/ioctl-types.h */
index c5a3cd004977575932abdcd168a2a2f515c660df..2841e6a5e27f58321964c0116c2508cff91b70c0 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    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>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
 
 #include <sys/types.h>
 
@@ -36,8 +34,6 @@
 #define IPC_INFO       3               /* See ipcs.  */
 
 
-__BEGIN_DECLS
-
 /* Special key values.  */
 #define IPC_PRIVATE    ((__key_t) 0)   /* Private key.  */
 
@@ -46,11 +42,11 @@ __BEGIN_DECLS
 struct ipc_perm
   {
     __key_t __key;                     /* Key.  */
-    long uid;                          /* Owner's user ID.  */
-    long gid;                          /* Owner's group ID.  */
-    long cuid;                         /* Creator's user ID.  */
-    long cgid;                         /* Creator's group ID.  */
-    unsigned long mode;                        /* Read/write permission.  */
+    long int uid;                      /* Owner's user ID.  */
+    long int gid;                      /* Owner's group ID.  */
+    long int cuid;                     /* Creator's user ID.  */
+    long int cgid;                     /* Creator's group ID.  */
+    unsigned long int mode;            /* Read/write permission.  */
     unsigned short int __seq;          /* Sequence number.  */
   };
 
@@ -63,10 +59,14 @@ struct ipc_kludge
     long int msgtyp;
   };
 
+__BEGIN_DECLS
+
 /* The actual system call: all functions are multiplexed by this.  */
 extern int __ipc __P ((int __call, int __first, int __second, int __third,
                       void *__ptr));
 
+__END_DECLS
+
 /* The codes for the functions to use the multiplexer `__ipc'.  */
 #define IPCOP_semop     1
 #define IPCOP_semget    2
@@ -79,7 +79,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third,
 #define IPCOP_shmdt    22
 #define IPCOP_shmget   23
 #define IPCOP_shmctl   24
-
-__END_DECLS
-
-#endif /* bits/ipc_buf.h */
index 15a343ff7615eefdfdc85d70b3a4d2c003fe4344..be460ab6c6455f5a411073af540f50df7df25916 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/PowerPC version.
+/* Definitions for POSIX memory map interface.  Linux/PowerPC version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index c1c9a6b3925bf321686ecac72994991a8f3bcb9f..9b7826af6ca1ccb8b0544a330e9231dfcabcd211 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 9d4b20bb534d19dfa035ff9b3f1e193dcb50b3de..20e75e009b57ce91c9e8eea7cf7d7e4ec743cc65 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SYS_SHM_BUF_H
-
-#define _SYS_SHM_BUF_H 1
-#include <features.h>
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
 
 #include <sys/types.h>
 
 #define SHM_UNLOCK     12              /* unlock segment (root only) */
 
 
-__BEGIN_DECLS
-
 /* Data structure describing a set of semaphores.  */
 struct shmid_ds
-{
-  struct ipc_perm shm_perm;            /* operation permission struct */
-  int shm_segsz;                       /* size of segment in bytes */
-  __time_t shm_atime;                  /* time of last shmat() */
-  __time_t shm_dtime;                  /* time of last shmdt() */
-  __time_t shm_ctime;                  /* time of last change by shmctl() */
-  long shm_cpid;                       /* pid of creator */
-  long shm_lpid;                       /* pid of last shmop */
-  unsigned short int shm_nattch;       /* number of current attaches */
-  unsigned short int __shm_npages;     /* size of segment (pages) */
-  unsigned long int *__shm_pages;      /* array of ptrs to frames -> SHMMAX */
-  struct vm_area_struct *__attaches;   /* descriptors for attaches */
-};
+  {
+    struct ipc_perm shm_perm;          /* operation permission struct */
+    int shm_segsz;                     /* size of segment in bytes */
+    __time_t shm_atime;                        /* time of last shmat() */
+    __time_t shm_dtime;                        /* time of last shmdt() */
+    __time_t shm_ctime;                        /* time of last change by shmctl() */
+    long int shm_cpid;                 /* pid of creator */
+    long int shm_lpid;                 /* pid of last shmop */
+    unsigned short int shm_nattch;     /* number of current attaches */
+    unsigned short int __shm_npages;   /* size of segment (pages) */
+    unsigned long int *__shm_pages;    /* array of ptrs to frames -> SHMMAX */
+    struct vm_area_struct *__attaches; /* descriptors for attaches */
+  };
 
 #ifdef __USE_MISC
 
 /* ipcs ctl commands */
-#define SHM_STAT       13
-#define SHM_INFO       14
+# define SHM_STAT      13
+# define SHM_INFO      14
 
 /* shm_mode upper byte flags */
-#define        SHM_DEST        01000   /* segment will be destroyed on last detach */
-#define SHM_LOCKED      02000   /* segment will not be swapped */
+# define SHM_DEST      01000   /* segment will be destroyed on last detach */
+# define SHM_LOCKED    02000   /* segment will not be swapped */
 
 struct shminfo
-{
-  int shmmax;
-  int shmmin;
-  int shmmni;
-  int shmseg;
-  int shmall;
-};
+  {
+    int shmmax;
+    int shmmin;
+    int shmmni;
+    int shmseg;
+    int shmall;
+  };
 
 struct shm_info
-{
-  int   used_ids;
-  ulong shm_tot;       /* total allocated shm */
-  ulong shm_rss;       /* total resident shm */
-  ulong shm_swp;       /* total swapped shm */
-  ulong swap_attempts;
-  ulong swap_successes;
-};
+  {
+    int   used_ids;
+    ulong shm_tot;     /* total allocated shm */
+    ulong shm_rss;     /* total resident shm */
+    ulong shm_swp;     /* total swapped shm */
+    ulong swap_attempts;
+    ulong swap_successes;
+  };
 
 #endif /* __USE_MISC */
-
-__END_DECLS
-
-#endif /* bits/shm_buf.h */
index d6f70f2a2e851ee6fe1465b3c6a048cf6a218ca7..71ca8846ebf664dfded76e4a816e84d5981af1dd 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
@@ -33,7 +37,7 @@ struct sigaction
     /* Restore handler.  */
     void (*sa_restorer) __P ((void));
 
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2
     int sa_resv[1];
 #endif
   };
index 02f1d22a6ca2383ad826ca0cd61dca76907c1dc6..f56f6269dbc3adef7e42853745f51560a2c6d7a4 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SYS_SOCKET_H
-#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#ifndef _SYS_STAT_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
 #endif
 
-
-#include <features.h>
-
 #define        __need_size_t
 #define __need_NULL
 #include <stddef.h>
 
-__BEGIN_DECLS
-
 /* Type for length arguments in socket calls.  */
 typedef unsigned int socklen_t;
 
@@ -173,5 +168,3 @@ struct linger
     int l_onoff;               /* Nonzero to linger on close.  */
     int l_linger;              /* Time to linger.  */
   };
-
-__END_DECLS
index f27a75eb9a810d5b9cde4e1ad75a719b1e6149b6..cd586d4433e9746f3d8fc00961d0974feb2eef3a 100644 (file)
    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.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H   1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 /* Versions of the `struct stat' data structure.  */
 #define _STAT_VER_LINUX_OLD    1
@@ -140,5 +137,3 @@ struct stat64
 #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 */
index 2727b272579124de24934c5404e0c0d0a179a16a..36d9996a6947cb3fc14ec2d2ee3287db8c1ed493 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
-
-#ifndef _BITS_STATFS_H
-#define _BITS_STATFS_H
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
 
 #include <bits/types.h>  /* for __fsid_t and __fsblkcnt_t*/
 
@@ -70,5 +67,3 @@ struct statfs64
     long int f_spare[6];
   };
 #endif
-
-#endif /* bits/statfs.h */
index c8a24694d9a8f8aefec0fb0aff1b08bb2a175743..de21ee1775a5ffe62b04fd46eacb96d6144c10f2 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <termios.h> instead.
- */
-
-
-#ifndef _BITS_TERMIOS_H
-#define _BITS_TERMIOS_H 1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
 
 typedef unsigned char  cc_t;
 typedef unsigned int   speed_t;
 typedef unsigned int   tcflag_t;
 
 
-#if defined __USE_BSD
+#ifdef __USE_BSD
 
 struct sgttyb
   {
@@ -83,10 +79,10 @@ struct termios
 #define VKILL           3              /* Kill-line character [ICANON].  */
 #define VMIN            4              /* Minimum number of bytes read at once [!ICANON].  */
 #define VTIME           5              /* Time-out value (tenths of a second) [!ICANON].  */
-#if defined (__USE_BSD)
-#define VEOL2           6              /* Second EOL character [ICANON].  */
+#ifdef __USE_BSD
+# define VEOL2          6              /* Second EOL character [ICANON].  */
 /* The next two are guesses ... */
-#define VSWTC           7              /* ??? */
+# define VSWTC          7              /* ??? */
 #endif
 #define VSWTCH         VSWTC
 #define VSTART          8              /* Start (X-ON) character [IXON, IXOFF].  */
@@ -96,17 +92,17 @@ struct termios
 /*
  * VDSUSP is not supported
  */
-#if defined (__USE_BSD)
+#if defined __USE_BSD
 #define VDSUSP         11              /* Delayed suspend character [ISIG].  */
 #endif
 #endif
-#if defined (__USE_BSD)
-#define VREPRINT       12              /* Reprint-line character [ICANON].  */
+#ifdef __USE_BSD
+# define VREPRINT      12              /* Reprint-line character [ICANON].  */
 #endif
-#if defined (__USE_BSD)
-#define VDISCARD       13              /* Discard character [IEXTEN].  */
-#define VWERASE                14              /* Word-erase character [ICANON].  */
-#define VLNEXT         15              /* Literal-next character [IEXTEN].  */
+#ifdef __USE_BSD
+# define VDISCARD      13              /* Discard character [IEXTEN].  */
+# define VWERASE       14              /* Word-erase character [ICANON].  */
+# define VLNEXT                15              /* Literal-next character [IEXTEN].  */
 #endif
 #define VEOF           16              /* End-of-file character [ICANON].  */
 #define VEOL           17              /* End-of-line character [ICANON].  */
@@ -121,51 +117,51 @@ struct termios
 #define INLCR  0000100         /* Map NL to CR on input.  */
 #define IGNCR  0000200         /* Ignore CR.  */
 #define ICRNL  0000400         /* Map CR to NL on input.  */
-#if defined (__USE_BSD)
-#define IUCLC  0001000         /* Map upper case to lower case on input.  */
+#ifdef __USE_BSD
+# define IUCLC 0001000         /* Map upper case to lower case on input.  */
 #endif
 #define IXON   0002000         /* Enable start/stop output control.  */
-#if defined (__USE_BSD)
-#define IXANY  0004000         /* Any character will restart after stop.  */
+#ifdef __USE_BSD
+# define IXANY 0004000         /* Any character will restart after stop.  */
 #endif
 #define IXOFF  0010000         /* Enable start/stop input control.  */
-#if defined (__USE_BSD)
-#define IMAXBEL        0020000         /* Ring bell when input queue is full.  */
+#ifdef __USE_BSD
+# define IMAXBEL 0020000       /* Ring bell when input queue is full.  */
 #endif
 
 /* c_oflag bits */
 #define OPOST  0000001         /* Perform output processing.  */
-#if defined (__USE_BSD)
-#define OLCUC  0000002         /* Map lower case to upper case on output.  */
-#define ONLCR  0000004         /* Map NL to CR-NL on output.  */
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#define NLDLY  0000400
-#define   NL0  0000000
-#define   NL1  0000400
-#define CRDLY  0003000
-#define   CR0  0000000
-#define   CR1  0001000
-#define   CR2  0002000
-#define   CR3  0003000
-#define TABDLY 0014000
-#define   TAB0 0000000
-#define   TAB1 0004000
-#define   TAB2 0010000
-#define   TAB3 0014000
-#define   XTABS        0014000
-#define BSDLY  0020000
-#define   BS0  0000000
-#define   BS1  0020000
-#define VTDLY  0040000
-#define   VT0  0000000
-#define   VT1  0040000
-#define FFDLY  0100000
-#define   FF0  0000000
-#define   FF1  0100000
+#ifdef __USE_BSD
+# define OLCUC 0000002         /* Map lower case to upper case on output.  */
+# define ONLCR 0000004         /* Map NL to CR-NL on output.  */
+# define OCRNL 0000010
+# define ONOCR 0000020
+# define ONLRET        0000040
+# define OFILL 0000100
+# define OFDEL 0000200
+# define NLDLY 0000400
+# define   NL0 0000000
+# define   NL1 0000400
+# define CRDLY 0003000
+# define   CR0 0000000
+# define   CR1 0001000
+# define   CR2 0002000
+# define   CR3 0003000
+# define TABDLY        0014000
+# define   TAB0        0000000
+# define   TAB1        0004000
+# define   TAB2        0010000
+# define   TAB3        0014000
+# define  XTABS        0014000
+# define BSDLY 0020000
+# define   BS0 0000000
+# define   BS1 0020000
+# define VTDLY 0040000
+# define   VT0 0000000
+# define   VT1 0040000
+# define FFDLY 0100000
+# define   FF0 0000000
+# define   FF1 0100000
 /*
 #define PAGEOUT ???
 #define WRAP    ???
@@ -203,14 +199,14 @@ struct termios
 #define PARODD 0001000         /* Odd parity instead of even.  */
 #define HUPCL  0002000         /* Hang up on last close.  */
 #define CLOCAL 0004000         /* Ignore modem status lines.  */
-#if defined (__USE_BSD)
-#define CBAUDEX 0010000
-#define  B57600  0010001
-#define  B115200 0010002
-#define  B230400 0010003
-#define  B460800 0010004
-#define CIBAUD   002003600000  /* input baud rate (not used) */
-#define CRTSCTS          020000000000          /* flow control */
+#ifdef __USE_BSD
+# define CBAUDEX  0010000
+# define  B57600  0010001
+# define  B115200 0010002
+# define  B230400 0010003
+# define  B460800 0010004
+# define CIBAUD          002003600000  /* input baud rate (not used) */
+# define CRTSCTS  020000000000         /* flow control */
 #endif
 
 /* c_lflag bits */
@@ -223,14 +219,14 @@ struct termios
 #define ECHONL 0000100         /* Echo NL even if ECHO is off.  */
 #define NOFLSH 0000200         /* Disable flush after interrupt.  */
 #define IEXTEN 0000400         /* Enable DISCARD and LNEXT.  */
-#if defined (__USE_BSD)
-#define ECHOCTL        0001000         /* Echo control characters as ^X.  */
-#define ECHOPRT        0002000         /* Hardcopy visual erase.  */
-#define ECHOKE 0004000         /* Visual erase for KILL.  */
+#ifdef __USE_BSD
+# define ECHOCTL 0001000       /* Echo control characters as ^X.  */
+# define ECHOPRT 0002000       /* Hardcopy visual erase.  */
+# define ECHOKE         0004000        /* Visual erase for KILL.  */
 #endif
 #define FLUSHO 0020000
-#if defined (__USE_BSD)
-#define PENDIN 0040000         /* Retype pending input (state).  */
+#ifdef __USE_BSD
+# define PENDIN        0040000         /* Retype pending input (state).  */
 #endif
 #define TOSTOP 0100000         /* Send SIGTTOU for background output.  */
 #define ITOSTOP        TOSTOP
@@ -256,5 +252,3 @@ struct termios
 
 #define _IOT_termios /* Hurd ioctl type field.  */ \
   _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* bits/termios.h */
index 5fcef0fb8cdabd3a525d4dbfb9da9ee991631ee1..a7b268d0f8730293a0b134190c93b760e45e3132 100644 (file)
  * 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
-  {
-    long tv_sec;                       /* Seconds.  */
-    long tv_usec;              /* Microseconds.  */
-  };
-# endif        /* struct timeval */
-#endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H   1
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+#  define _BITS_TIME_H 1
 
 /* ISO/IEC 9899:1990 7.12.1: <time.h>
    The macro `CLOCKS_PER_SEC' is the number per second of the value
@@ -45,10 +31,22 @@ struct timeval
 /* CAE XSH, Issue 4, Version 2: <time.h>
    The value of CLOCKS_PER_SEC is required to be 1 million on all
    XSI-conformant systems. */
-# define CLOCKS_PER_SEC  1000000
+#  define CLOCKS_PER_SEC  1000000
 
 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
    presents the real value for clock ticks per second for the system.  */
-# define CLK_TCK 100           /* XXX not correct for all systems.  */
+#  define CLK_TCK 100          /* XXX not correct for all systems.  */
 
-#endif  /* bits/time.h */
+# endif  /* bits/time.h */
+#endif
+
+#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
+  {
+    long int tv_sec;           /* Seconds.  */
+    long int tv_usec;          /* Microseconds.  */
+  };
+#endif /* struct timeval */
index 9e2695652ede89d79c2c0d7121eb01b1b552b6f5..87b8265afd6e1426eaaf34066f182700b6b4a368 100644 (file)
@@ -1 +1,5 @@
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
+
 #include <termios.h>
index 6d240c4b7a6e0467da73a01b8b2ded0bc174edec..d863f0955b3cd716243f2eeb701a0ee58b15791a 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/PowerPC version.
+/* Definitions for POSIX memory map interface.  Linux/PowerPC version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; iclude <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index 4c6073bfc2b4ae410e454e55f190a2b44bee208f..d1a40be33c62ead4e7537076424be8d02b2c0485 100644 (file)
@@ -16,8 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _TERMBITS_H
-#define _TERMBITS_H    1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
 
 typedef unsigned char  cc_t;
 typedef unsigned int   speed_t;
@@ -73,7 +74,7 @@ struct termios {
 #define ICRNL  0000400
 #define IXON   0001000
 #define IXOFF  0002000
-#if !defined(KERNEL) || defined(__USE_BSD)
+#if !defined KERNEL || defined __USE_BSD
   /* POSIX.1 doesn't want these... */
 # define IXANY         0004000
 # define IUCLC         0010000
@@ -276,5 +277,3 @@ struct termio {
 #define N_SLIP         1
 #define N_MOUSE                2
 #define N_PPP          3
-
-#endif /* _TERMBITS_H */
index b33493ee46a47642b2838ce13468835494b2a5ed..1a8d5f6f81649f8f7921e45c1d3be5c64a8d4c63 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTLS_H
-#define _BITS_IOCTLS_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
 
 /* Use the definitions from the kernel header files.  */
 #include <asm/ioctls.h>
@@ -39,5 +36,3 @@
 #define TCSETSF        _IOW ('T', 11, char[36])
 
 #include <linux/sockios.h>
-
-#endif /* bits/ioctls.h  */
index 8fea43924a523533304d3f2553672edcc3b3e81c..2d4e6f6f01be20b2da2a592122ed96b19800d954 100644 (file)
@@ -16,6 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
 
 /* Event types that can be polled for.  These bits may be set in `events'
    to indicate the interesting event types; they will appear in `revents'
index 13471995b9625ec2b93bdec2ac5621e496fe1e7f..1858ef485749fc831f952c6a8130ed07e4b9029d 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
@@ -30,7 +34,7 @@ struct sigaction
     unsigned long sa_flags;
 
     /* Not used by Linux/Sparc yet.  */
-    void (*sa_restorer)(void);
+    void (*sa_restorer) __P ((void));
   };
 
 
index 54ac773b706895d5707cbdf9122b498c68baa4e0..7047e47a02aedcb25bbbdcd528872830c34b8574 100644 (file)
@@ -17,8 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _SPARC_TERMBITS_H
-#define _SPARC_TERMBITS_H      1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
 
 typedef unsigned char cc_t;
 typedef unsigned int speed_t;
@@ -34,7 +35,7 @@ struct termios
     cc_t c_line;               /* line discipline */
     cc_t c_cc[NCCS];           /* control characters */
 #ifdef __KERNEL__
-#define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
+# define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
     cc_t _x_cc[2];             /* We need them to hold vmin/vtime */
 #endif
   };
@@ -64,11 +65,11 @@ struct termios
  * shared with eof/eol
  */
 #ifdef __KERNEL__
-#define VMIN     16
-#define VTIME    17
+# define VMIN     16
+# define VTIME    17
 #else
-#define VMIN     VEOF
-#define VTIME    VEOL
+# define VMIN     VEOF
+# define VTIME    VEOL
 #endif
 
 /* c_iflag bits */
@@ -213,5 +214,3 @@ struct termios
 #define        TCSANOW         0
 #define        TCSADRAIN       1
 #define        TCSAFLUSH       2
-
-#endif /* !(_SPARC_TERMBITS_H) */
index 3e7f2900fa66cfa355a5a5537adde58f74f82ac0..bc70a58e248f303a9ede5b69b1eb70c5f8ebd451 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/SPARC version.
+/* Definitions for POSIX memory map interface.  Linux/SPARC version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index 3e7f2900fa66cfa355a5a5537adde58f74f82ac0..bc70a58e248f303a9ede5b69b1eb70c5f8ebd451 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface.  Linux/SPARC version.
+/* Definitions for POSIX memory map interface.  Linux/SPARC version.
    Copyright (C) 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,7 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_MMAN_H
-# error "Never include this file directly.  Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
 #endif
 
 /* The following definitions basically come from the kernel headers.
index ab850e5301ecfa0737155854d051a8d06be9657e..b200b718d23734adc6e14c4f5ff52f6a7775840b 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _JMP_BUF_H 
-#define _JMP_BUF_H 1
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
 
 #include <ucontext.h>
 
 typedef ucontext_t __jmp_buf[1];
-
-#endif /* jmp_buf.h */
index 9d6a957028c71e1aeda259537fe1f564efa214c9..7fa98f7733332c12d5470892b733feef0206a785 100644 (file)
@@ -1,8 +1,33 @@
+/* Stdio limits for Linux.
+   Copyright (C) 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.  */
+
+#ifndef _STDIO_H
+# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
+#endif
+
 #define L_tmpnam 19
 #define TMP_MAX 238328
+
 #ifdef __USE_POSIX
-#define L_ctermid 9
-#define L_cuserid 9
+# define L_ctermid 9
+# define L_cuserid 9
 #endif
-#define FOPEN_MAX DEFAULT_FOPEN_MAX
-#define FILENAME_MAX DEFAULT_FILENAME_MAX
+
+#define FOPEN_MAX      DEFAULT_FOPEN_MAX
+#define FILENAME_MAX   DEFAULT_FILENAME_MAX
index ea326e2cd9cb910fb2e13ca0b3521bea1015ed74..e2434f135f12b2c56428a2e54d6de5606209fcdb 100644 (file)
    Boston, MA 02111-1307, USA.  */
 
 #ifndef        _SYS_MMAN_H
-
 #define        _SYS_MMAN_H     1
-#include <features.h>
 
+#include <features.h>
 #include <bits/types.h>
 #define __need_size_t
 #include <stddef.h>
index 732befc63073fab5047d39039ff1e647c97ebe62..96f14d17af6c881cc4e37a1cb3c96a3ae81bf4ee 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index 3af9377ded3875f118386d03fc86760fb34fe241..3c549dd4b36a08d49eff7e08c7718e62b86016d1 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
 /* Values for the NAME argument to `pathconf' and `fpathconf'.  */
 #define _PC_LINK_MAX           0
 #define _PC_MAX_CANON          1
index f66877da0b171da40a6272adb49229d0cc3d1a7a..eaa52bee2fa8a8eecd9d7c16f61f8b66da625772 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index ce3ab5e60cdb95600315d9b3b1cd147b9ac76fce..07d55549217e78b58904c7bb851a6bc9b29e59f3 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
   {
index 9dcc618068900006ff0d3d0f6926b265b7c6901d..bf2c0a8da58f7564c06c78153f95ba20872a85ea 100644 (file)
@@ -1 +1,23 @@
+/* Copyright (C) 1995, 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 _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
 #define _UTSNAME_LENGTH 257
index 29ff5663428f6b270d0db5762044ad00ea358c03..e99dc00511e33249db6cf355169cb162764d597a 100644 (file)
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
 #endif
 
 
@@ -28,7 +28,7 @@
 #define        WUNTRACED       4       /* Report status of stopped children.  */
 
 #ifdef __USE_SVID
-#define WEXITED                1       /* Look for children that have exited.  */
-#define WTRAPPED       2       /* Look for processes that stopped
+# define WEXITED       1       /* Look for children that have exited.  */
+# define WTRAPPED      2       /* Look for processes that stopped
                                   while tracing.  */
 #endif
index f3f447303224c8c99299d5fd9125f6b88da144ed..104ad2f24702d12c87d4e1b0f79669395dbdcc05 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 #include <bits/types.h>
 
 /* Structure describing file characteristics.  */
 struct stat
   {
-    unsigned long st_dev;      /* Device.  */
-    long st_filler1[3];
-    unsigned long st_ino;              /* File serial number.          */
-    unsigned long st_mode;     /* File mode.  */
-    unsigned long st_nlink;    /* Link count.  */
-    long st_uid;               /* User ID of the file's owner. */
-    long st_gid;               /* Group ID of the file's group.*/
-    unsigned long st_rdev;     /* Device number, if device.  */
-    long st_filler2[2];
-
-    long st_size;              /* Size of file, in bytes.  */
+    unsigned long itn st_dev;  /* Device.  */
+    long int st_filler1[3];
+    unsigned long int st_ino;  /* File serial number.          */
+    unsigned long int st_mode; /* File mode.  */
+    unsigned long int st_nlink;        /* Link count.  */
+    long int st_uid;           /* User ID of the file's owner. */
+    long int st_gid;           /* Group ID of the file's group.*/
+    unsigned long int st_rdev; /* Device number, if device.  */
+    long int st_filler2[2];
+
+    long int st_size;          /* Size of file, in bytes.  */
     /* SVR4 added this extra long to allow for expansion of off_t.  */
-    long st_filler3;
+    long int st_filler3;
 
-    long st_atime;             /* Time of last access.  */
-    unsigned long st_atime_usec;
-    long st_mtime;             /* Time of last modification.  */
-    unsigned long st_mtime_usec;
-    long st_ctime;             /* Time of last status change.  */
-    unsigned long st_ctime_usec;
+    long int st_atime;         /* Time of last access.  */
+    unsigned long int st_atime_usec;
+    long int st_mtime;         /* Time of last modification.  */
+    unsigned long int st_mtime_usec;
+    long int st_ctime;         /* Time of last status change.  */
+    unsigned long int st_ctime_usec;
 
-    long st_blksize;           /* Optimal block size for I/O.  */
+    long int st_blksize;       /* Optimal block size for I/O.  */
 #define        _STATBUF_ST_BLKSIZE     /* Tell code we have this member.  */
 
     __blkcnt_t st_blocks;      /* Number of 512-byte blocks allocated.  */
     char st_fstype[16];                /* The type of this filesystem.  */
     int st_aclcnt;
-    unsigned long st_level;
-    unsigned long st_flags;
-    unsigned long st_cmwlevel;
-    long st_filler4[4];
+    unsigned long int st_level;
+    unsigned long int st_flags;
+    unsigned long int st_cmwlevel;
+    long int st_filler4[4];
   };
 
 /* Encoding of the file mode.  */
@@ -90,5 +86,3 @@ struct stat
 #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 */
index 82ab37fd93152fd338c17f89ca1706a49a84f6d8..c6048a9277dcfd21dbd3c9bf05d1427ee185fba5 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Brendan Kehoe (brendan@zen.org).
 
    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
    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.
- */
-
-#ifndef        _BITS_STAT_H
-#define        _BITS_STAT_H    1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
 
 #include <bits/types.h>
 
@@ -30,7 +26,7 @@
 struct stat
   {
     unsigned long int st_dev;
-    long st_filler1[3];
+    long int st_filler1[3];
     __ino_t st_ino;            /* File serial number.          */
     unsigned long int st_mode; /* File mode.  */
     /* This is unsigned long instead of __nlink_t, since SVR4 has
@@ -39,11 +35,11 @@ struct stat
     __uid_t st_uid;            /* User ID of the file's owner. */
     __gid_t st_gid;            /* Group ID of the file's group.*/
     unsigned long int st_rdev; /* Device number, if device.  */
-    long st_filler2[2];
+    long int st_filler2[2];
 
     __off_t st_size;           /* Size of file, in bytes.  */
     /* SVR4 added this extra long to allow for expansion of off_t.  */
-    long st_filler3;
+    long int st_filler3;
 
     __time_t st_atime;         /* Time of last access.  */
     unsigned long int st_atime_usec;
@@ -55,9 +51,9 @@ struct stat
     __blkcnt_t st_blksize;     /* Optimal block size for I/O.  */
 #define        _STATBUF_ST_BLKSIZE     /* Tell code we have this member.  */
 
-    long st_blocks;            /* Number of 512-byte blocks allocated.  */
+    long int st_blocks;                /* Number of 512-byte blocks allocated.  */
     char st_fstype[16];
-    long st_filler4[8];
+    long int st_filler4[8];
   };
 
 /* Encoding of the file mode.  */
@@ -83,5 +79,3 @@ struct stat
 #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 */
index 74027048648bba270e2b07a999437d8654976d42..29d2d87b267c6177453df7b6f2c61a0c6548f168 100644 (file)
@@ -1 +1,34 @@
-#include <sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h>
+/* Structure describing state saved while handling a signal.  Sparc version.
+   Copyright (C) 1992, 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.  */
+
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+struct sigcontext
+  {
+    int sc_onstack;
+    __sigset_t sc_mask;
+
+#define        SPARC_MAXREGWINDOW 31   /* Maximum usable register windows.  */
+    int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
+    int sc_wbcnt;              /* Number of outstanding windows.  */
+    __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window.  */
+    int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows.  */
+  };
index f323049d8373672ca900b3693dc8ffefc56663f7..74930be56abeb3d560a7972deb64017667481723 100644 (file)
@@ -1,6 +1,6 @@
 /* `HUGE_VAL' constant for Vaxen.
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1992, 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
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
 #endif
 
 
index 7adecd9a173be41156ad8cc7b2e9362cbd1c1e7b..10ca170a2a19efeca24df4f9ee82a691bf39ae58 100644 (file)
@@ -1,5 +1,9 @@
 /* Define the machine-dependent type `jmp_buf'.  Vax version.  */
 
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
 typedef struct
   {
     PTR __fp;
index 49411d66f338734f53f80b60b987c2fbb298a24f..7d9ea28695a05cf7dd8791a81edc3b5e3a8e2d93 100644 (file)
@@ -2,4 +2,8 @@
    the ELF file class used for executables and shared objects on this
    machine.  */
 
+#ifndef _LINK_H
+# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
+#endif
+
 #define __ELF_NATIVE_CLASS 32
index ac52904886a90c0c001e23f8cf05d0f5673c6d06..bf76faf418df9461da62620d4cd0e3023ad00b8a 100644 (file)
@@ -2,4 +2,8 @@
    the ELF file class used for executables and shared objects on this
    machine.  */
 
+#ifndef _LINK_H
+# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
+#endif
+
 #define __ELF_NATIVE_CLASS 64
index c36dd79b33474940423fb926d83fad819061e7e1..f1ba7ff188ea75ca9332e7713d7400884133f74c 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
@@ -20,7 +19,7 @@
 #ifndef _SYS_IPC_H
 #define _SYS_IPC_H     1
 
-#include <sys/cdefs.h>
+#include <features.h>
 
 /* Get system dependent definition of `struct ipc_perm' and more.  */
 #include <bits/ipc.h>
index b6fe7a77cf39788ec826505b0b196469ec65981c..56938bf6134203b56fbac08020c0d6663866c533 100644 (file)
@@ -1,6 +1,5 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* 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
 /* Get system dependent definition of `struct msqid_ds' and more.  */
 #include <bits/msq.h>
 
-__BEGIN_DECLS
-
 /* The following System V style IPC functions implement a message queue
    system.  The definition is found in XPG2.  */
 
 /* Template for struct to be used as argument for `msgsnd' and `msgrcv'.  */
 struct msgbuf
-{
-  long int mtype;              /* type of received/sent message */
-  char mtext[1];               /* text of the message */
-};
+  {
+    long int mtype;            /* type of received/sent message */
+    char mtext[1];             /* text of the message */
+  };
 
 
+__BEGIN_DECLS
+
 /* Message queue control operation.  */
 extern int msgctl __P ((int __msqid, int __cmd, struct msqid_ds *__buf));
 
index 84bcc5a0fccf17c12a7929b1544fdf2cdc42acd9..f509d9b4a2c584be39d939171854f2ae2209b13a 100644 (file)
@@ -1,6 +1,5 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* 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
@@ -30,8 +29,6 @@
 /* Get system dependent definition of `struct semid_ds' and more.  */
 #include <bits/sem.h>
 
-__BEGIN_DECLS
-
 /* The following System V style IPC functions implement a semaphore
    handling.  The definition is found in XPG2.  */
 
@@ -44,6 +41,8 @@ struct sembuf
 };
 
 
+__BEGIN_DECLS
+
 /* Semaphore control operation.  */
 extern int semctl __P ((int __semid, int __semnum, int __cmd,
                        union semun __arg));
index 56883b787b9b28b6e1370e00a9fc4a33613ee8f2..6a3a34247ba3771ce46668bbbaffe16559ad54d9 100644 (file)
@@ -1,6 +1,5 @@
 /* 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
 /* Segment low boundary address multiple.  */
 #define SHMLBA         getpagesize ()
 
-__BEGIN_DECLS
-
 /* The following System V style IPC functions implement a shared memory
    facility.  The definition is found in XPG4.2.  */
 
+__BEGIN_DECLS
+
 /* Shared memory control operation.  */
 extern int shmctl __P ((int __shmid, int __cmd, struct shmid_ds *__buf));
 
index e09d0fd26f16c2125e91766e5953424c9c43597e..7bb081054713bdb5139e4a0273722bced0ea866c 100644 (file)
@@ -375,14 +375,6 @@ static char const month_name[][10] =
 
 #ifdef emacs
 # define my_strftime emacs_strftime
- /* Emacs 20.2 uses `-Dstrftime=emacs_strftime' when compiling,
-    because that's how strftime used to be configured.
-    Undo this, since it gets in the way of accessing the underlying strftime,
-    which is needed for things like %Ec in Solaris.
-    The following two lines can be removed once Emacs stops compiling with
-    `-Dstrftime=emacs_strftime'.  */
-# undef strftime
-size_t strftime __P ((char *, size_t, const char *, const struct tm *));
 #else
 # define my_strftime strftime
 #endif
@@ -1173,14 +1165,14 @@ my_strftime (s, maxsize, format, tp)
                   valid time_t value.  Check whether an error really
                   occurred.  */
                struct tm tm;
-               localtime_r (&lt, &tm);
-
-               if ((ltm.tm_sec ^ tm.tm_sec)
-                   | (ltm.tm_min ^ tm.tm_min)
-                   | (ltm.tm_hour ^ tm.tm_hour)
-                   | (ltm.tm_mday ^ tm.tm_mday)
-                   | (ltm.tm_mon ^ tm.tm_mon)
-                   | (ltm.tm_year ^ tm.tm_year))
+
+               if (! localtime_r (&lt, &tm)
+                   || ((ltm.tm_sec ^ tm.tm_sec)
+                       | (ltm.tm_min ^ tm.tm_min)
+                       | (ltm.tm_hour ^ tm.tm_hour)
+                       | (ltm.tm_mday ^ tm.tm_mday)
+                       | (ltm.tm_mon ^ tm.tm_mon)
+                       | (ltm.tm_year ^ tm.tm_year)))
                  break;
              }
 
index 8b4dbe2912e517408ddb4cc9c2b926d662b1695d..cf0bbd6ce284257aa401ad2996a58e62165517ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -38,9 +38,8 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   if (s == NULL)
     {
       /* See first paragraph of description in 7.16.6.3.2.  */
-      pwc = NULL;
-      s = "";
-      n = 1;
+      ps->count = 0;
+      return 0;
     }
 
   if (n > 0)
index bb79a30ed284ca47990ae7d4ef58d81926e16092..db67d5c1bb20405a8fa943606b1889baafa56e00 100644 (file)
@@ -43,10 +43,16 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
   size_t written = 0;
   const char *run = *src;
   const char *last = run + nmc;
+  wchar_t value;
+  size_t count;
 
   if (ps == NULL)
     ps = &internal;
 
+  /* Get information from last use of this state.  */
+  count = ps->count;
+  value = ps->value;
+
   if (dst == NULL)
     /* The LEN parameter has to be ignored if we don't actually write
        anything.  */
@@ -55,57 +61,66 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
   /* Copy all words.  */
   while (written < len && run < last)
     {
-      wchar_t value;
-      size_t count;
-      unsigned char byte = *run++;
+      unsigned char byte;
 
-      /* We expect a start of a new multibyte character.  */
-      if (byte < 0x80)
-       {
-         /* One byte sequence.  */
-         count = 0;
-         value = byte;
-       }
-      else if ((byte & 0xe0) == 0xc0)
-       {
-         count = 1;
-         value = byte & 0x1f;
-       }
-      else if ((byte & 0xf0) == 0xe0)
-       {
-         /* We expect three bytes.  */
-         count = 2;
-         value = byte & 0x0f;
-       }
-      else if ((byte & 0xf8) == 0xf0)
-       {
-         /* We expect four bytes.  */
-         count = 3;
-         value = byte & 0x07;
-       }
-      else if ((byte & 0xfc) == 0xf8)
-       {
-         /* We expect five bytes.  */
-         count = 4;
-         value = byte & 0x03;
-       }
-      else if ((byte & 0xfe) == 0xfc)
-       {
-         /* We expect six bytes.  */
-         count = 5;
-         value = byte & 0x01;
-       }
-      else
+      /* Store address of next byte to process.  */
+      *src = run;
+
+      /* Start reading a new character only if we are in the initial
+        state.  */
+      if (count == 0)
        {
-         /* This is an illegal encoding.  */
-         __set_errno (EILSEQ);
-         return (size_t) -1;
+         byte = *run++;
+
+         /* We expect a start of a new multibyte character.  */
+         if (byte < 0x80)
+           {
+             /* One byte sequence.  */
+             count = 0;
+             value = byte;
+           }
+         else if ((byte & 0xe0) == 0xc0)
+           {
+             count = 1;
+             value = byte & 0x1f;
+           }
+         else if ((byte & 0xf0) == 0xe0)
+           {
+             /* We expect three bytes.  */
+             count = 2;
+             value = byte & 0x0f;
+           }
+         else if ((byte & 0xf8) == 0xf0)
+           {
+             /* We expect four bytes.  */
+             count = 3;
+             value = byte & 0x07;
+           }
+         else if ((byte & 0xfc) == 0xf8)
+           {
+             /* We expect five bytes.  */
+             count = 4;
+             value = byte & 0x03;
+           }
+         else if ((byte & 0xfe) == 0xfc)
+           {
+             /* We expect six bytes.  */
+             count = 5;
+             value = byte & 0x01;
+           }
+         else
+           {
+             /* This is an illegal encoding.  */
+             __set_errno (EILSEQ);
+             return (size_t) -1;
+           }
        }
 
       /* Read the possible remaining bytes.  */
-      while (count-- > 0)
+      while (run < last && count > 0)
        {
          byte = *run++;
+         --count;
 
          if ((byte & 0xc0) != 0x80)
            {
@@ -118,6 +133,14 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
          value |= byte & 0x3f;
        }
 
+      /* If this character is only partially available remember this.  */
+      if (run == last && count != 0)
+       {
+         ps->count = count;
+         ps->value = value;
+         break;
+       }
+
       /* Store value is required.  */
       if (dst != NULL)
        *dst++ = value;
@@ -128,6 +151,7 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
        {
          /* Found the end of the string.  */
          *src = NULL;
+         ps->count = 0;
          return written;
        }
 
index 7ae30b4870ae68a34977e498cf60c6100a9b4aed..84d4cbf66d3501195fa265dd7ad6e887a404bdc0 100644 (file)
@@ -52,7 +52,12 @@ __mbsrtowcs (dst, src, len, ps)
     {
       wchar_t value;
       size_t count;
-      unsigned char byte = *run++;
+      unsigned char byte;
+
+      /* Store address of next byte to process.  */
+      *src = run;
+
+      byte = *run++;
 
       /* We expect a start of a new multibyte character.  */
       if (byte < 0x80)
index c5b887dce9ac0152329c8ed7736c7e4c5ddfde81..69c67705c3cab49f5cbba37d2e894a316d6d6765 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -48,8 +48,10 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
 
   if (s == NULL)
     {
-      s = fake;
-      wc = L'\0';
+      /* This is equivalent to wcrtomb (<<internal>, L'\0', ps).  We
+        only have to reset the state.  */
+      ps->count = 0;
+      return 1;
     }
 
   /* Store the UTF8 representation of WC.  */
@@ -65,6 +67,7 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
       /* It's a one byte sequence.  */
       if (s != NULL)
        *s = (char) wc;
+      ps->count = 0;
       return 1;
     }
 
index ddd4e950579f4d303d9e4aa4943a09baaf40cfb1..f6c80482955a6f2e617c9293c64fa833e0d1d53b 100644 (file)
@@ -63,7 +63,12 @@ __wcsnrtombs (dst, src, nwc, len, ps)
 
   while (written < len && nwc-- > 0)
     {
-      wchar_t wc = *run++;
+      wchar_t wc;
+
+      /* Store position of first unprocessed word.  */
+      *src = run;
+
+      wc = *run++;
 
       if (wc < 0 || wc > 0x7fffffff)
        {
index b2c0c73778e985ed5e0f9ddeca3bd282d5351866..cc21a51eb35bdd38f920eea2062a029908091a33 100644 (file)
@@ -59,7 +59,12 @@ __wcsrtombs (dst, src, len, ps)
 
   while (written < len)
     {
-      wchar_t wc = *run++;
+      wchar_t wc;
+
+      /* Store position of first unprocessed word.  */
+      *src = run;
+
+      wc = *run++;
 
       if (wc < 0 || wc > 0x7fffffff)
        {
@@ -73,6 +78,7 @@ __wcsrtombs (dst, src, len, ps)
          /* Found the end.  */
          if (dst != NULL)
            *dst = '\0';
+         ps->count = 0;
          *src = NULL;
          return written;
        }
@@ -120,6 +126,9 @@ __wcsrtombs (dst, src, len, ps)
   /* Store position of first unprocessed word.  */
   *src = run;
 
+  /* Signal that we finished correctly.  */
+  ps->count = 0;
+
   return written;
 }
 weak_alias (__wcsrtombs, wcsrtombs)
index 2bbd66788e8332a992bfb9beed9387293424c54c..5b8e39cbe37d8f985b1a8cdace71c3431b961ccc 100644 (file)
@@ -63,7 +63,12 @@ __wmemrtombs (dst, src, nwc, len, ps)
 
   while (written < len && nwc-- > 0)
     {
-      wchar_t wc = *run++;
+      wchar_t wc;
+
+      /* Store position of first unprocessed word.  */
+      *src = run;
+
+      wc = *run++;
 
       if (wc < 0 || wc > 0x7fffffff)
        {
index 1686229b8f561705a5eea92680593a7666c4ab4b..4efdd72d2e2864d21260f4c0df605153007727dd 100644 (file)
@@ -43,10 +43,16 @@ __wmemrtowcs (dst, src, nmc, len, ps)
   size_t written = 0;
   const char *run = *src;
   const char *last = run + nmc;
+  wchar_t value;
+  size_t count;
 
   if (ps == NULL)
     ps = &internal;
 
+  /* Get information from last use of this state.  */
+  count = ps->count;
+  value = ps->value;
+
   if (dst == NULL)
     /* The LEN parameter has to be ignored if we don't actually write
        anything.  */
@@ -55,57 +61,66 @@ __wmemrtowcs (dst, src, nmc, len, ps)
   /* Copy all words.  */
   while (written < len && run < last)
     {
-      wchar_t value;
-      size_t count;
-      unsigned char byte = *run++;
+      unsigned char byte;
 
-      /* We expect a start of a new multibyte character.  */
-      if (byte < 0x80)
-       {
-         /* One byte sequence.  */
-         count = 0;
-         value = byte;
-       }
-      else if ((byte & 0xe0) == 0xc0)
-       {
-         count = 1;
-         value = byte & 0x1f;
-       }
-      else if ((byte & 0xf0) == 0xe0)
-       {
-         /* We expect three bytes.  */
-         count = 2;
-         value = byte & 0x0f;
-       }
-      else if ((byte & 0xf8) == 0xf0)
-       {
-         /* We expect four bytes.  */
-         count = 3;
-         value = byte & 0x07;
-       }
-      else if ((byte & 0xfc) == 0xf8)
-       {
-         /* We expect five bytes.  */
-         count = 4;
-         value = byte & 0x03;
-       }
-      else if ((byte & 0xfe) == 0xfc)
-       {
-         /* We expect six bytes.  */
-         count = 5;
-         value = byte & 0x01;
-       }
-      else
+      /* Store address of next byte to process.  */
+      *src = run;
+
+      /* Start reading a new character only if we are in the initial
+        state.  */
+      if (count == 0)
        {
-         /* This is an illegal encoding.  */
-         __set_errno (EILSEQ);
-         return (size_t) -1;
+         byte = *run++;
+
+         /* We expect a start of a new multibyte character.  */
+         if (byte < 0x80)
+           {
+             /* One byte sequence.  */
+             count = 0;
+             value = byte;
+           }
+         else if ((byte & 0xe0) == 0xc0)
+           {
+             count = 1;
+             value = byte & 0x1f;
+           }
+         else if ((byte & 0xf0) == 0xe0)
+           {
+             /* We expect three bytes.  */
+             count = 2;
+             value = byte & 0x0f;
+           }
+         else if ((byte & 0xf8) == 0xf0)
+           {
+             /* We expect four bytes.  */
+             count = 3;
+             value = byte & 0x07;
+           }
+         else if ((byte & 0xfc) == 0xf8)
+           {
+             /* We expect five bytes.  */
+             count = 4;
+             value = byte & 0x03;
+           }
+         else if ((byte & 0xfe) == 0xfc)
+           {
+             /* We expect six bytes.  */
+             count = 5;
+             value = byte & 0x01;
+           }
+         else
+           {
+             /* This is an illegal encoding.  */
+             __set_errno (EILSEQ);
+             return (size_t) -1;
+           }
        }
 
       /* Read the possible remaining bytes.  */
-      while (count-- > 0)
+      while (run < last && count > 0)
        {
          byte = *run++;
+         --count;
 
          if ((byte & 0xc0) != 0x80)
            {
@@ -118,6 +133,14 @@ __wmemrtowcs (dst, src, nmc, len, ps)
          value |= byte & 0x3f;
        }
 
+      /* If this character is only partially available remember this.  */
+      if (run == last && count != 0)
+       {
+         ps->count = count;
+         ps->value = value;
+         break;
+       }
+
       /* Store value is required.  */
       if (dst != NULL)
        *dst++ = value;