libc/newlib/libc/include/sys/_types.h

113 lines
2.4 KiB
C
Raw Normal View History

2000-02-17 20:39:52 +01:00
/* ANSI C namespace clean utility typedefs */
/* This file defines various typedefs needed by the system calls that support
the C library. Basically, they're just the POSIX versions with an '_'
prepended. This file lives in the `sys' directory so targets can provide
their own if desired (or they can put target dependant conditionals here).
*/
#ifndef _SYS__TYPES_H
#define _SYS__TYPES_H
#include <machine/_types.h>
#include <sys/lock.h>
#ifndef __off_t_defined
2000-02-17 20:39:52 +01:00
typedef long _off_t;
#endif
Eliminate use of Newlib-specific <machine/types.h> This change solves a glibc/BSD compatibility problem. glibc and BSD use double underscore types for internal types. The Linux port of Newlib uses some glibc provided internal type definitions which are not protected by guard defines, e.g. __off_t. To avoid a conflict Newlib uses single underscore types for some internal types, e.g. _off_t. However, for BSD compatibility we have to define the internal types with double underscore names in <sys/_types.h>. The header file <machine/types.h> is Newlib-specific. It was used instead of <sys/_types.h> to provide the internal type definitions _CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t. Move these definitions to <sys/_types.h> (there exist two instances of this file, one for Linux and one for all other targets). This makes the _HAVE_SYSTYPES configuration define obsolete (could possibly break the __RDOS__ target). Use the standard <sys/_types.h> include throughout. Move __loff_t defintion to default (non-Linux) <sys/_types.h>. Define it via _off64_t to avoid a dependency on the compiler. Provide the __off_t definition via default (non-Linux) <sys/_types.h> based on _off_t for all systems except Cygwin. For Cygwin use _off64_t. Define off_t via __off_t. Provide the __pid_t definition via default (non-Linux) <sys/_types.h>. This prevents a potential __pid_t and pid_t incompatibility. Add BSD guard defines for pid_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-13 13:10:15 +02:00
#if defined(__XMK__)
typedef signed char __pid_t;
#else
typedef int __pid_t;
#endif
#ifndef __dev_t_defined
typedef short __dev_t;
#endif
#ifndef __uid_t_defined
typedef unsigned short __uid_t;
#endif
#ifndef __gid_t_defined
typedef unsigned short __gid_t;
#endif
#ifndef __off64_t_defined
2002-07-17 Jeff Johnston <jjohnstn@redhat.com> * configure.host(stdio64_dir): New setting that is used to enable building of new stdio64 directory. * libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for large files. (stmp-stdio64,stdio64.texi): New targets to optionally add in stdio64 info to info files. * libc/Makefile.in: Regenerated. * libc/configure: Ditto. * libc/configure.in: Add configuration variables that are set when stdio64 is selected as subdir in configure.host. * libc/libc.texinfo: Add optional menu item for Stdio64, based on whether STDIO64 flag is set or not. * libc/sys.tex: Add optional stdio64 syscalls based on whether STDIO64 flag is set or not. * libc/include/reent.h[__LARGE64_FILES]: Add new stdio64 _r sycall routines. * libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes. (FILE): Typedef'd to __FILE instead of struct __sFILE directly. (__SL64): New file flag indicating file is opened via fopen64. * libc/include/sys/_types.h(_off64_t): Added. * libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES. * libc/include/sys/reent.h(struct __sFILE64): New file structure for 64-bit offset large file support. (__FILE): New intermediate type either set to struct __sFILE64 or struct __sFILE, depending on whether __LARGE64_FILES is set or not. * libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files. * libc/reent/Makefile.in: Regenerated. * libc/reent/fstat64r.c: New file. * libc/reent/lseek64r.c: Ditto. * libc/reent/open64r.c: Ditto. * libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls based on whether STDIO64 flag is set. * libc/stdio/stdio.tex: Add blank line. * libc/stdio64/Makefile.am: New file. * libc/stdio64/Makefile.in: Ditto. * libc/stdio64/fgetpos64.c: Ditto. * libc/stdio64/fopen64.: Ditto. * libc/stdio64/freopen64.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/stdio64/fsetpos64.c: Ditto. * libc/stdio64/ftello64.c: Ditto. * libc/stdio64/local64.h: Ditto. * libc/stdio64/stdio64.c: Ditto. * libc/stdio64/stdio64.tex: Ditto. * libc/stdio64/tmpfile64.c: Ditto. * libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and open64.
2002-07-18 01:25:44 +02:00
__extension__ typedef long long _off64_t;
#endif
Eliminate use of Newlib-specific <machine/types.h> This change solves a glibc/BSD compatibility problem. glibc and BSD use double underscore types for internal types. The Linux port of Newlib uses some glibc provided internal type definitions which are not protected by guard defines, e.g. __off_t. To avoid a conflict Newlib uses single underscore types for some internal types, e.g. _off_t. However, for BSD compatibility we have to define the internal types with double underscore names in <sys/_types.h>. The header file <machine/types.h> is Newlib-specific. It was used instead of <sys/_types.h> to provide the internal type definitions _CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t. Move these definitions to <sys/_types.h> (there exist two instances of this file, one for Linux and one for all other targets). This makes the _HAVE_SYSTYPES configuration define obsolete (could possibly break the __RDOS__ target). Use the standard <sys/_types.h> include throughout. Move __loff_t defintion to default (non-Linux) <sys/_types.h>. Define it via _off64_t to avoid a dependency on the compiler. Provide the __off_t definition via default (non-Linux) <sys/_types.h> based on _off_t for all systems except Cygwin. For Cygwin use _off64_t. Define off_t via __off_t. Provide the __pid_t definition via default (non-Linux) <sys/_types.h>. This prevents a potential __pid_t and pid_t incompatibility. Add BSD guard defines for pid_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-13 13:10:15 +02:00
#ifdef __CYGWIN__
typedef _off64_t __off_t;
#else
typedef _off_t __off_t;
#endif
typedef _off64_t __loff_t;
/*
* We need fpos_t for the following, but it doesn't have a leading "_",
* so we use _fpos_t instead.
*/
#ifndef __fpos_t_defined
typedef long _fpos_t; /* XXX must match off_t in <sys/types.h> */
/* (and must be `long' for now) */
#endif
#ifdef __LARGE64_FILES
#ifndef __fpos64_t_defined
typedef _off64_t _fpos64_t;
#endif
#endif
#ifndef __ssize_t_defined
#ifdef __SIZE_TYPE__
/* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t.
We simply change "unsigned" to "signed" for this single definition
to make sure ssize_t and size_t only differ by their signedness. */
#define unsigned signed
typedef __SIZE_TYPE__ _ssize_t;
#undef unsigned
#else
#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
typedef int _ssize_t;
#else
2000-02-17 20:39:52 +01:00
typedef long _ssize_t;
#endif
#endif
#endif
2000-02-17 20:39:52 +01:00
* libc/include/langinfo.h: New file. * libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 03:56:05 +02:00
#define __need_wint_t
#include <stddef.h>
#ifndef __mbstate_t_defined
* libc/include/langinfo.h: New file. * libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 03:56:05 +02:00
/* Conversion state information. */
typedef struct
{
int __count;
union
{
wint_t __wch;
unsigned char __wchb[4];
* libc/include/langinfo.h: New file. * libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 03:56:05 +02:00
} __value; /* Value so far. */
} _mbstate_t;
#endif
* libc/include/langinfo.h: New file. * libc/include/wchar.h: Likewise. * libc/include/sys/syslimits.h: Likewise. * libc/locale/fix_grouping.c: Likewise. * libc/locale/ldpart.c: Likewise. * libc/locale/ldpart.h: Likewise. * libc/locale/lmessages.c: Likewise. * libc/locale/lmessages.h: Likewise. * libc/locale/lmonetary.c: Likewise. * libc/locale/lmonetary.h: Likewise. * libc/locale/lnumeric.c: Likewise. * libc/locale/lnumeric.h: Likewise. * libc/locale/nl_langinfo.3: Likewise. * libc/locale/nl_langinfo.c: Likewise. * libc/locale/timelocal.c: Likewise. * libc/locale/timelocal.h: Likewise. * libc/stdlib/btowc.c: Likewise. * libc/stdlib/mbrlen.c: Likewise. * libc/stdlib/mbrtowc.c: Likewise. * libc/stdlib/mbsinit.c: Likewise. * libc/stdlib/mbsrtowcs.c: Likewise. * libc/stdlib/wcrtomb.c: Likewise. * libc/stdlib/wcsrtombs.c: Likewise. * libc/stdlib/wctob.c: Likewise. * libc/sys/linux/prof-freq.c: Likewise. * libc/sys/linux/profile.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/include/stdlib.h: Change re-entrant functions to take mbstate_t pointers. * libc/include/sys/_types.h: Define _mbstate_t. * libc/include/sys/config.h (MB_LEN_MAX): New macro. * libc/include/sys/errno.h (EILSEQ): New error code. * libc/include/sys/reent.h: Include wchar.h. Change reentrant structure to use mbstate_t. * libc/locale/Makefile.am (LIB_SOURCES): Add new files. * libc/machine/powerpc/vfprintf.c: Use mbstate_t. * libc/machine/powerpc/vfscanf.c: Likewise. * libc/stdio/getdelim.c: Reallocate buffer only when necessary. * libc/stdio/vfprintf.c: Likewise. * libc/stdio/vfscanf.c: Likewise. * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files. * libc/stdlib/mblen.c: Use mbstate_t. * libc/stdlib/mblen_r.c: Likewise. * libc/stdlib/mbstowcs.c: Likewise. * libc/stdlib/mbstowcs_r.c: Likewise. * libc/stdlib/mbtowc.c: Likewise. * libc/stdlib/mbtowc_r.c: Likewise. * libc/stdlib/wcstombs.c: Likewise. * libc/stdlib/wcstombs_r.c: Likewise. * libc/stdlib/wctomb_r.c: Likewise. * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and profile.c. * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add dl-procinfo.c. * libc/sys/linux/sys/errno.h (EILSEQ): New error code. * libc/sys/linux/sys/types.h (off_t): Define type. * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8 to C-UTF-8. * testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 03:56:05 +02:00
#ifndef __flock_t_defined
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
#ifndef __iconv_t_defined
2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com> * acinclude.m4 (--enable-newlib-iconv): New configuration option. (--enable-newlib-builtin-converters): Ditto. * configure.in: Add code to set _ICONV_ENABLED flag. Set _MB_LEN_MAX to 1 if not mb enabled. * configure: Regenerated. * aclocal.m4: Ditto. * Makefile.in: Ditto. * newlib.hin: Add _ICONV_ENABLED flag. * libc/Makefile.am: Add support for iconv. * libc/configure.in: Ditto. * libc/Makefile.in: Regenerated. * libc/aclocal.m4: Ditto. * libc/configure: Ditto. * libc/libc.texinfo: Add iconv documentation. * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am, libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL, libc/iconv/README.TODO, libc/iconv/charset.aliases, libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am, libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES, libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c, libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c, libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c, libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c, libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c, libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c, libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c, libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c, libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c, libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c, libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c, libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c, libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in, libc/iconv/ccs/binary/big5.cct, libc/iconv/ccs/binary/cns11643_plane1.cct, libc/iconv/ccs/binary/cns11643_plane14.cct, libc/iconv/ccs/binary/cns11643_plane2.cct, libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct, libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct, libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct, libc/iconv/ccs/binary/iso_8859_1.cct, libc/iconv/ccs/binary/iso_8859_15.cct, libc/iconv/ccs/binary/iso_8859_2.cct, libc/iconv/ccs/binary/iso_8859_4.cct, libc/iconv/ccs/binary/iso_8859_5.cct, libc/iconv/ccs/binary/jis_x0201.cct, libc/iconv/ccs/binary/jis_x0208_1983.cct, libc/iconv/ccs/binary/jis_x0212_1990.cct, libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct, libc/iconv/ccs/binary/ksx1001.cct, libc/iconv/ccs/binary/shift_jis.cct, libc/iconv/ccs/binary/us_ascii.cct, libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in, libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c, libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c, libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c, libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c, libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c, libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in, libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c, libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c, libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c, libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c, libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c, libc/iconv/lib/deps.h, libc/iconv/lib/endian.h, libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c, libc/iconv/lib/local.h, libc/include/iconv.h: New files. * libc/sys/linux/include/iconv.h: Ditto. * libc/include/sys/_types.h (_iconv_t): Added. * doc/aclocal.m4: Regenerated. * doc/configure: Ditto. * doc/Makefile.in: Ditto. * iconvdata/Makefile.in: Ditto. * iconvdata/aclocal.m4: Ditto. * iconvdata/configure: Ditto. * libc/*aclocal.m4: Ditto. * libc/*Makefile.in: Ditto. * libc/*configure: Ditto. * libm/*aclocal.m4: Ditto. * libm/*Makefile.in: Ditto. * libm/*configure: Ditto.
2004-01-23 22:37:46 +01:00
/* Iconv descriptor type */
typedef void *_iconv_t;
#endif
2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com> * acinclude.m4 (--enable-newlib-iconv): New configuration option. (--enable-newlib-builtin-converters): Ditto. * configure.in: Add code to set _ICONV_ENABLED flag. Set _MB_LEN_MAX to 1 if not mb enabled. * configure: Regenerated. * aclocal.m4: Ditto. * Makefile.in: Ditto. * newlib.hin: Add _ICONV_ENABLED flag. * libc/Makefile.am: Add support for iconv. * libc/configure.in: Ditto. * libc/Makefile.in: Regenerated. * libc/aclocal.m4: Ditto. * libc/configure: Ditto. * libc/libc.texinfo: Add iconv documentation. * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am, libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL, libc/iconv/README.TODO, libc/iconv/charset.aliases, libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am, libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES, libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c, libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c, libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c, libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c, libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c, libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c, libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c, libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c, libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c, libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c, libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c, libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c, libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in, libc/iconv/ccs/binary/big5.cct, libc/iconv/ccs/binary/cns11643_plane1.cct, libc/iconv/ccs/binary/cns11643_plane14.cct, libc/iconv/ccs/binary/cns11643_plane2.cct, libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct, libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct, libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct, libc/iconv/ccs/binary/iso_8859_1.cct, libc/iconv/ccs/binary/iso_8859_15.cct, libc/iconv/ccs/binary/iso_8859_2.cct, libc/iconv/ccs/binary/iso_8859_4.cct, libc/iconv/ccs/binary/iso_8859_5.cct, libc/iconv/ccs/binary/jis_x0201.cct, libc/iconv/ccs/binary/jis_x0208_1983.cct, libc/iconv/ccs/binary/jis_x0212_1990.cct, libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct, libc/iconv/ccs/binary/ksx1001.cct, libc/iconv/ccs/binary/shift_jis.cct, libc/iconv/ccs/binary/us_ascii.cct, libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in, libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c, libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c, libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c, libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c, libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c, libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in, libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c, libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c, libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c, libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c, libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c, libc/iconv/lib/deps.h, libc/iconv/lib/endian.h, libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c, libc/iconv/lib/local.h, libc/include/iconv.h: New files. * libc/sys/linux/include/iconv.h: Ditto. * libc/include/sys/_types.h (_iconv_t): Added. * doc/aclocal.m4: Regenerated. * doc/configure: Ditto. * doc/Makefile.in: Ditto. * iconvdata/Makefile.in: Ditto. * iconvdata/aclocal.m4: Ditto. * iconvdata/configure: Ditto. * libc/*aclocal.m4: Ditto. * libc/*Makefile.in: Ditto. * libc/*configure: Ditto. * libm/*aclocal.m4: Ditto. * libm/*Makefile.in: Ditto. * libm/*configure: Ditto.
2004-01-23 22:37:46 +01:00
Eliminate use of Newlib-specific <machine/types.h> This change solves a glibc/BSD compatibility problem. glibc and BSD use double underscore types for internal types. The Linux port of Newlib uses some glibc provided internal type definitions which are not protected by guard defines, e.g. __off_t. To avoid a conflict Newlib uses single underscore types for some internal types, e.g. _off_t. However, for BSD compatibility we have to define the internal types with double underscore names in <sys/_types.h>. The header file <machine/types.h> is Newlib-specific. It was used instead of <sys/_types.h> to provide the internal type definitions _CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t. Move these definitions to <sys/_types.h> (there exist two instances of this file, one for Linux and one for all other targets). This makes the _HAVE_SYSTYPES configuration define obsolete (could possibly break the __RDOS__ target). Use the standard <sys/_types.h> include throughout. Move __loff_t defintion to default (non-Linux) <sys/_types.h>. Define it via _off64_t to avoid a dependency on the compiler. Provide the __off_t definition via default (non-Linux) <sys/_types.h> based on _off_t for all systems except Cygwin. For Cygwin use _off64_t. Define off_t via __off_t. Provide the __pid_t definition via default (non-Linux) <sys/_types.h>. This prevents a potential __pid_t and pid_t incompatibility. Add BSD guard defines for pid_t. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-04-13 13:10:15 +02:00
#define _CLOCK_T_ unsigned long /* clock() */
#define _TIME_T_ long /* time() */
#define _CLOCKID_T_ unsigned long
#define _TIMER_T_ unsigned long
typedef long __suseconds_t; /* microseconds (signed) */
2000-02-17 20:39:52 +01:00
#endif /* _SYS__TYPES_H */