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

221 lines
4.8 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. Targets shall use <machine/_types.h> to define their own
internal types if desired.
There are three define patterns used for type definitions. Lets assume
xyz_t is a user type.
The internal type definition uses __machine_xyz_t_defined. It is defined by
<machine/_types.h> to disable a default definition in <sys/_types.h>. It
must not be used in other files.
User type definitions are guarded by __xyz_t_defined in glibc and
_XYZ_T_DECLARED in BSD compatible systems.
2000-02-17 20:39:52 +01:00
*/
#ifndef _SYS__TYPES_H
#define _SYS__TYPES_H
#include <newlib.h>
#include <sys/config.h>
#include <machine/_types.h>
#include <sys/lock.h>
#ifndef __machine_blkcnt_t_defined
typedef long __blkcnt_t;
#endif
#ifndef __machine_blksize_t_defined
typedef long __blksize_t;
#endif
#ifndef __machine_fsblkcnt_t_defined
typedef __uint64_t __fsblkcnt_t;
#endif
#ifndef __machine_fsfilcnt_t_defined
typedef __uint32_t __fsfilcnt_t;
#endif
#ifndef __machine_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 __machine_dev_t_defined
typedef short __dev_t;
#endif
#ifndef __machine_uid_t_defined
typedef unsigned short __uid_t;
#endif
#ifndef __machine_gid_t_defined
typedef unsigned short __gid_t;
#endif
#ifndef __machine_id_t_defined
typedef __uint32_t __id_t;
#endif
#ifndef __machine_ino_t_defined
#if (defined(__i386__) && (defined(GO32) || defined(__MSDOS__))) || \
defined(__sparc__) || defined(__SPU__)
typedef unsigned long __ino_t;
#else
typedef unsigned short __ino_t;
#endif
#endif
#ifndef __machine_mode_t_defined
#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
typedef int __mode_t;
#else
#if defined(__sparc__) && !defined(__sparc_v9__)
#ifdef __svr4__
typedef unsigned long __mode_t;
#else
typedef unsigned short __mode_t;
#endif
#else
typedef __uint32_t __mode_t;
#endif
#endif
#endif
#ifndef __machine_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
#if defined(__CYGWIN__) && !defined(__LP64__)
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
typedef _off64_t __off_t;
#else
typedef _off_t __off_t;
#endif
typedef _off64_t __loff_t;
#ifndef __machine_key_t_defined
typedef long __key_t;
#endif
/*
* We need fpos_t for the following, but it doesn't have a leading "_",
* so we use _fpos_t instead.
*/
#ifndef __machine_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 __machine_fpos64_t_defined
typedef _off64_t _fpos64_t;
#endif
#endif
/* Defined by GCC provided <stddef.h> */
#undef __size_t
#ifndef __machine_size_t_defined
#ifdef __SIZE_TYPE__
typedef __SIZE_TYPE__ __size_t;
#else
#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
typedef unsigned int __size_t;
#else
typedef unsigned long __size_t;
#endif
#endif
#endif
#ifndef __machine_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
typedef _ssize_t __ssize_t;
* 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 __machine_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 __machine_flock_t_defined
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
#ifndef __machine_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
#ifndef __machine_clock_t_defined
#define _CLOCK_T_ unsigned long /* clock() */
#endif
typedef _CLOCK_T_ __clock_t;
#if defined(_USE_LONG_TIME_T) || __LONG_MAX__ > 0x7fffffffL
#define _TIME_T_ long
#else
#define _TIME_T_ __int_least64_t
#endif
typedef _TIME_T_ __time_t;
#define _CLOCKID_T_ unsigned long
typedef _CLOCKID_T_ __clockid_t;
#define _TIMER_T_ unsigned long
typedef _TIMER_T_ __timer_t;
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
#ifndef __machine_sa_family_t_defined
typedef __uint8_t __sa_family_t;
#endif
#ifndef __machine_socklen_t_defined
typedef __uint32_t __socklen_t;
#endif
typedef unsigned short __nlink_t;
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
typedef long __suseconds_t; /* microseconds (signed) */
typedef unsigned long __useconds_t; /* microseconds (unsigned) */
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 __GNUCLIKE_BUILTIN_VARARGS
typedef __builtin_va_list __va_list;
#else
typedef char * __va_list;
#endif /* __GNUCLIKE_BUILTIN_VARARGS */
2000-02-17 20:39:52 +01:00
#endif /* _SYS__TYPES_H */