Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6098 → Rev 6099

/contrib/sdk/sources/newlib/libc/include/sys/types.h
18,6 → 18,7
#ifndef _SYS_TYPES_H
 
#include <_ansi.h>
# include <sys/cdefs.h>
 
#ifndef __INTTYPES_DEFINED__
#define __INTTYPES_DEFINED__
59,6 → 60,7
 
#define _SYS_TYPES_H
#include <sys/_types.h>
#include <sys/_stdint.h>
 
#ifdef __i386__
#if defined (GO32) || defined (__MSDOS__)
82,7 → 84,7
#define _ST_INT32
#endif
 
# ifndef _POSIX_SOURCE
# if __BSD_VISIBLE
 
# define physadr physadr_t
# define quad quad_t
111,7 → 113,7
typedef unsigned short ushort; /* System V compatibility */
typedef unsigned int uint; /* System V compatibility */
typedef unsigned long ulong; /* System V compatibility */
# endif /*!_POSIX_SOURCE */
# endif /*__BSD_VISIBLE */
 
#ifndef __clock_t_defined
typedef _CLOCK_T_ clock_t;
123,21 → 125,6
#define __time_t_defined
#endif
 
#ifndef __timespec_defined
#define __timespec_defined
/* Time Value Specification Structures, P1003.1b-1993, p. 261 */
 
struct timespec {
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
#endif
 
struct itimerspec {
struct timespec it_interval; /* Timer period */
struct timespec it_value; /* Timer expiration */
};
 
#ifndef __daddr_t_defined
typedef long daddr_t;
#define __daddr_t_defined
221,52 → 208,6
 
typedef unsigned short nlink_t;
 
/* We don't define fd_set and friends if we are compiling POSIX
source, or if we have included (or may include as indicated
by __USE_W32_SOCKETS) the W32api winsock[2].h header which
defines Windows versions of them. Note that a program which
includes the W32api winsock[2].h header must know what it is doing;
it must not call the cygwin32 select function.
*/
# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
# define _SYS_TYPES_FD_SET
# define NBBY 8 /* number of bits in a byte */
/*
* Select uses bit masks of file descriptors in longs.
* These macros manipulate such bit fields (the filesystem macros use chars).
* FD_SETSIZE may be defined by the user, but the default here
* should be >= NOFILE (param.h).
*/
# ifndef FD_SETSIZE
# define FD_SETSIZE 64
# endif
 
typedef long fd_mask;
# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
# ifndef howmany
# define howmany(x,y) (((x)+((y)-1))/(y))
# endif
 
/* We use a macro for fd_set so that including Sockets.h afterwards
can work. */
typedef struct _types_fd_set {
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} _types_fd_set;
 
#define fd_set _types_fd_set
 
# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
# define FD_ZERO(p) (__extension__ (void)({ \
size_t __i; \
char *__tmp = (char *)p; \
for (__i = 0; __i < sizeof (*(p)); ++__i) \
*__tmp++ = 0; \
}))
 
# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) */
 
#undef __MS_types__
#undef _ST_INT32
 
282,8 → 223,14
#endif
 
typedef unsigned long useconds_t;
typedef long suseconds_t;
 
#ifndef _SUSECONDS_T_DECLARED
typedef __suseconds_t suseconds_t;
#define _SUSECONDS_T_DECLARED
#endif
 
typedef __int64_t sbintime_t;
 
#include <sys/features.h>