mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Add <sys/types.h> to get _uint32_t definition. * libc/include/machine/types.h: Skip __off_t, __pid_t, and __loff_t definitions if special _HAVE_SYSTYPES macro defined. * libc/include/sys/config.h: Removed _uint*, _int* definitions. * libc/include/sys/param.h: Remove i386 case which is handled by default case. (BIG_ENDIAN, LITTLE_ENDIAN): Protect definitions in case they are already defined. (BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and _IEEE_LITTLE_ENDIAN flags. * libc/include/sys/reent.h: Change __uint32_t references to use _ULong instead. (_REENT_GETDATE_REENT_P): New macro. * libc/include/sys/types.h (__int16_t, __uint16_t): Added. (__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto. * libc/search/hash.h: Add default setting of BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined. * libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t, pid_t, off_t, loff_t, caddr_t, and daddr_t type definitions which are done by subsequent glibc headers. Add macro definitions to prevent subsequent header files from defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and intptr_t to after glibc definitions of types they are based on.
This commit is contained in:
parent
cd6df12137
commit
35728d4f14
@ -1,3 +1,30 @@
|
||||
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/include/math.h: Add <sys/types.h> to get _uint32_t definition.
|
||||
* libc/include/machine/types.h: Skip __off_t, __pid_t, and
|
||||
__loff_t definitions if special _HAVE_SYSTYPES macro defined.
|
||||
* libc/include/sys/config.h: Removed _uint*, _int* definitions.
|
||||
* libc/include/sys/param.h: Remove i386 case which is handled
|
||||
by default case.
|
||||
(BIG_ENDIAN, LITTLE_ENDIAN): Protect
|
||||
definitions in case they are already defined.
|
||||
(BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and
|
||||
_IEEE_LITTLE_ENDIAN flags.
|
||||
* libc/include/sys/reent.h: Change __uint32_t references to
|
||||
use _ULong instead.
|
||||
(_REENT_GETDATE_REENT_P): New macro.
|
||||
* libc/include/sys/types.h (__int16_t, __uint16_t): Added.
|
||||
(__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto.
|
||||
* libc/search/hash.h: Add default setting of BYTE_ORDER,
|
||||
LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined.
|
||||
* libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define
|
||||
ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t,
|
||||
pid_t, off_t, loff_t, caddr_t, and daddr_t type
|
||||
definitions which are done by subsequent glibc headers.
|
||||
Add macro definitions to prevent subsequent header files from
|
||||
defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and
|
||||
intptr_t to after glibc definitions of types they are based on.
|
||||
|
||||
2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/include/errno.h: Protect from multiple inclusion.
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define _CLOCKID_T_ unsigned long
|
||||
#define _TIMER_T_ unsigned long
|
||||
|
||||
#ifndef _HAVE_SYSTYPES
|
||||
typedef long int __off_t;
|
||||
typedef int __pid_t;
|
||||
#ifdef __GNUC__
|
||||
@ -13,6 +14,7 @@ __extension__ typedef long long int __loff_t;
|
||||
#else
|
||||
typedef long int __loff_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
|
||||
|
@ -7,6 +7,7 @@ extern "C" {
|
||||
#define _MATH_H_
|
||||
|
||||
#include <sys/reent.h>
|
||||
#include <sys/types.h>
|
||||
#include <machine/ieeefp.h>
|
||||
#include "_ansi.h"
|
||||
|
||||
|
@ -57,6 +57,8 @@
|
||||
#ifdef __linux__
|
||||
/* we want the reentrancy structure to be returned by a function */
|
||||
#define __DYNAMIC_REENT__
|
||||
#define HAVE_GETDATE
|
||||
#define _HAVE_SYSTYPES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -130,9 +132,6 @@
|
||||
#define _REENT_SMALL
|
||||
#endif
|
||||
|
||||
typedef short int __int16_t;
|
||||
typedef unsigned short int __uint16_t;
|
||||
|
||||
/* This block should be kept in sync with GCC's limits.h. The point
|
||||
of having these definitions here is to not include limits.h, which
|
||||
would pollute the user namespace, while still using types of the
|
||||
@ -160,22 +159,6 @@ typedef unsigned short int __uint16_t;
|
||||
#endif
|
||||
/* End of block that should be kept in sync with GCC's limits.h. */
|
||||
|
||||
#if __INT_MAX__ == 32767
|
||||
typedef long int __int32_t;
|
||||
typedef unsigned long int __uint32_t;
|
||||
#else
|
||||
typedef int __int32_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
#endif
|
||||
|
||||
#if __LONG_MAX__ > 2147483647 || !defined(__GNUC__)
|
||||
typedef long int __int64_t;
|
||||
typedef unsigned long int __uint64_t;
|
||||
#else
|
||||
__extension__ typedef long long __int64_t;
|
||||
__extension__ typedef unsigned long long __uint64_t;
|
||||
#endif
|
||||
|
||||
#ifndef _POINTER_INT
|
||||
#define _POINTER_INT long
|
||||
#endif
|
||||
|
@ -7,25 +7,23 @@
|
||||
|
||||
#include <sys/config.h>
|
||||
|
||||
#ifndef BIG_ENDIAN
|
||||
#define BIG_ENDIAN 4321
|
||||
#endif
|
||||
#ifndef LITTLE_ENDIAN
|
||||
#define LITTLE_ENDIAN 1234
|
||||
#endif
|
||||
|
||||
# define HZ (60)
|
||||
# define NOFILE (60)
|
||||
# define PATHSIZE (1024)
|
||||
|
||||
#define BIG_ENDIAN 4321
|
||||
#define LITTLE_ENDIAN 1234
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef __IEEE_LITTLE_ENDIAN
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#ifdef __IEEE_BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -73,14 +73,14 @@ struct _atexit {
|
||||
int _ind; /* next index in this table */
|
||||
void (*_fns[_ATEXIT_SIZE])(void); /* the table itself */
|
||||
void *_fnargs[_ATEXIT_SIZE]; /* fn args for on_exit */
|
||||
__uint32_t _fntypes; /* type of exit routine */
|
||||
__ULong _fntypes; /* type of exit routine */
|
||||
};
|
||||
#else
|
||||
struct _atexit {
|
||||
int _ind; /* next index in this table */
|
||||
void (*_fns[_ATEXIT_SIZE])(void); /* the table itself */
|
||||
void *_fnargs[_ATEXIT_SIZE]; /* fn args for on_exit */
|
||||
__uint32_t _fntypes; /* type of exit routine */
|
||||
__ULong _fntypes; /* type of exit routine */
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -259,6 +259,7 @@ struct _misc_reent
|
||||
int _wctomb_state;
|
||||
int _mbtowc_state;
|
||||
char _l64a_buf[8];
|
||||
int _getdate_err;
|
||||
};
|
||||
|
||||
/* This version of _reent is layed our with "int"s in pairs, to help
|
||||
@ -344,6 +345,7 @@ struct _reent
|
||||
var->__sf = 0; \
|
||||
var->_misc = _NULL; \
|
||||
var->_signal_buf = _NULL; \
|
||||
var->_getdate_err = 0; \
|
||||
var->__sf_fake._p = _NULL; \
|
||||
var->__sf_fake._r = 0; \
|
||||
var->__sf_fake._w = 0; \
|
||||
@ -413,6 +415,7 @@ struct _reent
|
||||
_r->_misc->_wctomb_state = 0; \
|
||||
_r->_misc->_mbtowc_state = 0; \
|
||||
_r->_misc->_l64a_buf[0] = '\0'; \
|
||||
_r->_misc->_getdate_err = 0; \
|
||||
} while (0)
|
||||
#define _REENT_CHECK_MISC(var) \
|
||||
_REENT_CHECK(var, _misc, struct _misc_reent *, sizeof *((var)->_misc), _REENT_INIT_MISC(var))
|
||||
@ -437,6 +440,7 @@ struct _reent
|
||||
#define _REENT_MBTOWC_STATE(ptr)((ptr)->_misc->_mbtowc_state)
|
||||
#define _REENT_WCTOMB_STATE(ptr)((ptr)->_misc->_wctomb_state)
|
||||
#define _REENT_L64A_BUF(ptr) ((ptr)->_misc->_l64a_buf)
|
||||
#define _REENT_GETDATE_ERR_P(ptr) (&((ptr)->_misc->_getdate_err))
|
||||
#define _REENT_SIGNAL_BUF(ptr) ((ptr)->_signal_buf)
|
||||
|
||||
#else /* !_REENT_SMALL */
|
||||
@ -486,6 +490,7 @@ struct _reent
|
||||
int _wctomb_state;
|
||||
char _l64a_buf[8];
|
||||
char _signal_buf[_REENT_SIGNAL_SIZE];
|
||||
int _getdate_err;
|
||||
} _reent;
|
||||
/* Two next two fields were once used by malloc. They are no longer
|
||||
used. They are used to preserve the space used before so as to
|
||||
@ -518,7 +523,7 @@ struct _reent
|
||||
{ 0,0,0,0,0,0,0,0}, 0, 1, \
|
||||
{{_RAND48_SEED_0, _RAND48_SEED_1, _RAND48_SEED_2}, \
|
||||
{_RAND48_MULT_0, _RAND48_MULT_1, _RAND48_MULT_2}, _RAND48_ADD}, \
|
||||
0, 0, 0, ""} } }
|
||||
0, 0, 0, "", "", 0} } }
|
||||
|
||||
#define _REENT_INIT_PTR(var) \
|
||||
{ int i; \
|
||||
@ -560,6 +565,7 @@ struct _reent
|
||||
var->_new._reent._wctomb_state = 0; \
|
||||
var->_new._reent._l64a_buf[0] = '\0'; \
|
||||
var->_new._reent._signal_buf[0] = '\0'; \
|
||||
var->_new._reent._getdate_err = 0; \
|
||||
var->_atexit = _NULL; \
|
||||
var->_atexit0._ind = 0; \
|
||||
var->_atexit0._fns[0] = _NULL; \
|
||||
@ -597,6 +603,7 @@ struct _reent
|
||||
#define _REENT_WCTOMB_STATE(ptr)((ptr)->_new._reent._wctomb_state)
|
||||
#define _REENT_L64A_BUF(ptr) ((ptr)->_new._reent._l64a_buf)
|
||||
#define _REENT_SIGNAL_BUF(ptr) ((ptr)->_new._reent._signal_buf)
|
||||
#define _REENT_GETDATE_ERR_P(ptr) (&((ptr)->_new._reent._getdate_err))
|
||||
|
||||
#endif /* !_REENT_SMALL */
|
||||
|
||||
|
@ -97,6 +97,25 @@ typedef unsigned short ino_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef short int __int16_t;
|
||||
typedef unsigned short int __uint16_t;
|
||||
|
||||
#if __INT_MAX__ == 32767
|
||||
typedef long int __int32_t;
|
||||
typedef unsigned long int __uint32_t;
|
||||
#else
|
||||
typedef int __int32_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
#endif
|
||||
|
||||
#if __LONG_MAX__ > 2147483647 || !defined(__GNUC__)
|
||||
typedef long int __int64_t;
|
||||
typedef unsigned long int __uint64_t;
|
||||
#else
|
||||
__extension__ typedef long long __int64_t;
|
||||
__extension__ typedef unsigned long long __uint64_t;
|
||||
#endif
|
||||
|
||||
#ifdef __MS_types__
|
||||
typedef unsigned long vm_offset_t;
|
||||
typedef unsigned long vm_size_t;
|
||||
|
@ -37,6 +37,16 @@
|
||||
* $FreeBSD: src/lib/libc/db/hash/hash.h,v 1.6 2002/03/21 22:46:26 obrien Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef __IEEE_LITTLE_ENDIAN
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Operations */
|
||||
typedef enum {
|
||||
HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
|
||||
|
@ -52,6 +52,7 @@
|
||||
|
||||
#include <sys/config.h>
|
||||
#include <machine/types.h>
|
||||
#include <sys/_types.h>
|
||||
|
||||
#if !defined(__time_t_defined) && !defined(_TIME_T)
|
||||
#define _TIME_T
|
||||
@ -65,20 +66,12 @@ typedef _TIME_T_ time_t;
|
||||
typedef _CLOCK_T_ clock_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned int __socklen_t;
|
||||
typedef unsigned int __useconds_t;
|
||||
|
||||
typedef __pid_t pid_t;
|
||||
typedef __off_t off_t;
|
||||
typedef __loff_t loff_t;
|
||||
typedef __uint32_t uintptr_t;
|
||||
typedef __int32_t intptr_t;
|
||||
#ifndef _SSIZE_T
|
||||
#define _SSIZE_T
|
||||
typedef _ssize_t ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef __u_char_defined
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
#ifdef __GNUC__
|
||||
__extension__ typedef long long quad_t;
|
||||
__extension__ typedef unsigned long long u_quad_t;
|
||||
@ -99,12 +92,6 @@ typedef struct
|
||||
#define __u_char_defined
|
||||
#endif
|
||||
|
||||
#ifndef __daddr_t_defined
|
||||
typedef int daddr_t;
|
||||
typedef char *caddr_t;
|
||||
# define __daddr_t_defined
|
||||
#endif
|
||||
|
||||
typedef int clockid_t;
|
||||
|
||||
/* Time Value Specification Structures, P1003.1b-1993, p. 261 */
|
||||
@ -152,5 +139,12 @@ typedef long fd_mask;
|
||||
#define __mode_t_defined
|
||||
#define __gid_t_defined
|
||||
#define __uid_t_defined
|
||||
#define __pid_t_defined
|
||||
#define __ssize_t_defined
|
||||
#define __key_t_defined
|
||||
#define __off_t_defined
|
||||
|
||||
typedef __uint32_t uintptr_t;
|
||||
typedef __int32_t intptr_t;
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user